有几个Ax开头的class值得我们研究一下,下面就是调用AxSalesTable和AxSalesLine来创建销售单的例子。
1 static void main(Args args) 2 { 3 AxSalesTable axSalesTable; 4 AxSalesLine axSalesLine; 5 ; 6 // 建立销售单头 7 axSalesTable = new AxSalesTable(); 8 axSalesTable.purchOrderFormNum('CUSTPONUM'); 9 axSalesTable.custAccount('4000'); 10 axSalesTable.save(); 11 // 建立销售单明细 12 axSalesLine = new AxSalesLine(); 13 axSalesLine.AxSalesTable(axSalesTable); 14 axSalesLine.itemId('B-R1112'); 15 axSalesLine.salesQty(5000); 16 axSalesLine.salesPrice(9); 17 axSalesLine.save(); 18 19 axSalesLine = new AxSalesLine(); 20 axSalesLine.AxSalesTable(axSalesTable); 21 axSalesLine.itemId('B-R7'); 22 axSalesLine.salesQty(50); 23 axSalesLine.salesPrice(100); 24 axSalesLine.save(); 25 }