本文整理汇总了C#中PXCache.ObjectsEqual方法的典型用法代码示例。如果您正苦于以下问题:C# PXCache.ObjectsEqual方法的具体用法?C# PXCache.ObjectsEqual怎么用?C# PXCache.ObjectsEqual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PXCache
的用法示例。
在下文中一共展示了PXCache.ObjectsEqual方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LocationAPPaymentInfo_RowUpdated
protected virtual void LocationAPPaymentInfo_RowUpdated(PXCache sender, PXRowUpdatedEventArgs e)
{
LocationAPPaymentInfo record = (LocationAPPaymentInfo)e.Row;
if (!sender.ObjectsEqual<LocationAPPaymentInfo.vCashAccountID, LocationAPPaymentInfo.vPaymentMethodID, LocationAPPaymentInfo.vPaymentLeadTime, LocationAPPaymentInfo.vPaymentByType, LocationAPPaymentInfo.vSeparateCheck, LocationAPPaymentInfo.isRemitAddressSameAsMain, LocationAPPaymentInfo.isRemitContactSameAsMain>(e.Row, e.OldRow))
{
Location mainloc = Location.Current;
mainloc.VCashAccountID = record.VCashAccountID;
mainloc.VPaymentMethodID = record.VPaymentMethodID;
mainloc.VPaymentLeadTime = record.VPaymentLeadTime;
mainloc.VPaymentByType = record.VPaymentByType;
mainloc.VSeparateCheck = record.VSeparateCheck;
mainloc.IsRemitAddressSameAsMain = record.IsRemitAddressSameAsMain;
mainloc.VRemitAddressID = record.VRemitAddressID;
mainloc.IsRemitContactSameAsMain = record.IsRemitContactSameAsMain;
mainloc.VRemitContactID = record.VRemitContactID;
if (Location.Cache.GetStatus(mainloc) == PXEntryStatus.Notchanged)
{
Location.Cache.SetStatus(mainloc, PXEntryStatus.Updated);
}
sender.Graph.Caches[typeof (Location)].IsDirty = true;
}
}
示例2: LocationAPAccountSub_RowUpdated
protected virtual void LocationAPAccountSub_RowUpdated(PXCache sender, PXRowUpdatedEventArgs e)
{
LocationAPAccountSub record = (LocationAPAccountSub)e.Row;
if (!sender.ObjectsEqual<LocationAPAccountSub.vAPAccountID, LocationAPAccountSub.vAPSubID>(e.Row, e.OldRow))
{
Location mainloc = Location.Current;
mainloc.VAPAccountID = record.VAPAccountID;
mainloc.VAPSubID = record.VAPSubID;
if (Location.Cache.GetStatus(mainloc) == PXEntryStatus.Notchanged)
{
Location.Cache.SetStatus(mainloc, PXEntryStatus.Updated);
}
}
}
示例3: ARTran_RowUpdated
protected override void ARTran_RowUpdated(PXCache sender, PXRowUpdatedEventArgs e)
{
ARTran row = (ARTran)e.Row;
ARTran oldRow = (ARTran)e.OldRow;
if (row != null)
{
if (!sender.ObjectsEqual<ARTran.qty,
ARTran.uOM>(e.OldRow, e.Row))
{
SetFlatUnitPrice(sender, row);
}
if (!sender.ObjectsEqual<ARTran.branchID>(e.Row, e.OldRow) || !sender.ObjectsEqual<ARTran.inventoryID>(e.Row, e.OldRow) ||
!sender.ObjectsEqual<ARTran.qty>(e.Row, e.OldRow) || !sender.ObjectsEqual<ARTran.curyUnitPrice>(e.Row, e.OldRow) ||
!sender.ObjectsEqual<ARTran.curyExtPrice>(e.Row, e.OldRow) || !sender.ObjectsEqual<ARTran.curyDiscAmt>(e.Row, e.OldRow) ||
!sender.ObjectsEqual<ARTran.discPct>(e.Row, e.OldRow) || !sender.ObjectsEqual<ARTran.manualDisc>(e.Row, e.OldRow) ||
!sender.ObjectsEqual<ARTran.discountID>(e.Row, e.OldRow))
RecalculateDiscounts(sender, row);
TaxAttribute.Calculate<ARTran.taxCategoryID>(sender, e);
//if any of the fields that was saved in avalara has changed mark doc as TaxInvalid.
if (SODocument.Current != null && IsExternalTax == true &&
!sender.ObjectsEqual<ARTran.accountID, ARTran.inventoryID, ARTran.tranDesc, ARTran.tranAmt, ARTran.tranDate, ARTran.taxCategoryID>(e.Row, e.OldRow))
{
if (SODocument.Current != null && SODocument.Current.IsTaxValid == true)
{
SODocument.Current.IsTaxValid = false;
if (SODocument.Cache.GetStatus(SODocument.Current) == PXEntryStatus.Notchanged)
SODocument.Cache.SetStatus(SODocument.Current, PXEntryStatus.Updated);
}
if (Document.Current != null)
{
Document.Current.IsTaxValid = false;
if (Document.Cache.GetStatus(Document.Current) == PXEntryStatus.Notchanged)
Document.Cache.SetStatus(Document.Current, PXEntryStatus.Updated);
}
}
}
}
示例4: ARInvoice_RowUpdated
protected override void ARInvoice_RowUpdated(PXCache sender, PXRowUpdatedEventArgs e)
{
ARSetup.Current.RequireControlTotal = (((ARInvoice)e.Row).DocType == ARDocType.CashSale || ((ARInvoice)e.Row).DocType == ARDocType.CashReturn) ? true : ARSetup.Current.RequireControlTotal;
base.ARInvoice_RowUpdated(sender, e);
ARInvoice doc = e.Row as ARInvoice;
if ((doc.DocType == ARDocType.CashSale || doc.DocType == ARDocType.CashReturn) && doc.Released != true)
{
if (sender.ObjectsEqual<ARInvoice.curyDocBal, ARInvoice.curyOrigDiscAmt>(e.Row, e.OldRow) == false && doc.CuryDocBal - doc.CuryOrigDiscAmt != doc.CuryOrigDocAmt)
{
if (doc.CuryDocBal != null && doc.CuryOrigDiscAmt != null && doc.CuryDocBal != 0)
sender.SetValueExt<ARInvoice.curyOrigDocAmt>(doc, doc.CuryDocBal - doc.CuryOrigDiscAmt);
else
sender.SetValueExt<ARInvoice.curyOrigDocAmt>(doc, 0m);
}
else if (sender.ObjectsEqual<ARInvoice.curyOrigDocAmt>(e.Row, e.OldRow) == false)
{
if (doc.CuryDocBal != null && doc.CuryOrigDocAmt != null && doc.CuryDocBal != 0)
sender.SetValueExt<ARInvoice.curyOrigDiscAmt>(doc, doc.CuryDocBal - doc.CuryOrigDocAmt);
else
sender.SetValueExt<ARInvoice.curyOrigDiscAmt>(doc, 0m);
}
}
if ((doc.DocType == ARDocType.CashSale || doc.DocType == ARDocType.CashReturn) && doc.Released != true && doc.Hold != true)
{
if (doc.CuryDocBal < doc.CuryOrigDocAmt)
{
sender.RaiseExceptionHandling<ARInvoice.curyOrigDocAmt>(doc, doc.CuryOrigDocAmt, new PXSetPropertyException(AR.Messages.CashSaleOutOfBalance));
}
else
{
sender.RaiseExceptionHandling<ARInvoice.curyOrigDocAmt>(doc, doc.CuryOrigDocAmt, null);
}
}
if (!sender.ObjectsEqual<ARInvoice.customerID, ARInvoice.docDate, ARInvoice.finPeriodID, ARInvoice.curyTaxTotal, ARInvoice.curyOrigDocAmt, ARInvoice.docDesc, ARInvoice.curyOrigDiscAmt>(e.Row, e.OldRow))
{
SODocument.Current = (SOInvoice)SODocument.Select() ?? (SOInvoice)SODocument.Cache.Insert();
SODocument.Current.CustomerID = ((ARInvoice)e.Row).CustomerID;
if ((((ARInvoice)e.Row).DocType == ARDocType.CashSale
|| ((ARInvoice)e.Row).DocType == ARDocType.CashReturn
|| ((ARInvoice)e.Row).DocType == ARDocType.Invoice) && !sender.ObjectsEqual<ARInvoice.customerID>(e.Row, e.OldRow))
{
SODocument.Cache.SetDefaultExt<SOInvoice.paymentMethodID>(SODocument.Current);
SODocument.Cache.SetDefaultExt<SOInvoice.pMInstanceID>(SODocument.Current);
}
SODocument.Current.AdjDate = ((ARInvoice)e.Row).DocDate;
SODocument.Current.AdjFinPeriodID = ((ARInvoice)e.Row).FinPeriodID;
SODocument.Current.AdjTranPeriodID = ((ARInvoice)e.Row).TranPeriodID;
SODocument.Current.CuryTaxTotal = ((ARInvoice)e.Row).CuryTaxTotal;
SODocument.Current.TaxTotal = ((ARInvoice)e.Row).TaxTotal;
SODocument.Current.CuryPaymentAmt = ((ARInvoice)e.Row).CuryOrigDocAmt - ((ARInvoice)e.Row).CuryOrigDiscAmt - SODocument.Current.CuryPaymentTotal;
SODocument.Current.DocDesc = ((ARInvoice)e.Row).DocDesc;
SODocument.Current.PaymentProjectID = PM.ProjectDefaultAttribute.NonProject(this);
if (SODocument.Cache.GetStatus(SODocument.Current) == PXEntryStatus.Notchanged)
{
SODocument.Cache.SetStatus(SODocument.Current, PXEntryStatus.Updated);
}
}
}
示例5: SOInvoice_RowUpdated
protected virtual void SOInvoice_RowUpdated(PXCache sender, PXRowUpdatedEventArgs e)
{
if (!sender.ObjectsEqual<SOInvoice.curyDiscTot>(e.OldRow, e.Row))
{
AddDiscount(sender, e);
}
if (!sender.ObjectsEqual<SOInvoice.isCCCaptured>(e.Row, e.OldRow) && ((SOInvoice)e.Row).IsCCCaptured == true)
{
ARInvoice copy = (ARInvoice)Document.Cache.CreateCopy(Document.Current);
copy.CreditHold = false;
Document.Cache.Update(copy);
}
if (!sender.ObjectsEqual<SOInvoice.curyPaymentTotal>(e.OldRow, e.Row))
{
ARInvoice ardoc = Document.Search<ARInvoice.refNbr>(((SOInvoice)e.Row).RefNbr, ((SOInvoice)e.Row).DocType);
//is null on delete operation
if (ardoc != null)
{
((SOInvoice)e.Row).CuryPaymentAmt = ardoc.CuryOrigDocAmt - ardoc.CuryOrigDiscAmt - ((SOInvoice)e.Row).CuryPaymentTotal;
}
}
if (!sender.ObjectsEqual<SOInvoice.pMInstanceID, SOInvoice.paymentMethodID, SOInvoice.cashAccountID>(e.Row, e.OldRow))
{
ARInvoice ardoc = Document.Search<ARInvoice.refNbr>(((SOInvoice)e.Row).RefNbr, ((SOInvoice)e.Row).DocType);
//is null on delete operation
if (ardoc != null)
{
ardoc.PMInstanceID = ((SOInvoice)e.Row).PMInstanceID;
ardoc.PaymentMethodID = ((SOInvoice)e.Row).PaymentMethodID;
ardoc.CashAccountID = ((SOInvoice)e.Row).CashAccountID;
if (Document.Cache.GetStatus(ardoc) == PXEntryStatus.Notchanged)
{
Document.Cache.SetStatus(ardoc, PXEntryStatus.Updated);
}
}
}
}