第一步,先在form的声明的地方声明变量: public class FormRun extends ObjectRun { QueryBuildRange criteriaPosted; }第二步,数据源(datasource)对应的表的ini方法: public void init() { super(); criteriaPosted=this.query().dataSourceName('YouTable').addRange(fieldNum(YouTable,FieldName)); }第三步,数据源的ExecuteQuery方法下 public void exe Read More
posted @ 2009-04-26 12:13 Fandy Xie Views(200) Comments(0) Diggs(0) Edit
其实我也发现这个问题了,但是Junevoful已经说的很详细了,我就补充两点:1,使用exists join不可以引用第二个表的数据,表示÷这条数据一旦存在于第二个表中,就认为满足条件,但是使用inner join可以引用第二个表的数据,是内关联。2,大家可以使用Axapta本省带的Sql性能监视器来监视Sql语句的执行效率,启动的方法是:下面我就引用一下Junevoful的文章,他说的很详细,也很精彩,谢谢他给我带了这么好的文章!前几天,在做系统优化的时候,居然发现代码当中存在while嵌套循环语句while select table 1{..while select table2 Read More
posted @ 2009-04-26 12:13 Fandy Xie Views(282) Comments(0) Diggs(0) Edit
public void displayOption(TableName _record, FormRowDisplayOption _options){ int IcBackColor = winapi::RGB2int(255,255,255); int IcTextColor = winapi::RGB2int( 0, 0, 0); int SiBackColor = winapi::RGB2int(255,128,225); int SiTextColor = winapi::RGB2int( 0, 0, 0); int CrBackColor = winapi::RGB2int(255 Read More
posted @ 2009-04-26 12:12 Fandy Xie Views(220) Comments(0) Diggs(0) Edit
1:直接调用函数 str 24 ComName; ; ComName=appl.company().ext();//当前公司ID curUserid();//当前用户iD systemDateget();//当前时间 Time2Str(timenow(),1,2);//时间转换函数 curuserid()//当前用户2,使用Session对象 session xSession; ; xSession=new session(); print xsession.userId();pause; print xsession.interfaceLanguage();pause;3,使用XInfo对象 Read More
posted @ 2009-04-26 12:11 Fandy Xie Views(160) Comments(0) Diggs(0) Edit
static void ExportImageToExcel(Args _args){ container ImaPos; COM comWorksheet; COM comShapes; COM comCells; COM comFont; COM comPageSetup; SysExcelWorksheet sheet; SysExcelApplication excel; SysExcelWorkbooks books; SysExcelWorkbook book; SysExcelWorksheets sheets; SysExcelCells cells; COMVariant v Read More
posted @ 2009-04-26 12:10 Fandy Xie Views(345) Comments(0) Diggs(0) Edit
void clicked(){ #Excel HWND HWND; SysExcelApplication excel; SysExcelWorkbooks books; SysExcelWorkbook book; SysExcelWorksheets sheets; SysExcelWorksheet sheet; SysExcelRange columns; SysExcelRange column; SysExcelCells cells; SysExcelCell cell; SysExcelStyle ExcelStyle; SysExcelFont ExcelFont; SysE Read More
posted @ 2009-04-26 12:09 Fandy Xie Views(211) Comments(0) Diggs(0) Edit
static void FindPrimaryIdx(Args _args){ DictTable dt; DictIndex di; Common cm; IndexID idx; int i, iCnt; FieldID fid; FieldID fids[,10]; int fidsCnt = 0; str s; str sTemp; int _tID=175,_rID=956968;//可以修改或使用参数传递 ; dt = new DictTable(_tid); if (dt) { idx = dt.primaryIndex(); if (idx) { di = dt.indexOb Read More
posted @ 2009-04-26 12:08 Fandy Xie Views(129) Comments(0) Diggs(0) Edit
custtable c1,c2;dicttable d = new dicttable(tablenum(custtable));dictfield f;int i;boolean areTheSame = true;;c1 = custtable::find('4001');c2 = custtable::find('4001');for(i=1;i<=d.fieldCnt();i++){ f = new dictfield(tablenum(custtable),d.fieldCnt2Id(i)); if (f.isSystem()==false) { Read More
posted @ 2009-04-26 12:06 Fandy Xie Views(179) Comments(0) Diggs(0) Edit
方法一,直接修改Info类的StartupPost方法,因为我们修改比较复杂,以下我就直接引用junevoful的代码来做范例。void startupPost(){ int counter; int num = 0; int maxSessions = Info::licensedUsersTotal(); xSession session; UserInfo userInfo; UserId currentUserId; ; currentUserId = curuserid(); for(counter = 1; counter < maxSessions;counter++ ) Read More
posted @ 2009-04-26 12:06 Fandy Xie Views(183) Comments(0) Diggs(0) Edit
把数字小写转换成大写方法一,使用系统提供的函数,但是不满足大陆财务的要求。方法二:使用下面的函数。英文:static str Num2EngStr(real realNum,boolean showNegative=false){ str aa,bb,T1,T2,T3,B,W,CC,a1; int a2,a=0,c=0; int V,M; real tmpReal; boolean IsNegative=false; ; aa='ONE'+strRep(' ',9-strLen('ONE'))+'TWO'+strRep(' Read More
posted @ 2009-04-26 12:04 Fandy Xie Views(582) Comments(0) Diggs(0) Edit