protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } PMUnbilledDailySummaryAccum item = (PMUnbilledDailySummaryAccum)row; columns.Update <PMUnbilledDailySummaryAccum.billable>(item.Billable, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMUnbilledDailySummaryAccum.nonBillable>(item.NonBillable, PXDataFieldAssign.AssignBehavior.Summarize); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } POVendorInventoryPriceUpdate val = (POVendorInventoryPriceUpdate)row; columns.Update <POVendorInventoryPriceUpdate.curyID>(val.CuryID, PXDataFieldAssign.AssignBehavior.Replace); columns.Update <POVendorInventoryPriceUpdate.lastPrice>(val.LastPrice, PXDataFieldAssign.AssignBehavior.Replace); columns.Update <POVendorInventoryPriceUpdate.active>(val.Active, PXDataFieldAssign.AssignBehavior.Replace); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } PMTaskAllocTotal item = (PMTaskAllocTotal)row; columns.Update <PMTaskAllocTotal.amount>(item.Amount, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMTaskAllocTotal.quantity>(item.Quantity, PXDataFieldAssign.AssignBehavior.Summarize); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return false; } DRExpenseProjectionAccum item = (DRExpenseProjectionAccum)row; columns.Update<DRExpenseProjectionAccum.pTDProjected>(item.PTDProjected, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update<DRExpenseProjectionAccum.pTDRecognized>(item.PTDRecognized, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update<DRExpenseProjectionAccum.pTDRecognizedSamePeriod>(item.PTDRecognizedSamePeriod, PXDataFieldAssign.AssignBehavior.Summarize); return true; }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } DRExpenseProjectionAccum item = (DRExpenseProjectionAccum)row; columns.Update <DRExpenseProjectionAccum.pTDProjected>(item.PTDProjected, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <DRExpenseProjectionAccum.pTDRecognized>(item.PTDRecognized, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <DRExpenseProjectionAccum.pTDRecognizedSamePeriod>(item.PTDRecognizedSamePeriod, PXDataFieldAssign.AssignBehavior.Summarize); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } PMTaskTotal item = (PMTaskTotal)row; columns.Update <PMTaskTotal.asset>(item.Asset, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMTaskTotal.liability>(item.Liability, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMTaskTotal.income>(item.Income, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMTaskTotal.expense>(item.Expense, PXDataFieldAssign.AssignBehavior.Summarize); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } var templateItem = (TemplateItemLastModifiedUpdate)row; columns.UpdateOnly = true; columns.Update <TemplateItemLastModifiedUpdate.lastModifiedByID>(templateItem.LastModifiedByID, PXDataFieldAssign.AssignBehavior.Replace); columns.Update <TemplateItemLastModifiedUpdate.lastModifiedDateTime>(templateItem.LastModifiedDateTime, PXDataFieldAssign.AssignBehavior.Replace); columns.Update <TemplateItemLastModifiedUpdate.lastModifiedByScreenID>(templateItem.LastModifiedByScreenID, PXDataFieldAssign.AssignBehavior.Replace); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } SupplierData supplierData = (SupplierData)row; columns.Update <SupplierData.supplierPrice>(supplierData.SupplierPrice, PXDataFieldAssign.AssignBehavior.Initialize); columns.Update <SupplierData.supplierUnit>(supplierData.SupplierUnit, PXDataFieldAssign.AssignBehavior.Initialize); columns.Update <SupplierData.conversionFactor>(supplierData.ConversionFactor, PXDataFieldAssign.AssignBehavior.Initialize); columns.Update <SupplierData.lastSupplierPrice>(supplierData.LastSupplierPrice, PXDataFieldAssign.AssignBehavior.Replace); columns.Update <SupplierData.lastPurchaseDate>(supplierData.LastPurchaseDate, PXDataFieldAssign.AssignBehavior.Replace); return(true); }
//Override the PrepareInsert method. protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } RSSVEmployeeWorkOrderQty newQty = (RSSVEmployeeWorkOrderQty)row; if (newQty.NbrOfAssignedOrders != null) { // Add the restriction for the value of // RSSVEmployeeWorkOrderQty.NbrOfAssignedOrders. columns.AppendException( Messages.ExceedingMaximumNumberOfAssingedWorkOrders, new PXAccumulatorRestriction < RSSVEmployeeWorkOrderQty.nbrOfAssignedOrders>( PXComp.LE, 10)); } // Update NbrOfAssignedOrders by using Summarize. columns.Update <RSSVEmployeeWorkOrderQty.nbrOfAssignedOrders>( newQty.NbrOfAssignedOrders, PXDataFieldAssign.AssignBehavior.Summarize); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } var detailRow = (INPIDetailUpdate)row; columns.UpdateOnly = true; columns.Update <INPIDetailUpdate.finalExtVarCost>(detailRow.FinalExtVarCost, PXDataFieldAssign.AssignBehavior.Replace); columns.Update <INPIDetailUpdate.lastModifiedByID>(detailRow.LastModifiedByID, PXDataFieldAssign.AssignBehavior.Replace); columns.Update <INPIDetailUpdate.lastModifiedDateTime>(detailRow.LastModifiedDateTime, PXDataFieldAssign.AssignBehavior.Replace); columns.Update <INPIDetailUpdate.lastModifiedByScreenID>(detailRow.LastModifiedByScreenID, PXDataFieldAssign.AssignBehavior.Replace); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } columns.UpdateOnly = true; ContractDetailAcum item = (ContractDetailAcum)row; columns.Update <ContractDetailAcum.used>(item.Used, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <ContractDetailAcum.usedTotal>(item.UsedTotal, PXDataFieldAssign.AssignBehavior.Summarize); //columns.Update<ContractDetailAcum.contractID>(item.ContractID, PXDataFieldAssign.AssignBehavior.Initialize); //columns.Update<ContractDetailAcum.inventoryID>(item.InventoryID, PXDataFieldAssign.AssignBehavior.Initialize); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } var returnRow = (POReceiptLineReturnUpdate)row; columns.Update <POReceiptLineReturnUpdate.baseReturnedQty>(returnRow.BaseReturnedQty, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <POReceiptLineReturnUpdate.lastModifiedByID>(returnRow.LastModifiedByID, PXDataFieldAssign.AssignBehavior.Replace); columns.Update <POReceiptLineReturnUpdate.lastModifiedDateTime>(returnRow.LastModifiedDateTime, PXDataFieldAssign.AssignBehavior.Replace); columns.Update <POReceiptLineReturnUpdate.lastModifiedByScreenID>(returnRow.LastModifiedByScreenID, PXDataFieldAssign.AssignBehavior.Replace); if (returnRow.BaseOrigQty != null) { columns.AppendException(Messages.ReturnedQtyMoreThanReceivedQty, new PXAccumulatorRestriction <POReceiptLineReturnUpdate.baseReturnedQty>(PXComp.LE, returnRow.BaseOrigQty)); } return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } ProductQty newQty = (ProductQty)row; if (newQty.AvailQty < 0m) { columns.AppendException("Updating product quantity in stock will lead to a negative value.", new PXAccumulatorRestriction <ProductQty.availQty>(PXComp.GE, 0m)); } columns.Update <ProductQty.availQty>(newQty.AvailQty, PXDataFieldAssign.AssignBehavior.Summarize); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return(false); } PMForecastHistory item = (PMForecastHistory)row; columns.Update <PMForecastHistory.actualQty>(item.ActualQty, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMForecastHistory.curyActualAmount>(item.CuryActualAmount, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMForecastHistory.actualAmount>(item.ActualAmount, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMForecastHistory.changeOrderQty>(item.ChangeOrderQty, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMForecastHistory.curyChangeOrderAmount>(item.CuryChangeOrderAmount, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMForecastHistory.draftChangeOrderQty>(item.DraftChangeOrderQty, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update <PMForecastHistory.curyDraftChangeOrderAmount>(item.CuryDraftChangeOrderAmount, PXDataFieldAssign.AssignBehavior.Summarize); return(true); }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return false; } PMTaskAllocTotal item = (PMTaskAllocTotal)row; columns.Update<PMTaskAllocTotal.amount>(item.Amount, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update<PMTaskAllocTotal.quantity>(item.Quantity, PXDataFieldAssign.AssignBehavior.Summarize); return true; }
protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns) { if (!base.PrepareInsert(sender, row, columns)) { return false; } PMTaskTotal item = (PMTaskTotal)row; columns.Update<PMTaskTotal.asset>(item.Asset, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update<PMTaskTotal.liability>(item.Liability, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update<PMTaskTotal.income>(item.Income, PXDataFieldAssign.AssignBehavior.Summarize); columns.Update<PMTaskTotal.expense>(item.Expense, PXDataFieldAssign.AssignBehavior.Summarize); return true; }