protected virtual void _(Events.RowInserted <FSWFStage> e) { if (e.Row == null) { return; } FSWFStage fsWFStageRow = e.Row as FSWFStage; if (fsWFStageRow != null && Filter.Current != null) { NodeFilter.Current.ParentWFStageID = fsWFStageRow.ParentWFStageID; } }
protected virtual void _(Events.RowInserted <Document> e) { var row = e.Row as Document; if (row == null) { return; } bool oldContactDirty = GetContactCache().IsDirty; bool oldAddressDirty = GetAddressCache().IsDirty; Contact oldContact = null; Address oldAddress = null; if (row.ContactID != null) { oldContact = PXSelect <Contact, Where <Contact.contactID, Equal <Current <Document.contactID> > > > .Select(Base); oldAddress = PXSelectJoin <Address, LeftJoin <Contact, On <Contact.defAddressID, Equal <Address.addressID> > >, Where <Contact.contactID, Equal <Current <Document.contactID> > > > .Select(Base); } else if (row.LocationID != null) { oldContact = PXSelectJoin <Contact, LeftJoin <Location, On <Location.locationID, Equal <Current <Document.locationID> > > >, Where <Contact.contactID, Equal <Location.defContactID> > > .Select(Base); oldAddress = PXSelectJoin <Address, LeftJoin <Contact, On <Contact.defAddressID, Equal <Address.addressID> >, LeftJoin <Location, On <Location.locationID, Equal <Current <Document.locationID> > > > >, Where <Address.addressID, Equal <Location.defAddressID> > > .Select(Base); } ChangedData forContactInfo = new ChangedData(); forContactInfo.OldContact = oldContact; forContactInfo.OldAddress = oldAddress; DefaultRecords(row, forContactInfo, new ChangedData(false)); GetContactCache().IsDirty = oldContactDirty; GetAddressCache().IsDirty = oldAddressDirty; }
protected virtual void _(Events.RowInserted <ComplianceDocument> args) { var currentArPayment = Base.Document.Current; if (currentArPayment != null) { var complianceDocument = args.Row; if (complianceDocument != null) { complianceDocument.CustomerID = currentArPayment.CustomerID; complianceDocument.CustomerName = GetCustomerName(complianceDocument.CustomerID); complianceDocument.ArPaymentID = CreateComplianceDocumentReference(currentArPayment) .ComplianceDocumentReferenceId; complianceDocument.ArPaymentMethodID = currentArPayment.PaymentMethodID; } } }
protected virtual void _(Events.RowInserted <EPEquipment> e) { if (e.Row == null) { return; } EPEquipment epEquipmentRow = (EPEquipment)e.Row; // Inserting the corresponding Equipment record if (VehicleSelected.Current == null) { FSVehicle fsVehicleRow = new FSVehicle(); fsVehicleRow = VehicleSelected.Insert(fsVehicleRow); fsVehicleRow.SourceID = epEquipmentRow.EquipmentID; this.VehicleSelected.Cache.IsDirty = false; } }
protected virtual void _(Events.RowInserted <FSGPSTrackingLocation> e) { if (e.Row == null) { return; } FSGPSTrackingLocation fsGPSTrackingLocationRow = e.Row as FSGPSTrackingLocation; UserPreferences userPreferencesRow = Base.UserPrefs.Current; if (userPreferencesRow != null) { FSxUserPreferences fsxUserPreferencesRow = PXCache <UserPreferences> .GetExtension <FSxUserPreferences>(userPreferencesRow); fsGPSTrackingLocationRow.Interval = fsxUserPreferencesRow.Interval; fsGPSTrackingLocationRow.Distance = fsxUserPreferencesRow.Distance; } }
/// <summary>The RowInserted event handler for the <see cref="Discount" /> mapped cache extension.</summary> /// <param name="e">Parameters of the event.</param> protected virtual void _(Events.RowInserted <Discount> e) { if (!DiscountEngineGraph.IsInternalDiscountEngineCall && e.Row != null) { if (e.Row.DiscountID != null) { DiscountEngineGraph.InsertManualDocGroupDiscount(Details.Cache, Details, Discounts, e.Row, e.Row.DiscountID, null, Documents.Current.BranchID, Documents.Current.LocationID ?? 0, Documents.Current.DocumentDate, DiscountEngine.DefaultARDiscountCalculationParameters); RefreshTotalsAndFreeItems(Discounts.Cache); (Discounts.Cache as PXModelExtension <Discount>)?.UpdateExtensionMapping(e.Row); } if (DiscountEngineGraph.SetExternalManualDocDiscount(Details.Cache, Details, Discounts, e.Row, null, DiscountEngine.DefaultARDiscountCalculationParameters)) { RefreshTotalsAndFreeItems(Discounts.Cache); (Discounts.Cache as PXModelExtension <Discount>)?.UpdateExtensionMapping(e.Row); } } }
protected override void _(Events.RowInserted <Extensions.ContactAddress.Document> e) { var row = e.Row as Extensions.ContactAddress.Document; if (row == null) { return; } bool oldContactDirty = GetContactCache().IsDirty; bool oldAddressDirty = GetAddressCache().IsDirty; int?branchLocationID = (int?)e.Cache.GetValue <FSServiceOrder.branchLocationID>(row); SetDefaultContactAndAddress(e.Cache, e.Row, row.ContactID, row.LocationID, branchLocationID, ContacAddressCallerEnum.Insert); GetContactCache().IsDirty = oldContactDirty; GetAddressCache().IsDirty = oldAddressDirty; }
//Insert the default detail record. protected virtual void _(Events.RowInserted <RSSVRepairPrice> e) { if (Warranty.Select().Count == 0) { bool oldDirty = Warranty.Cache.IsDirty; // Retrieve the default warranty. Contract defaultWarranty = (Contract)DefaultWarranty.Select(); if (defaultWarranty != null) { RSSVWarranty line = new RSSVWarranty(); line.ContractID = defaultWarranty.ContractID; line.DefaultWarranty = true; // Insert the data record into // the cache of the Warranty data view. Warranty.Insert(line); // Clear the flag that indicates in the UI whether the cache // contains changes. Warranty.Cache.IsDirty = oldDirty; } } }
protected virtual void _(Events.RowInserted <FSRouteSetup> e) { }
protected virtual void _(Events.RowInserted <EPEmployee> e) { }
protected virtual void _(Events.RowInserted <FSGeoZoneEmp> e) { }
protected virtual void _(Events.RowInserted <FSLicense> e) { }
protected virtual void _(Events.RowInserted <FSEmployeeSkill> e) { }
protected virtual void _(Events.RowInserted <StoragePlaceEnq.StoragePlaceFilter> e) => e.Cache.IsDirty = false;
protected virtual void _(Events.RowInserted <CROpportunityProducts> e) { InvalidateExternalTax(Base.Opportunity.Current); }
protected virtual void _(Events.RowInserted <EPTimeCard> e) { }
protected virtual void _(Events.RowInserted <CROpportunityProducts> e) { }
protected virtual void _(Events.RowInserted <APTran> e) { }
protected virtual void _(Events.RowInserted <ARPayment> e) { }
protected virtual void _(Events.RowInserted <FSRouteDocument> e) { }
protected virtual void _(Events.RowInserted <CROpportunityDiscountDetail> e) { InvalidateExternalTax(Base.Opportunity.Current); }
protected virtual void _(Events.RowInserted <SOInvoice> e) { PXLongOperation.StartOperation(this, null); }
protected virtual void _(Events.RowInserted <FSAdjust> e) { }
protected virtual void _(Events.RowInserted <DescriptionGenerationRule> eventArgs) { GenerationRuleRowInserted(eventArgs.Cache, eventArgs.Row); ResetValue <InventoryItem.sampleDescription>(); }
protected virtual void _(Events.RowInserted <APInvoice> e) { }
protected virtual void _(Events.RowInserted <SOInvoice> e) { throw new NotSupportedException(); }
protected virtual void _(Events.RowInserted <TimeCardMaint.EPTimecardDetail> e) { }
protected virtual void _(Events.RowInserted <Users> e) { }
protected virtual void _(Events.RowInserted <FSServiceTemplate> e) { }
protected virtual void _(Events.RowInserted <UserPreferences> e) { }