public static void modifiedFieldPost(XppPrePostArgs _args)
{
SalesTable salesTable = _args.getThis();
FieldId fieldId = _args.getArg("_fieldId");
ACT_TeamBuyerTable teamBuyerTable;
switch (fieldId)
{
case fieldNum(salesTable,ACT_Teambuyer):
select firstOnly teamBuyerTable
where teamBuyerTable.recid == salesTable.act_teamBuyer;
salesTable.ACT_Division = ACT_Division::find(teamBuyerTable.DivisionId).RecId;
salesTable.ACT_Department = ACT_Department::find(teamBuyerTable.DepartmentId).RecId;
salesTable.ACT_Category = ACT_Category::find(teamBuyerTable.CategoryId).RecId;
salesTable.ACT_ProductType = ACT_ProductType::find(teamBuyerTable.ProductTypeId).RecId;
salesTable.TEX_BAS_LabelId = TEX_BAS_Label::find(teamBuyerTable.TEX_BAS_LabelId).RecId;
break;
}
}
public static void validateFieldPost(XppPrePostArgs _args)
{
SalesTable salesTable = _args.getThis();
CustTable custTable;
FieldId fieldId = _args.getArg("_fieldId");
boolean ret = _args.getReturnValue();
TEX_BAS_Label TEX_BAS_Label;
TEX_BAS_Season TEX_BAS_Season;
ACT_Category ACT_Category;
ACT_Division ACT_Division;
ACT_Department ACT_department;
ACT_ProductType ACT_ProductType;
;
custTable = custTable::find(salesTable.CustAccount);
switch (fieldId)
{
case fieldNum(salesTable,TEX_BAS_LabelId):
if (salesTable.TEX_BAS_LabelId == 0)
return;
TEX_BAS_Label = TEX_BAS_Label::findRecId(salesTable.TEX_BAS_LabelId);
ret = ACT_BuyerFilterSetup::validateSelectionByCust(custTable.RecId,TEX_BAS_Label);
break;
case fieldNum(salesTable,TEX_BAS_SeasonCode):
if (salesTable.TEX_BAS_SeasonCode == 0)
return;
TEX_BAS_Season = TEX_BAS_Season::findRecId(salesTable.TEX_BAS_SeasonCode);
ret = ACT_BuyerFilterSetup::validateSelectionByCust(custTable.RecId,TEX_BAS_Season);
break;
case fieldNum(salesTable,ACT_Category):
if (salesTable.ACT_Category == 0)
return;
ACT_Category = ACT_Category::findRecId(salesTable.ACT_Category);
ret = ACT_BuyerFilterSetup::validateSelectionByCust(custTable.RecId,ACT_Category);
break;
case fieldNum(salesTable,ACT_Division):
if (salesTable.ACT_Division == 0)
return;
ACT_Division = ACT_Division::findRecId(salesTable.ACT_Division);
ret = ACT_BuyerFilterSetup::validateSelectionByCust(custTable.RecId,ACT_Division);
break;
case fieldNum(salesTable,ACT_department):
if (salesTable.ACT_department == 0)
return;
ACT_department = ACT_department::findRecId(salesTable.ACT_department);
ret = ACT_BuyerFilterSetup::validateSelectionByCust(custTable.RecId,ACT_department);
break;
case fieldNum(salesTable,ACT_ProductType):
if (salesTable.act_productType == 0)
return;
ACT_ProductType = ACT_ProductType::findRecId(salesTable.ACT_ProductType);
ret = ACT_BuyerFilterSetup::validateSelectionByCust(custTable.RecId,ACT_ProductType);
break;
}
_args.setReturnValue(ret);
}
ACT contex- modify and verify field
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 辨别不可避免的事并做出相对应的行动 人能弘道,非道弘人 每天分享一句美好的话,每周分享一个美好的人或事
- 申明: 这个故事基本真实,但也不完全真实。留言里有问“然后”的读者。然后啊然后,世上哪有那么多然后啊!如果我们尽情...
- 跑步前看了一点儿文秋芳.应用语言学研究方法与论文写作中文版,第一章 有关研究的定义、过程和分类。课后题提到找一篇国...
- 11.A Strengths and Limitations of Different Types of Mode...