本文整理汇总了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);
}
}
}
示例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);
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}