本文整理汇总了C#中PXCache.RaiseFieldUpdating方法的典型用法代码示例。如果您正苦于以下问题:C# PXCache.RaiseFieldUpdating方法的具体用法?C# PXCache.RaiseFieldUpdating怎么用?C# PXCache.RaiseFieldUpdating使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PXCache
的用法示例。
在下文中一共展示了PXCache.RaiseFieldUpdating方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetDefaultEffDate
private void SetDefaultEffDate(PXCache cache)
{
object newValue;
if (cache.RaiseFieldDefaulting<CurrencyInfo.curyEffDate>(this, out newValue))
{
cache.RaiseFieldUpdating<CurrencyInfo.curyEffDate>(this, ref newValue);
}
this.CuryEffDate = (DateTime?)newValue;
}
示例2: ARTran_SubID_FieldDefaulting
protected override void ARTran_SubID_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e)
{
if (e.Row != null && string.IsNullOrEmpty(((ARTran)e.Row).SOOrderType) == false)
{
ARTran tran = (ARTran)e.Row;
if (tran != null && tran.AccountID != null)
{
PXResult<InventoryItem, INPostClass, INSite> item = (PXResult<InventoryItem, INPostClass, INSite>)PXSelectJoin<InventoryItem, LeftJoin<INPostClass, On<INPostClass.postClassID, Equal<InventoryItem.postClassID>>, CrossJoin<INSite>>, Where<InventoryItem.inventoryID, Equal<Required<ARTran.inventoryID>>, And<INSite.siteID, Equal<Required<ARTran.siteID>>>>>.Select(this, tran.InventoryID, tran.SiteID);
ReasonCode reasoncode = PXSelectJoin<ReasonCode, InnerJoin<SOLine, On<SOLine.reasonCode, Equal<ReasonCode.reasonCodeID>>>, Where<SOLine.orderNbr, Equal<Required<ARTran.sOOrderNbr>>, And<SOLine.lineNbr, Equal<Required<ARTran.sOOrderLineNbr>>>>>.Select(this, tran.SOOrderNbr, tran.SOOrderLineNbr);
EPEmployee employee = (EPEmployee)PXSelectJoin<EPEmployee, InnerJoin<SOOrder, On<EPEmployee.userID, Equal<SOOrder.ownerID>>>,Where<SOOrder.orderNbr, Equal<Required<ARTran.sOOrderNbr>>>>.Select(this, tran.SOOrderNbr);
Location companyloc =
(Location)PXSelectJoin<Location, InnerJoin<BAccountR, On<Location.bAccountID, Equal<BAccountR.bAccountID>, And<Location.locationID, Equal<BAccountR.defLocationID>>>, InnerJoin<Branch, On<BAccountR.bAccountID, Equal<Branch.bAccountID>>>>, Where<Branch.branchID, Equal<Required<ARTran.branchID>>>>.Select(this, tran.BranchID);
Location customerloc = location.Current;
SalesPerson salesperson = (SalesPerson)PXSelect<SalesPerson, Where<SalesPerson.salesPersonID, Equal<Current<ARTran.salesPersonID>>>>.Select(this);
object item_SubID = GetValue<InventoryItem.salesSubID>((InventoryItem)item);
object site_SubID = GetValue<INSite.salesSubID>((INSite)item);
object postclass_SubID = GetValue<INPostClass.salesSubID>((INPostClass)item);
object customer_SubID = GetValue<Location.cSalesSubID>(customerloc);
object employee_SubID = GetValue<EPEmployee.salesSubID>(employee);
object company_SubID = GetValue<Location.cMPSalesSubID>(companyloc);
object salesperson_SubID = GetValue<SalesPerson.salesSubID>(salesperson);
object reasoncode_SubID = GetValue<ReasonCode.salesSubID>(reasoncode);
object value = null;
try
{
value = SOSalesSubAccountMaskAttribute.MakeSub<SOOrderType.salesSubMask>(this, soordertype.Current.SalesSubMask,
new object[]
{
item_SubID,
site_SubID,
postclass_SubID,
customer_SubID,
employee_SubID,
company_SubID,
salesperson_SubID,
reasoncode_SubID
},
new Type[]
{
typeof(InventoryItem.salesSubID),
typeof(INSite.salesSubID),
typeof(INPostClass.salesSubID),
typeof(Location.cSalesSubID),
typeof(EPEmployee.salesSubID),
typeof(Location.cMPSalesSubID),
typeof(SalesPerson.salesSubID),
typeof(ReasonCode.subID)
});
sender.RaiseFieldUpdating<ARTran.subID>(tran, ref value);
}
catch (PXMaskArgumentException ex)
{
sender.RaiseExceptionHandling<ARTran.subID>(e.Row, null, new PXSetPropertyException(ex.Message));
value = null;
}
catch (PXSetPropertyException ex)
{
sender.RaiseExceptionHandling<ARTran.subID>(e.Row, value, ex);
value = null;
}
e.NewValue = (int?)value;
e.Cancel = true;
}
}
else
{
base.ARTran_SubID_FieldDefaulting(sender, e);
}
}