随笔分类 - AX 2009
摘要:1 if (infolog.language() == "zh-hans")2 infolog.language("en-us");3 else4 infolog.language("zh-hans");5 infolog.navPane().loadStartupButtons();6 Infolog.navPane().refreshFavorites(infolog.navPane().selectedFavoriteGroup(), xInfo::currentWorkspaceNum());
阅读全文
摘要:窗体分隔符是通过组(group)容器来实现的,将它添加到窗口后,将属性HideIfEmpty和AlignChild设置为No;FrameType设置为Raise 3D;设置好其它外观样式后,重写它的鼠标事件就可以实现了。 1 int mouseUp(int x, int y, int button, boolean ctrl, boolean shift) 2 { 3 int ret; 4 ret = super(x, y, button, ctrl, shift); 5 return _formSplitterVertical.mouseUp(x, y, button...
阅读全文
摘要:1 void resetUserData() 2 { 3 DialogButton button; 4 SysLastValue sysLastValue; 5 Dialog Dialog = new Dialog("@SYS70748"); 6 DialogField dlg = Dialog.addField(typeid(UserId)); 7 userId userId; 8 ; 9 dlg.value(curuserId());10 Dialog.doInit();...
阅读全文
摘要:1 void clicked() 2 { 3 Dialog Dialog = new Dialog("Destroy Content Pane Window"); 4 DialogField dlgHide = Dialog.addField(typeid(Noyes),"Hide Content Pane Window"); 5 DialogField dlgShow = Dialog.addField(typeid(Noyes),"Show Content Pane Window"); 6 Dia...
阅读全文
摘要:1 static void Job_ScheduleBatch2(Args _args) 2 { 3 BatchHeader batHeader; 4 BatchInfo batInfo; 5 RunBaseBatch rbbTask; 6 str sParmCaption = "My RunbaseBatch Report Run"; 7 ; 8 rbbTask = new AV_RunbaseBatchDemo(); 9 batInfo = rbbTask .batchInfo();10 batInfo .parmCapti...
阅读全文
摘要:1 public int monthDiff(date _start, date _end) 2 { 3 int diff; 4 int startYear, startMonth; 5 int endYear, endMonth; 6 ; 7 startYear = year(_start); 8 startMonth = mthofyr(_start); 9 endYear = year(_end);10 endMonth = mthofyr(_end);11 //year12 //endYear...
阅读全文
摘要:Job:1 static void testDialogJob(Args _args)2 {3 testDialogClass testDialogClass ;4 ;5 testDialogClass = new testDialogClass() ;6 info(testDialogClass.mystr()) ;7 }Class: 1 class testDialogClass 2 { 3 str mystr ; 4 } 5 void new() 6 { 7 Args args = new Args(); 8 FormRun fo...
阅读全文
摘要:Here is a sample class which is called via Dialog framework to create & post free text invoice using X++ code. 1 public void xtest() 2 { 3 Dialog dialog; 4 DialogField dlgCustAcc; 5 DialogGroup dialogPeriodLengthGroup, dialogPeriodLengthGroup1; 6 DialogField dlgLedgerAcc...
阅读全文
摘要:今天我向大家介绍一种方法,用X++写一个方法就可以完成上述功能。1、在窗体下写下如下两个方法: 1 1、 2 3 public void gotoMainTable(Object ctrl, boolean isParmObject=false, container refFrom=connull()) 4 { 5 TableName tableName; 6 FormName formName; 7 int tableID; 8 int fieldID; 9 int ...
阅读全文
摘要:1 UserGroupList UserGroupList;2 ;3 while select UserGroupList where UserGroupList.userId == curuserid()4 {5 info(UserGroupList.groupId);6 }
阅读全文
摘要:1 Void click() 2 { 3 InventDim inventDim; 4 InventSum inventSum; 5 InventQty inventQty; 6 itemID YourItemID; 7 ; 8 YourItemID = 'YourItemID'; 9 while select sum(postedQty), sum(received), sum(deducted), sum(registered), sum(picked), sum(reservPhysical)10 from ...
阅读全文
摘要:1 void saveimage()2 {3 image MyImage = new image();4 str 260 imgPath = EAMParameters::filePath();//从companyinfo表得到路径,页可以自定义你自己的路径5 ;6 MyImage.saveImage(imgPath + filename, ImageSaveType::BMP_UNCOMP);//filename是新的文件名7 }
阅读全文
摘要:1 static void jobMain(Args _args) 2 { 3 treeNode treeNode; 4 xInfo xInfo = new xInfo(); 5 ; 6 treeNode = xInfo.rootNode(); 7 treeNode = treeNode::findNode("jobs").AOTfindChild("Job1"); 8 treeNode.AOTrun(); 9 treeNode = treeNode::findNode("jobs").AOTfindChild("Job2&
阅读全文
摘要:1、找到 class EditorScripts。2、比如在右键增加AddDeveloperName菜单,当点击此菜单时,在当前行增加开发人员的名字。 1 void AddDeveloperName(Editor e) 2 { 3 int startLine = e.selectionStartLine(); 4 int startCol = e.selectionStartCol(); 5 ; 6 e.unmark(); 7 e.gotoLine(startLine); 8 e.gotoCol(startCol); 9 e.insertL...
阅读全文
摘要:对于数组类型的字段,比如Dimension,假如你试图访问一个单独的数据,我们就不能直接使用Dimension[Index]的方式,否则我们将会的到类似"Query extended range failure: Right parenthesis expected near pos 0."的错误。下面的代码展示了怎样使用正确的方法访问数组类型Department。public void init(){ QueryBuildRange qbrDimension; ; super(); //Department's index is 1 ...
阅读全文
摘要:假如你用过runbase类的话,你一定会对那里的pack/unpack机制印象深刻, 这种机制允许用户保存上一次输入的值,假如你也想让你的From拥有这种强大的功能的话,请参考加入以下6个方法。 1 public dataAreaId lastValueDataAreaId() 2 { 3 return curExt(); 4 } 5 6 private UserId lastValueUserId() 7 { 8 return curuserid(); 9 }10 11 private UtilElementType lastValueType()12 {13 ...
阅读全文
摘要:1 Void click() 2 { 3 ResourceNode resourceNode; 4 FilePath imagename; 5 ; 6 resourceNode = SysResource::getResourceNode(resourcestr(ResourceName)); 7 if (resourceNode) 8 { 9 resourceNode. AOTload();10 imagename = SysResource::saveToTempFile(resourc...
阅读全文
摘要:1 static void AccessAccess(Args _args) 2 { 3 LoginProperty LP = new LoginProperty(); 4 OdbcConnection myConnection; 5 Statement myStatement; 6 ResultSet myResult; 7 LP.setDSN("MSAccess2000"); 8 try { 9 myConnection = new OdbcConnection(LP);10 } 11 catch ...
阅读全文
摘要:1 connection con=new connection(); 2 statement stm=con.createStatement(); 3 ResultSET R; 4 str 1024 strSql; 5 ; 6 7 strSql = 'select top 10 * from inventTable '; 8 R = stm.executeQuery(strSQL); 9 while(r.next())10 {11 print r.getString(1);12 }//调用存储过程://strsql='Execute SP \''+A+&
阅读全文
摘要:1 Example 2 { 3 LoginProperty LP = new LoginProperty(); 4 OdbcConnection myConnection; 5 Statement myStatement; 6 ResultSet myResult; 7 ; 8 super(); 9 LP.setDSN("MSAccess2000");10 try 11 {12 //Do something 13 }14 catch 15 { 16 ...
阅读全文

浙公网安备 33010602011771号