protected virtual void Vendor_RowPersisting(PXCache cache, PXRowPersistingEventArgs e) { if (e.Row == null) { return; } var vendorRow = (Vendor)e.Row; FSxVendor fsxVendorRow = cache.GetExtension <FSxVendor>(vendorRow); if (e.Operation != PXDBOperation.Delete) { LicenseHelper.CheckStaffMembersLicense(cache.Graph, vendorRow.BAccountID, fsxVendorRow.SDEnabled, vendorRow.Status); } }
protected virtual void _(Events.RowPersisting <EPEmployee> e) { if (e.Row == null) { return; } EPEmployee epEmployeeRow = (EPEmployee)e.Row; FSxEPEmployee fsxEPEmployeeRow = PXCache <EPEmployee> .GetExtension <FSxEPEmployee>(epEmployeeRow); if (e.Operation != PXDBOperation.Delete) { LicenseHelper.CheckStaffMembersLicense(e.Cache.Graph, epEmployeeRow.BAccountID, fsxEPEmployeeRow.SDEnabled, epEmployeeRow.Status); } fsxEPEmployeeRow.IsDriver = EmployeeDriverSkills.Select().Count > 0; }
protected virtual void FSVehicle_RowPersisting(PXCache cache, PXRowPersistingEventArgs e) { if (e.Row == null || EPEquipmentRecords.Current == null) { return; } FSVehicle fsVehicleRow = (FSVehicle)e.Row; if (e.Operation != PXDBOperation.Delete && fsVehicleRow.IsVehicle == true) { LicenseHelper.CheckVehiclesLicense(cache.Graph, fsVehicleRow.SMEquipmentID, fsVehicleRow.Status); } if (e.Operation == PXDBOperation.Insert) { fsVehicleRow.RefNbr = EPEquipmentRecords.Current.EquipmentCD; fsVehicleRow.SourceRefNbr = EPEquipmentRecords.Current.EquipmentCD; } }