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


C# PXCache.SetDefaultExt方法代码示例

本文整理汇总了C#中PXCache.SetDefaultExt方法的典型用法代码示例。如果您正苦于以下问题:C# PXCache.SetDefaultExt方法的具体用法?C# PXCache.SetDefaultExt怎么用?C# PXCache.SetDefaultExt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PXCache的用法示例。


在下文中一共展示了PXCache.SetDefaultExt方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: defaultCuryRate

		private void defaultCuryRate(PXCache cache, bool ForceDefault)
		{
			CurrencyRate rate = getCuryRate(cache);
			if (rate != null)
			{
				DateTime? UserCuryEffDate = CuryEffDate;

				CuryEffDate = rate.CuryEffDate;
				CuryRate = Math.Round((decimal)rate.CuryRate, 8);
				CuryMultDiv = rate.CuryMultDiv;
				RecipRate = Math.Round((decimal)rate.RateReciprocal, 8);

				if (rate.CuryEffDate < UserCuryEffDate)
				{
					CurrencyRateType ratetype = (CurrencyRateType)PXSelectorAttribute.Select<CurrencyInfo.curyRateTypeID>(cache, this);
					if (ratetype != null && ratetype.RateEffDays > 0 && ((TimeSpan)(UserCuryEffDate - rate.CuryEffDate)).Days > ratetype.RateEffDays)
					{
						throw new PXRateIsNotDefinedForThisDateException(rate.CuryRateType, rate.FromCuryID, rate.ToCuryID, (DateTime)UserCuryEffDate);
					}
				}
			}
			else if (ForceDefault)
			{
				if (object.Equals(this._CuryID, this._BaseCuryID))
				{
					bool dirty = cache.IsDirty;
					CurrencyInfo dflt = new CurrencyInfo();
					cache.SetDefaultExt<CurrencyInfo.curyRate>(dflt);
					cache.SetDefaultExt<CurrencyInfo.curyMultDiv>(dflt);
					cache.SetDefaultExt<CurrencyInfo.recipRate>(dflt);
					CuryRate = Math.Round((decimal)dflt.CuryRate, 8);
					CuryMultDiv = dflt.CuryMultDiv;
					RecipRate = Math.Round((decimal)dflt.RecipRate, 8);
					cache.IsDirty = dirty;
				}
				else if (this._CuryRateTypeID == null || this._CuryEffDate == null)
				{
					this.CuryRate = null;
					this.RecipRate = null;
					this.CuryMultDiv = "M"; 
				}
				else
				{
					this.CuryRate = null;
					this.RecipRate = null;
					this.CuryMultDiv = "M";
					throw new PXSetPropertyException(Messages.RateNotFound, PXErrorLevel.Warning);
				}
			}
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:50,代码来源:CurrencyInfo.cs

示例2: LocationAPPaymentInfo_VPaymentMethodID_FieldUpdated

		protected virtual void LocationAPPaymentInfo_VPaymentMethodID_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
		{
			string oldValue = (string)e.OldValue; 
			LocationAPPaymentInfo row = (LocationAPPaymentInfo)e.Row;
			if (!String.IsNullOrEmpty(oldValue))
			{
				this.ClearPaymentDetails((LocationAPPaymentInfo)e.Row, oldValue, true);
			}
			this.FillPaymentDetails((LocationAPPaymentInfo)e.Row);
			sender.SetDefaultExt<LocationAPPaymentInfo.vCashAccountID>(e.Row);			
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:11,代码来源:VendorLocationMaint.cs

示例3: SOFreightDetail_AccountID_FieldUpdated

		protected virtual void SOFreightDetail_AccountID_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
		{
			SOFreightDetail row = e.Row as SOFreightDetail;
			if (row != null && row.TaskID == null)
			{
				sender.SetDefaultExt<SOFreightDetail.taskID>(e.Row);
			}
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:8,代码来源:SOInvoiceEntry.cs

示例4: ARTran_Qty_FieldUpdated

		protected override void ARTran_Qty_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
		{
			base.ARTran_Qty_FieldUpdated(sender, e);
			ARTran row = e.Row as ARTran;
			if (row != null)
			{
				sender.SetDefaultExt<ARTran.tranDate>(row);
				sender.SetValueExt<ARTran.manualDisc>(row, false);

                if (row != null && row.InventoryID != null && row.UOM != null && row.IsFree != true)
                {
                    string customerPriceClass = ARPriceClass.EmptyPriceClass;
                    Location c = location.Select();
                    if (c != null && !string.IsNullOrEmpty(c.CPriceClassID))
                        customerPriceClass = c.CPriceClassID;

                    DateTime date = Document.Current.DocDate.Value;

                    if (row.TranType == ARDocType.CreditMemo && row.OrigInvoiceDate != null)
                    {
                        date = row.OrigInvoiceDate.Value;
                    }

                    decimal? price = ARSalesPriceMaint.CalculateSalesPrice(sender, customerPriceClass, row.CustomerID, row.InventoryID, currencyinfo.Select(), row.UOM, row.Qty, date, row.CuryUnitPrice);
                    if (price != null)
                    sender.SetValueExt<ARTran.curyUnitPrice>(e.Row, price);
                }
			}
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:29,代码来源:SOInvoiceEntry.cs

示例5: ARTran_UOM_FieldUpdated

		protected override void ARTran_UOM_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
		{
			sender.SetDefaultExt<ARTran.unitPrice>(e.Row);
			sender.SetValue<ARTran.unitPrice>(e.Row, null);
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:5,代码来源:SOInvoiceEntry.cs

示例6: ARTran_InventoryID_FieldUpdated

		protected override void ARTran_InventoryID_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
		{
			if (((ARTran)e.Row).SOOrderNbr == null)
			{
				sender.SetDefaultExt<ARTran.lineType>(e.Row);
			}

			base.ARTran_InventoryID_FieldUpdated(sender, e);
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:9,代码来源:SOInvoiceEntry.cs

示例7: SOInvoice_PMInstanceID_FieldUpdated

		protected virtual void SOInvoice_PMInstanceID_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
		{
			//sender.SetDefaultExt<SOInvoice.paymentMethodID>(e.Row);
			sender.SetDefaultExt<SOInvoice.cashAccountID>(e.Row);
			sender.SetDefaultExt<SOInvoice.isCCCaptureFailed>(e.Row);
			sender.SetValueExt<SOInvoice.refTranExtNbr>(e.Row, null);
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:7,代码来源:SOInvoiceEntry.cs

示例8: SOInvoice_PaymentMethodID_FieldUpdated

 protected virtual void SOInvoice_PaymentMethodID_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
 {
     sender.SetDefaultExt<SOInvoice.pMInstanceID>(e.Row);
     sender.SetDefaultExt<SOInvoice.cashAccountID>(e.Row);
     sender.SetDefaultExt<SOInvoice.isCCCaptureFailed>(e.Row);
 }
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:6,代码来源:SOInvoiceEntry.cs


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