zoukankan
html css js c++ java
创建采购订单
经常要用代码创建采购和销售订单,需要弄清楚哪些字段是必输的,这段代码经常需要拷贝,放在这里做个备份。
static
void
CreatePurchDirectly(Args _args)
{
PurchTable purchTable;
PurchLine purchLine;
InventDim inventDim;
;
ttsbegin;
//
PurchTable
//
PurchId
purchTable.PurchId
=
NumberSeq::newGetNum(PurchParameters::numRefPurchId()).num();
purchTble.PurchaseType =
PurchaseType::Purch;
purchTable.initValue();
//
Vend Account
purchTable.initFromVendTable(VendTable::find(
'
3000
'
));
purchTable.insert();
//
PurchLine
purchLine.initFromPurchTable(purchTable);
//
ItemId
purchLine.ItemId
=
'
B-pack1
'
;
purchLine.initFromInventTable(InventTable::find(
'
B-pack1
'
));
//
Qty
purchLine.PurchQty
=
100
;
purchLine.QtyOrdered
=
100
;
purchLine.RemainInventPhysical
=
100
;
purchLine.RemainPurchPhysical
=
100
;
//
InventDim Maybe should add some other dimensions.
inventDim.InventLocationId
=
'
GW
'
;
purchLine.InventDimId
=
InventDim::findOrCreate(inventDim).inventDimId;
purchLine.insert();
ttscommit;
}
static
void
CreatePurchTableThroughAxPurch(Args _args)
{
AxPurchTable axPurchTable
=
new
AxPurchTable();
AxPurchLine axPurchLine
=
new
AxPurchLine();
AxInventDim_PurchLine axInventDim
=
new
AxInventDim_PurchLine();
;
//
PurchTable
//
Order Account
axPurchTable.parmOrderAccount(
"
3000
"
);
axPurchTable.save();
//
PurchLine
//
PurchId
axPurchLine.axPurchTable(axPurchTable);
//
ItemId
axPurchLine.parmItemId(
"
B-pack1
"
);
//
Qty
axPurchLine.parmPurchQty(
100
);
//
InventDim Maybe should add some other dimensions
axInventDim.axPurchLine(axPurchLine);
axInventDim.parmInventLocationId(
'
MW
'
);
axPurchLine.axInventDim(axInventDim);
axPurchLine.save();
}
查看全文
相关阅读:
wpf中显示HTML(转自http://steeven.cnblogs.com/archive/2006/06/12/424258.html)
【msdn wpf forum翻译】TextBox中文本 中对齐 的方法
【msdn wpf forum翻译】TextBlock等类型的默认样式(implicit style)为何有时不起作用?
《Applications=Code+Markup》读书笔记 1(第一章 初识Application和Window)
sql 分页
Api
快钱接口
c#经典面试题
static/const/readonly
静态构造函数和静态类
原文地址:https://www.cnblogs.com/Farseer1215/p/1141923.html
最新文章
Assigned 的迷思
sin 函数
Delphi中如何将一个extended型等实数强制转换为integer型
delphi线程的创建、挂起、激活与终止
delphi self 的使用
delphi 里的@^#等符号都是什么意思?[转]
Delphi TCanvas画布
cadence默认HDL套件恢复选择
关于网关&网桥
仿百度开源js框架tangram2.0.0.0 封装的自己常用的方法框架
热门文章
优化前端加载速度11条建议
封装事件绑定函数解决this在ie下的绑定问题
猜老师的生日是多少
第一贴送给自己
Bind Enum to Combobox.SelectedIndex
【msdn wpf forum翻译】在wpf程序中显示一个doc文件的内容
《Applications=Code+Markup》读书笔记 2(第二章 基本画刷)
如何捕获正在执行的函数名?
【msdn wpf forum翻译】如何在wpf程序(程序激活时)中捕获所有的键盘输入,而不管哪个元素获得焦点?
【msdn wpf forum翻译】获取当前窗口焦点所在的元素
Copyright © 2011-2022 走看看