当前位置: 首页>>代码示例>>C#>>正文


C# PXCache.RaiseFieldUpdating方法代码示例

本文整理汇总了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;
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:9,代码来源:CurrencyInfo.cs

示例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);
			}
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:75,代码来源:SOInvoiceEntry.cs


注:本文中的PXCache.RaiseFieldUpdating方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。