Inside Dynamics Axapta源代码赏析(二)
2006-09-26 21:43
417 查看
C.NumberSequence
作用:如何给特定模块的某个类型增加编码规则,该工程示例了给销售模块的服务订单增加编码规则.
步骤:
1.创建BikeServiceOrderId扩展数据类型,当然如果要给已经存在的扩展数据类型增加序列号分配的话,就不必增加了.
2.修改NumberSeqReference_SalesOrder类,当然如果要给其他模块的类型增加编码规则的话,就选名为_**的类.修改LoadModule方法,增加如下代码:
numRef.DataTypeId = typeId2ExtendedTypeId(
typeid(BikeServiceOrderId));
numRef.ReferenceHelp = "Unique key for the service order table, "+
"used when identification of a service "+
"order is allocated automatically.";
numRef.WizardContinuous = false;
numRef.WizardManual = NoYes::No;
numRef.WizardAllowChangeDown = NoYes::No;
numRef.WizardAllowChangeUp = NoYes::No;
numRef.SortField = 100;
this.create(numRef);
3.修改表SalesParameter,当然如果其他模块就修改**parmameter表.增加如下方法:
static client server NumberSequenceReference numRefBikeServiceOrderId()
display public DocuValueFile PromotionImage()
void printInventTable()
5.改写Body:BodyReference 的executeSection方法,增加printInventTable方法的调用.
E:ReportImageOptimized
作用:跟D工程的功能一样,只不过是优化版本.
不同之处在于在报表中定义了promotionTxt和promotionImage两个变量,BodyInventTable下的控件对应的值从这两个变量中取得,而这两个变量的值是在方法printInventTable中赋值的.
对报表的send过程细节不是很清楚,为什么这样就可以改善效率?访问数据库的次数是一样的,send的调用次数也是一样的.
作用:如何给特定模块的某个类型增加编码规则,该工程示例了给销售模块的服务订单增加编码规则.
步骤:
1.创建BikeServiceOrderId扩展数据类型,当然如果要给已经存在的扩展数据类型增加序列号分配的话,就不必增加了.
2.修改NumberSeqReference_SalesOrder类,当然如果要给其他模块的类型增加编码规则的话,就选名为_**的类.修改LoadModule方法,增加如下代码:
numRef.DataTypeId = typeId2ExtendedTypeId(
typeid(BikeServiceOrderId));
numRef.ReferenceHelp = "Unique key for the service order table, "+
"used when identification of a service "+
"order is allocated automatically.";
numRef.WizardContinuous = false;
numRef.WizardManual = NoYes::No;
numRef.WizardAllowChangeDown = NoYes::No;
numRef.WizardAllowChangeUp = NoYes::No;
numRef.SortField = 100;
this.create(numRef);
3.修改表SalesParameter,当然如果其他模块就修改**parmameter表.增加如下方法:
static client server NumberSequenceReference numRefBikeServiceOrderId()
display public DocuValueFile PromotionImage()
void printInventTable()
5.改写Body:BodyReference 的executeSection方法,增加printInventTable方法的调用.
E:ReportImageOptimized
作用:跟D工程的功能一样,只不过是优化版本.
不同之处在于在报表中定义了promotionTxt和promotionImage两个变量,BodyInventTable下的控件对应的值从这两个变量中取得,而这两个变量的值是在方法printInventTable中赋值的.
对报表的send过程细节不是很清楚,为什么这样就可以改善效率?访问数据库的次数是一样的,send的调用次数也是一样的.
相关文章推荐
- Inside Dynamics Axapta4.0出版了
- "Go to the Main Table Form" differences between Axapta 2.x and Dynamics AX 4
- Axapta -> Dynamics AX -> AX7 -> Dynamics 365 for Operation -> Dynamics 365 for Finance and Operation
- Dynamics Axapta的B/S解决之道(一)
- 代码之美——Doom3源代码赏析
- 代码之美——Doom3源代码赏析
- 公司标识 Inside Dynamics AX 4.0 Company Identifiers
- Win2k泄漏源代码赏析——GetProcAddress
- 代码之美——Doom3源代码赏析
- Unity引擎及编辑器C#源代码赏析(二)—项目组织
- JSF 源代码赏析之FacesServlet
- Dynamics AX: A Guide to Microsoft Axapta
- 代码之美——Doom3源代码赏析1
- Inside Dynamics Axapta源代码赏析(六)
- 代码之美——Doom3源代码赏析
- 代码之美——Doom3源代码赏析
- Inside Microsoft Dynamics AX 2009, 2nd Edition 已出版
- JSF 源代码赏析之Lifecycle
- 佛祖保佑源代码赏析
- Inside Microsoft Dynamics AX 4.0 下载