protected virtual void INLocation_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { string cd; if (site.Current != null && IsImport && (cd = ((INLocation)e.Row).LocationCD) != null) { if (_WrongLocations[0] == cd) { site.Current.ReceiptLocationID = ((INLocation)e.Row).LocationID; _WrongLocations[0] = null; } if (_WrongLocations[1] == cd) { site.Current.ReturnLocationID = ((INLocation)e.Row).LocationID; _WrongLocations[1] = null; } if (_WrongLocations[2] == cd) { site.Current.DropShipLocationID = ((INLocation)e.Row).LocationID; _WrongLocations[2] = null; } if (_WrongLocations[3] == cd) { site.Current.ShipLocationID = ((INLocation)e.Row).LocationID; _WrongLocations[3] = null; } } }
protected virtual void ARTran_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { if (Base.Document.Current.IsRetainageDocument != true && ((ARTran)e.Row).TaskID != null && Base.Document.Current.ProformaExists != true) { AddToInvoiced((ARTran)e.Row, GetProjectedAccountGroup((ARTran)e.Row), (int)ARDocType.SignAmount(((ARTran)e.Row).TranType).GetValueOrDefault(1)); } }
protected virtual void Tax_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { if ((_TaxCalc != TaxCalc.NoCalc && e.ExternalCall || _TaxCalc == TaxCalc.ManualCalc)) { VerifyTaxID(sender, e.Row, e.ExternalCall); } }
protected virtual void WZScenario_RowInserted(PXCache cache, PXRowInsertedEventArgs e) { WZScenario row = (WZScenario)e.Row; if (row != null && row.ScenarioID != null) { row = PXSelectReadonly <WZScenario, Where <WZScenario.scenarioID, Equal <Required <WZScenario.scenarioID> > > > .Select(this, row.ScenarioID); if (row != null) { if (row.ScheduleID != null) { cache.RaiseExceptionHandling <WZScenario.scenarioID>(row, row.ScenarioID, new PXSetPropertyException(Messages.ScenarioAlreadyUsed, row.ScheduleID)); } Scenarios.Delete(row); Scenarios.Update(row); } else { row = (WZScenario)e.Row; Scenarios.Delete(row); cache.RaiseExceptionHandling <WZScenario.scenarioID>(row, row.ScenarioID, new PXSetPropertyException(Messages.ScenarioReferenceIsNotValid)); } } }
protected virtual void RevalueFilter_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { if (((RevalueFilter)e.Row).CuryEffDate != null) { ((RevalueFilter)e.Row).CuryEffDate = ((DateTime)((RevalueFilter)e.Row).CuryEffDate).AddDays(-1); } }
protected virtual void Address_RowInserted(PXCache cache, PXRowInsertedEventArgs e) { if (e.Row != null && this.BAccount.Current.DefAddressID == null) { this.BAccount.Current.DefAddressID = ((Address)e.Row).AddressID; } }
protected virtual void LocationAPPaymentInfo_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { LocationAPPaymentInfo record = (LocationAPPaymentInfo)e.Row; record.IsRemitAddressSameAsMain = object.Equals(record.VDefAddressID, record.VRemitAddressID); record.IsRemitContactSameAsMain = object.Equals(record.VDefContactID, record.VRemitContactID); }
protected virtual void DRScheduleDetail_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { DRScheduleDetail row = e.Row as DRScheduleDetail; if (row != null && Schedule.Current != null) { row.Status = DRScheduleStatus.Draft; row.IsCustom = true; row.ScheduleID = Schedule.Current.ScheduleID; SyncProperties(Schedule.Current, row); if (row.ComponentID == null) { row.ComponentID = DRScheduleDetail.EmptyComponentID; } } InventoryItem item = PXSelect <InventoryItem, Where <InventoryItem.inventoryID, Equal <Required <DRScheduleDetail.componentID> > > > .Select(this, row.ComponentID); if (item != null) { row.AccountID = row.Module == BatchModule.AP ? item.COGSAcctID : item.SalesAcctID; row.SubID = row.Module == BatchModule.AP ? item.COGSSubID : item.SalesSubID; DRDeferredCode defCode = PXSelect <DRDeferredCode, Where <DRDeferredCode.deferredCodeID, Equal <Required <DRScheduleDetail.defCode> > > > .Select(this, item.DeferredCode); if (defCode != null) { row.DefCode = defCode.DeferredCodeID; row.DefAcctID = defCode.AccountID; row.DefSubID = defCode.SubID; } } }
public override void RowInserted(PXCache sender, PXRowInsertedEventArgs e) { bool previsDirty = sender.IsDirty; base.RowInserted(sender, e); sender.IsDirty = previsDirty; }
protected override void RelationGroup_RowInserted(PXCache cache, PXRowInsertedEventArgs e) { base.RelationGroup_RowInserted(cache, e); PX.SM.RelationGroup group = (PX.SM.RelationGroup)e.Row; group.SpecificModule = typeof(inventoryModule).Namespace; group.SpecificType = typeof(InventoryItem).FullName; }
protected virtual void TermsInstallments_RowInserted(PXCache cache, PXRowInsertedEventArgs e) { Terms term = this.TermsDef.Current; term.InstallmentCntr++; this.TermsDef.Cache.Update(term); }
protected virtual void BatchSelection_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { BatchSelection batch = (BatchSelection)e.Row; if (batch != null && !String.IsNullOrWhiteSpace(batch.Module) && !String.IsNullOrWhiteSpace(batch.BatchNbr)) { batch = PXSelectReadonly <BatchSelection, Where <BatchSelection.module, Equal <Required <BatchSelection.module> >, And <BatchSelection.batchNbr, Equal <Required <BatchSelection.batchNbr> > > > > .Select(this, batch.Module, batch.BatchNbr); PXSelectorAttribute selectorAttr = (PXSelectorAttribute)sender.GetAttributesReadonly <BatchSelection.batchNbr>(batch).Find( (PXEventSubscriberAttribute attr) => { return(attr is PXSelectorAttribute); }); BqlCommand selectorSearch = selectorAttr.GetSelect(); if (batch != null && selectorSearch.Meet(sender, batch)) { Batch_Detail.Delete(batch); Batch_Detail.Update(batch); } else { batch = (BatchSelection)e.Row; sender.RaiseExceptionHandling <BatchSelection.batchNbr>(batch, batch.BatchNbr, new PXSetPropertyException(Messages.BatchNbrNotValid)); Batch_Detail.Delete(batch); } } }
public void RowInserted(PXCache cache, PXRowInsertedEventArgs e) { if (AutoCalculateMasterPeriod) { SetMasterPeriodID(cache, e.Row); } }
protected virtual void Batch_RowInserted(PXCache sender, PXRowInsertedEventArgs e, PXRowInserted bs) { if (bs != null) { bs(sender, e); } if (Base.IsWithinContext) { string vb = Base.GetContextValue <GLVoucherBatch.voucherBatchNbr>(); string wbID = Base.GetContextValue <GLVoucherBatch.workBookID>(); this.VoucherBatch.Current = this.VoucherBatch.Select(wbID, vb); GLWorkBook wb = PXSelect <GLWorkBook, Where <GLWorkBook.workBookID, Equal <Required <GLVoucherBatch.workBookID> > > > .Select(this.Base, Base.GetContextValue <GLVoucherBatch.workBookID>()); if (!String.IsNullOrEmpty(vb)) { Guid?noteID = PXNoteAttribute.GetNoteID <Batch.noteID>(sender, e.Row); this.Voucher.Insert(new GLVoucher()); this.Voucher.Cache.IsDirty = false; Base.Caches[typeof(Note)].IsDirty = false; } if (wb.DefaultDescription != null && (e.Row as Batch)?.Description == null) { sender.SetValueExt <Batch.description>(e.Row, wb.DefaultDescription); } } }
protected virtual void DocumentSelection_RowInserted(PXCache cache, PXRowInsertedEventArgs e) { DocumentSelection document = (DocumentSelection)e.Row; if (document != null && !String.IsNullOrWhiteSpace(document.DocType) && !String.IsNullOrWhiteSpace(document.RefNbr)) { document = PXSelectReadonly < DocumentSelection, Where < DocumentSelection.docType, Equal <Required <DocumentSelection.docType> >, And <DocumentSelection.refNbr, Equal <Required <DocumentSelection.refNbr> > > > > .Select(this, document.DocType, document.RefNbr); if (document != null) { Document_Detail.Delete(document); Document_Detail.Update(document); } else { document = (DocumentSelection)e.Row; Document_Detail.Delete(document); cache.RaiseExceptionHandling <DocumentSelection.refNbr>(document, document.RefNbr, new PXSetPropertyException(AP.Messages.ReferenceNotValid)); } } }
protected virtual void INTran_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { INTran row = e.Row as INTran; if (row != null && (row.OrigModule == BatchModule.SO || row.OrigModule == BatchModule.PO)) { INRegister doc = (INRegister)PXParentAttribute.SelectParent(sender, e.Row, typeof(INRegister)); if (doc != null) { PXCache cache = issue.Cache; object copy = cache.CreateCopy(doc); doc.SOShipmentType = row.SOShipmentType; doc.SOShipmentNbr = row.SOShipmentNbr; doc.SOOrderType = row.SOOrderType; doc.SOOrderNbr = row.SOOrderNbr; doc.POReceiptType = row.POReceiptType; doc.POReceiptNbr = row.POReceiptNbr; if (!object.Equals(doc, cache.Current)) { cache.Update(doc); } else { if (cache.GetStatus(doc) == PXEntryStatus.Notchanged || cache.GetStatus(doc) == PXEntryStatus.Held) { cache.SetStatus(doc, PXEntryStatus.Updated); } cache.RaiseRowUpdated(doc, copy); } } } }
protected virtual void ContractTemplate_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { ContractTemplate row = e.Row as ContractTemplate; if (row != null) { ContractBillingSchedule schedule = new ContractBillingSchedule(); schedule.ContractID = row.ContractID; Billing.Insert(schedule); PXStringState state = SLAMapping.Cache.GetStateExt <ContractSLAMapping.severity>(null) as PXStringState; if (state != null && state.AllowedValues != null && state.AllowedValues.Length > 0) { foreach (string severity in state.AllowedValues) { ContractSLAMapping sla = new ContractSLAMapping(); sla.ContractID = row.ContractID; sla.Severity = severity; SLAMapping.Insert(sla); } } Billing.Cache.IsDirty = false; SLAMapping.Cache.IsDirty = false; } }
public override void RowInserted(PXCache sender, PXRowInsertedEventArgs e) { bool previousIsDirty = sender.Graph.Caches[_RecordType].IsDirty; base.RowInserted(sender, e); sender.Graph.Caches[_RecordType].IsDirty = previousIsDirty; }
protected virtual void CRSetup_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { CROpportunityProbability p = OpportunityProbabilities.Select(); if (p == null) { p.StageCode = "A"; p.Probability = 60; OpportunityProbabilities.Insert(p); p.StageCode = "L"; p.Probability = 0; OpportunityProbabilities.Insert(p); p.StageCode = "P"; p.Probability = 10; OpportunityProbabilities.Insert(p); p.StageCode = "Q"; p.Probability = 20; OpportunityProbabilities.Insert(p); p.StageCode = "R"; p.Probability = 80; OpportunityProbabilities.Insert(p); p.StageCode = "V"; p.Probability = 40; OpportunityProbabilities.Insert(p); p.StageCode = "W"; p.Probability = 100; OpportunityProbabilities.Insert(p); OpportunityProbabilities.Cache.IsDirty = false; } }
protected virtual void ARWriteOffFilter_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { if (customerclass.Current != null) { ((ARWriteOffFilter)e.Row).WOLimit = customerclass.Current.SmallBalanceLimit; return; } }
protected virtual void ShipmentLine_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { ShipmentLine line = (ShipmentLine)e.Row; Shipment row = Shipments.Current; row.TotalQty += line.LineQty; Shipments.Update(row); }
protected virtual void Contact_RowInserted(PXCache cache, PXRowInsertedEventArgs e) { if (e.Row != null && this.BAccount.Current.DefContactID == null) { cache.SetValue <Contact.contactType>(e.Row, ContactTypesAttribute.BAccountProperty); this.BAccount.Current.DefContactID = ((Contact)e.Row).ContactID; } }
protected virtual void BranchBAccount_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { this.OnBAccountRowInserted(sender, e); Company rec = Company.Select(); Company.Cache.SetStatus(rec, PXEntryStatus.Updated); }
protected virtual void POVendorInventory_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { POVendorInventory row = (POVendorInventory)e.Row; if (row != null && row.InventoryID != null && row.SubItemID != null && row.PurchaseUnit != null) { this.VendorCatalogue.View.RequestRefresh(); } }
protected virtual void INSiteStatusFilter_RowInserted(PXCache cache, PXRowInsertedEventArgs e) { INSiteStatusFilter row = (INSiteStatusFilter)e.Row; if (row != null && issue.Current != null) { row.SiteID = issue.Current.SiteID; } }
protected virtual void EPExpenseClaimDetails_RowInserted(PXCache cache, PXRowInsertedEventArgs e) { CurrencyInfo info = CurrencyInfoAttribute.SetDefaults <EPExpenseClaimDetails.curyInfoID>(cache, e.Row); if (info != null) { ((EPExpenseClaimDetails)e.Row).CuryID = info.CuryID; } }
protected virtual void TaxTotal_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { TaxTotal taxSum = sender.GetExtension <TaxTotal>(e.Row); if ((CurrentDocument.TaxCalc != TaxCalc.NoCalc && e.ExternalCall || CurrentDocument.TaxCalc == TaxCalc.ManualCalc)) { VerifyTaxID(taxSum, e.ExternalCall); } }
protected virtual void INItemCategory_RowInserted(PXCache cache, PXRowInsertedEventArgs e) { INItemCategory row = e.Row as INItemCategory; if (row != null) { PXDefaultAttribute.SetDefault <INItemCategory.categorySelected>(cache, row, false); } }
protected override void Master_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { var row = (ARTran)e.Row; if (row.InvtMult != (short)0) { base.Master_RowInserted(sender, e); } }
protected virtual void CMSetup_RowInserted(PXCache sender, PXRowInsertedEventArgs e) { if (basecurrency.Current == null) { basecurrency.Current = basecurrency.Select(); } basecurrency.Cache.MarkUpdated(basecurrency.Current); }