public EquipmentSetupMaint() : base() { FSEquipmentSetup setup = PXSelectReadonly <FSEquipmentSetup> .Select(this); if (setup == null) { throw new PXSetupNotEnteredException(ErrorMessages.SetupNotEntered, typeof(FSEquipmentSetup), DACHelper.GetDisplayName(typeof(FSSetup))); } }
protected virtual void _(Events.RowSelected <FSEquipmentSetup> e) { if (e.Row == null) { return; } FSEquipmentSetup fsEquipmentSetupRow = (FSEquipmentSetup)e.Row; EnableDisable_Document(e.Cache, fsEquipmentSetupRow); FSPostTo.SetLineTypeList <FSEquipmentSetup.contractPostTo>(e.Cache, e.Row); }
protected virtual void _(Events.FieldUpdated <FSEquipmentSetup, FSEquipmentSetup.contractPostTo> e) { if (e.Row == null) { return; } FSEquipmentSetup fsEquipmentSetupRow = (FSEquipmentSetup)e.Row; if (fsEquipmentSetupRow.ContractPostTo != (string)e.OldValue) { SharedFunctions.ValidatePostToByFeatures <FSEquipmentSetup.contractPostTo>(e.Cache, fsEquipmentSetupRow, fsEquipmentSetupRow.ContractPostTo); } }
protected virtual void _(Events.FieldVerifying <FSEquipmentSetup, FSEquipmentSetup.contractPostTo> e) { if (e.Row == null) { return; } FSEquipmentSetup fsEquipmentSetupRow = (FSEquipmentSetup)e.Row; if ((string)e.NewValue == ID.Contract_PostTo.SALES_ORDER_INVOICE) { e.Cache.RaiseExceptionHandling <FSEquipmentSetup.contractPostTo>(fsEquipmentSetupRow, null, new PXSetPropertyException(TX.Error.SOINVOICE_FROM_CONTRACT_NOT_IMPLEMENTED, PXErrorLevel.Error)); } }
protected virtual void _(Events.RowPersisting <FSEquipmentSetup> e) { if (e.Row == null) { return; } FSEquipmentSetup fsEquipmentSetupRow = (FSEquipmentSetup)e.Row; if (fsEquipmentSetupRow.ContractPostTo == ID.Contract_PostTo.SALES_ORDER_INVOICE) { e.Cache.RaiseExceptionHandling <FSEquipmentSetup.contractPostTo>(fsEquipmentSetupRow, null, new PXSetPropertyException(TX.Error.SOINVOICE_FROM_CONTRACT_NOT_IMPLEMENTED, PXErrorLevel.Error)); } SharedFunctions.ValidatePostToByFeatures <FSEquipmentSetup.contractPostTo>(e.Cache, fsEquipmentSetupRow, fsEquipmentSetupRow.ContractPostTo); }