public EmailsSyncMaint() { Object uid = this.UID; string screenid = PXSiteMap.CurrentScreenID; EMailAccountSyncFilter currentFilter = Filter.Current; SelectedItems.SetProcessDelegate(delegate(List <EMailSyncAccount> accounts) { Process(currentFilter, accounts, uid, screenid); }); SelectedItems.SetProcessCaption(ActionsMessages.Process); SelectedItems.SetProcessAllCaption(ActionsMessages.ProcessAll); SelectedItems.SetSelected <EMailSyncAccount.selected>(); OperationLog.AllowInsert = false; OperationLog.AllowUpdate = false; OperationLog.AllowDelete = false; PXUIFieldAttribute.SetEnabled(CurrentItem.Cache, null, true); ResetContacts.SetEnabled(false); ResetTasks.SetEnabled(false); ResetEvents.SetEnabled(false); ResetEmails.SetEnabled(false); this.FieldVerifying.AddHandler(typeof(EMailSyncAccount), typeof(EMailSyncAccount.contactsExportDate).Name + "_Date", EMailSyncAccount_ContactsExportDate_FieldVerifying); this.FieldVerifying.AddHandler(typeof(EMailSyncAccount), typeof(EMailSyncAccount.tasksExportDate).Name + "_Date", EMailSyncAccount_TasksExportDate_FieldVerifying); this.FieldVerifying.AddHandler(typeof(EMailSyncAccount), typeof(EMailSyncAccount.eventsExportDate).Name + "_Date", EMailSyncAccount_EventsExportDate_FieldVerifying); this.FieldVerifying.AddHandler(typeof(EMailSyncAccount), typeof(EMailSyncAccount.emailsExportDate).Name + "_Date", EMailSyncAccount_EmailsExportDate_FieldVerifying); }
protected void _(Events.RowSelected <SOOrder> e) { var row = e.Row as SOOrder; var customerIsDefined = PXSelect <LMICCustomer, Where <LMICCustomer.customerID, Equal <Required <LMICCustomer.customerID> > > > .Select(Base, row.CustomerID).TopFirst; if (row.Status == "N" && row.OrderQty > 0 && customerIsDefined != null) { CreateICPOAction.SetEnabled(true); } else { CreateICPOAction.SetEnabled(false); } // check the ICPOCreated checkbox if (row.GetExtension <SOOrderExt>()?.UsrICPOCreated == true) { Base.Document.AllowDelete = false; CreateICPOAction.SetEnabled(false); } else { Base.Document.AllowDelete = true; CreateICPOAction.SetEnabled(true); } }
protected void buttonEnable(string aVLStatus) { if (aVLStatus.Trim().Equals(dicAVLTableStatus["OnHold"])) { SubmitAction.SetEnabled(true); ApproveAction.SetEnabled(false); RejectAction.SetEnabled(false); } else if (aVLStatus.Trim().Equals(dicAVLTableStatus["Submitted"])) { SubmitAction.SetEnabled(false); ApproveAction.SetEnabled(true); RejectAction.SetEnabled(true); } else if (aVLStatus.Trim().Equals(dicAVLTableStatus["Approved"])) { SubmitAction.SetEnabled(false); ApproveAction.SetEnabled(false); RejectAction.SetEnabled(false); } else if (aVLStatus.Trim().Equals(dicAVLTableStatus["Cancelled"])) { SubmitAction.SetEnabled(false); ApproveAction.SetEnabled(false); RejectAction.SetEnabled(false); } }
protected virtual void CAEnqFilter_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { CAEnqFilter filter = (CAEnqFilter)e.Row; if (filter == null) { return; } bool ShowSummaryNotChecked = filter.ShowSummary != true; bool CashAccountNeedReconcilation = (cashaccount.Current != null) && (bool)cashaccount.Current.Reconcile; if (cashaccount.Current != null && AddFilter.Current != null && AddFilter.Current.CashAccountID != filter.AccountID) { AddFilter.Cache.SetValueExt <AddTrxFilter.cashAccountID>(AddFilter.Current, cashaccount.Current.CashAccountCD); } AddDet.SetEnabled(filter.AccountID != null); PXCache tranCache = CATranListRecords.Cache; tranCache.AllowInsert = false; tranCache.AllowUpdate = (ShowSummaryNotChecked); tranCache.AllowDelete = (ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.selected>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.hold>(tranCache, null, false); PXUIFieldAttribute.SetVisible <CATran.status>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.origModule>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.origRefNbr>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.origTranType>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.extRefNbr>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.batchNbr>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.finPeriodID>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.tranDesc>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.referenceName>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.reconciled>(tranCache, null, ShowSummaryNotChecked && CashAccountNeedReconcilation); PXUIFieldAttribute.SetVisible <CATran.clearDate>(tranCache, null, ShowSummaryNotChecked && CashAccountNeedReconcilation); PXUIFieldAttribute.SetVisible <CATran.cleared>(tranCache, null, ShowSummaryNotChecked && CashAccountNeedReconcilation); PXUIFieldAttribute.SetVisible <CATran.dayDesc>(tranCache, null, !ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATranExt.dayDesc>(tranCache, null, !ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATranExt.depositNbr>(tranCache, null, ShowSummaryNotChecked); PXUIFieldAttribute.SetVisible <CATran.referenceID>(tranCache, null, ShowSummaryNotChecked); PXCache bAcctCache = this.Caches[typeof(BAccountR)]; PXUIFieldAttribute.SetVisible <BAccountR.acctName>(bAcctCache, null, ShowSummaryNotChecked); Clearence.SetEnabled(CashAccountNeedReconcilation); AddFilter.Cache.RaiseRowSelected(AddFilter.Current); bool operationExists = PXLongOperation.Exists(UID); Save.SetEnabled(!operationExists); Release.SetEnabled(!operationExists); Clearence.SetEnabled(!operationExists); }
private void SetControlsState(PXCache cache, Schedule s) { Boolean isMonthly = (s.ScheduleType == "M"); Boolean isPeriodically = (s.ScheduleType == "P"); Boolean isWeekly = (s.ScheduleType == "W"); Boolean isDaily = (s.ScheduleType == "D"); Boolean isNotProcessed = (s.LastRunDate == null); bool isActive = (s.Active ?? false); if (isActive) { RunNow.SetEnabled(true); } else { RunNow.SetEnabled(false); } PXUIFieldAttribute.SetVisible <Schedule.dailyFrequency>(cache, s, isDaily); PXUIFieldAttribute.SetVisible <Schedule.days>(cache, s, isDaily); SetMonthlyControlsState(cache, s); PXUIFieldAttribute.SetVisible <Schedule.weeklyFrequency>(cache, s, isWeekly); PXUIFieldAttribute.SetVisible <Schedule.weeklyOnDay1>(cache, s, isWeekly); PXUIFieldAttribute.SetVisible <Schedule.weeklyOnDay2>(cache, s, isWeekly); PXUIFieldAttribute.SetVisible <Schedule.weeklyOnDay3>(cache, s, isWeekly); PXUIFieldAttribute.SetVisible <Schedule.weeklyOnDay4>(cache, s, isWeekly); PXUIFieldAttribute.SetVisible <Schedule.weeklyOnDay5>(cache, s, isWeekly); PXUIFieldAttribute.SetVisible <Schedule.weeklyOnDay6>(cache, s, isWeekly); PXUIFieldAttribute.SetVisible <Schedule.weeklyOnDay7>(cache, s, isWeekly); PXUIFieldAttribute.SetVisible <Schedule.weeks>(cache, s, isWeekly); PXUIFieldAttribute.SetVisible <Schedule.monthlyFrequency>(cache, s, isMonthly); PXUIFieldAttribute.SetVisible <Schedule.monthlyDaySel>(cache, s, isMonthly); PXUIFieldAttribute.SetVisible <Schedule.periodFrequency>(cache, s, isPeriodically); PXUIFieldAttribute.SetVisible <Schedule.periodDateSel>(cache, s, isPeriodically); PXUIFieldAttribute.SetVisible <Schedule.periodFixedDay>(cache, s, isPeriodically); PXUIFieldAttribute.SetVisible <Schedule.periods>(cache, s, isPeriodically); SetPeriodicallyControlsState(cache, s); PXUIFieldAttribute.SetEnabled <Schedule.endDate>(cache, s, !(bool)s.NoEndDate); PXUIFieldAttribute.SetEnabled <Schedule.runLimit>(cache, s, !(bool)s.NoRunLimit); PXDefaultAttribute.SetPersistingCheck <Schedule.endDate>(cache, s, (s.NoEndDate == true ? PXPersistingCheck.Nothing : PXPersistingCheck.Null)); PXUIFieldAttribute.SetEnabled <BatchSelection.module>(Batch_Detail.Cache, null, true); PXUIFieldAttribute.SetEnabled <BatchSelection.batchNbr>(Batch_Detail.Cache, null, true); PXUIFieldAttribute.SetEnabled <BatchSelection.ledgerID>(Batch_Detail.Cache, null, false); PXUIFieldAttribute.SetEnabled <BatchSelection.dateEntered>(Batch_Detail.Cache, null, false); PXUIFieldAttribute.SetEnabled <BatchSelection.finPeriodID>(Batch_Detail.Cache, null, false); PXUIFieldAttribute.SetEnabled <BatchSelection.curyControlTotal>(Batch_Detail.Cache, null, false); PXUIFieldAttribute.SetEnabled <BatchSelection.curyID>(Batch_Detail.Cache, null, false); cache.AllowDelete = isNotProcessed; }
protected virtual void TaxAdjustment_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { TaxAdjustment doc = e.Row as TaxAdjustment; if (doc == null) { return; } if (doc.Released == true) { PXUIFieldAttribute.SetEnabled(cache, doc, false); cache.AllowDelete = false; cache.AllowUpdate = false; Transactions.Cache.AllowDelete = false; Transactions.Cache.AllowUpdate = false; Transactions.Cache.AllowInsert = false; release.SetEnabled(false); } else { PXDBCurrencyAttribute.SetBaseCalc <TaxAdjustment.curyDocBal>(cache, null, true); PXUIFieldAttribute.SetEnabled(cache, doc, true); PXUIFieldAttribute.SetEnabled <TaxAdjustment.status>(cache, doc, false); PXUIFieldAttribute.SetEnabled <TaxAdjustment.curyDocBal>(cache, doc, false); PXUIFieldAttribute.SetEnabled <TaxAdjustment.batchNbr>(cache, doc, false); cache.AllowDelete = true; cache.AllowUpdate = true; Transactions.Cache.AllowDelete = true; Transactions.Cache.AllowUpdate = true; Transactions.Cache.AllowInsert = true; release.SetEnabled(doc.Hold == false); ValidateDocDate(cache, doc); } PXUIFieldAttribute.SetEnabled <TaxAdjustment.docType>(cache, doc); PXUIFieldAttribute.SetEnabled <TaxAdjustment.refNbr>(cache, doc); PXUIFieldAttribute.SetEnabled <TaxAdjustment.curyID>(cache, doc, false); PXUIFieldAttribute.SetVisible <TaxAdjustment.curyID>(cache, doc, PXAccess.FeatureInstalled <FeaturesSet.multicurrency>()); editVendor.SetEnabled(vendor.Current != null); bool tranExist = (TaxTran)this.Transactions.SelectWindowed(0, 1) != null; PXUIFieldAttribute.SetEnabled <TaxAdjustment.vendorID>(cache, doc, !tranExist); PXUIFieldAttribute.SetEnabled <TaxAdjustment.taxPeriod>(cache, doc, !tranExist); }
private void CorrectUI(PXCache cache, CRMassMail row) { if (row == null) { return; } var isEnabled = row.Status != CRMassMailStatusesAttribute.Send; PXUIFieldAttribute.SetEnabled <CRMassMail.massMailID>(MassMails.Cache, row); PXUIFieldAttribute.SetEnabled <CRMassMail.mailAccountID>(MassMails.Cache, row, isEnabled); PXUIFieldAttribute.SetEnabled <CRMassMail.mailSubject>(MassMails.Cache, row, isEnabled); PXUIFieldAttribute.SetEnabled <CRMassMail.mailTo>(MassMails.Cache, row, isEnabled); PXUIFieldAttribute.SetEnabled <CRMassMail.mailCc>(MassMails.Cache, row, isEnabled); PXUIFieldAttribute.SetEnabled <CRMassMail.mailBcc>(MassMails.Cache, row, isEnabled); PXUIFieldAttribute.SetEnabled <CRMassMail.mailContent>(MassMails.Cache, row, isEnabled); PXUIFieldAttribute.SetEnabled <CRMassMail.source>(MassMails.Cache, row, isEnabled); PXUIFieldAttribute.SetEnabled <CRMassMail.sourceType>(MassMails.Cache, row, isEnabled); PXUIFieldAttribute.SetEnabled <CRMassMail.plannedDate>(MassMails.Cache, row, isEnabled); PXUIFieldAttribute.SetEnabled <CRMassMail.status>(MassMails.Cache, row, isEnabled); PXUIFieldAttribute.SetEnabled <CRMassMail.sentDateTime>(MassMails.Cache, row, false); MailLists.Cache.AllowUpdate = isEnabled; Leads.Cache.AllowUpdate = isEnabled; Campaigns.Cache.AllowUpdate = isEnabled; var isNotInserted = cache.GetStatus(row) != PXEntryStatus.Inserted; Send.SetEnabled(isEnabled && isNotInserted); PreviewMail.SetEnabled(isEnabled && isNotInserted); }
protected virtual void INSite_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { INAcctSubDefault.Required(sender, e); INSite row = (INSite)e.Row; if (row != null) { viewRestrictionGroups.SetEnabled(row.SiteCD != null); foreach (INLocation deletedLocation in location.Cache.Cached) { PXEntryStatus rowStatus = location.Cache.GetStatus(deletedLocation); if (rowStatus == PXEntryStatus.Deleted || rowStatus == PXEntryStatus.InsertedDeleted) { if (deletedLocation.LocationID == row.ReceiptLocationID) { sender.RaiseExceptionHandling <INSite.receiptLocationID>(row, deletedLocation.LocationCD, new PXSetPropertyException(ErrorMessages.ForeignRecordDeleted)); } if (deletedLocation.LocationID == row.ShipLocationID) { sender.RaiseExceptionHandling <INSite.shipLocationID>(row, deletedLocation.LocationCD, new PXSetPropertyException(ErrorMessages.ForeignRecordDeleted)); } if (deletedLocation.LocationID == row.ReturnLocationID) { sender.RaiseExceptionHandling <INSite.returnLocationID>(row, deletedLocation.LocationCD, new PXSetPropertyException(ErrorMessages.ForeignRecordDeleted)); } if (deletedLocation.LocationID == row.DropShipLocationID) { sender.RaiseExceptionHandling <INSite.dropShipLocationID>(row, deletedLocation.LocationCD, new PXSetPropertyException(ErrorMessages.ForeignRecordDeleted)); } } } } }
protected virtual void _(Events.RowSelected <FSStaffSchedule> e) { if (e.Row == null) { return; } FSStaffSchedule fsStaffScheduleRow = (FSStaffSchedule)e.Row; PXCache cache = e.Cache; bool enableExpirationDate = fsStaffScheduleRow.EnableExpirationDate.HasValue ? (bool)fsStaffScheduleRow.EnableExpirationDate : false; SetControlsState(cache, fsStaffScheduleRow); PXUIFieldAttribute.SetEnabled <FSStaffSchedule.monthly3Selected>(cache, fsStaffScheduleRow, fsStaffScheduleRow.Monthly2Selected == true); PXUIFieldAttribute.SetEnabled <FSStaffSchedule.monthly4Selected>(cache, fsStaffScheduleRow, fsStaffScheduleRow.Monthly3Selected == true); PXUIFieldAttribute.SetEnabled <FSStaffSchedule.endDate>(cache, fsStaffScheduleRow, enableExpirationDate || IsCopyPasteContext); PXDefaultAttribute.SetPersistingCheck <FSStaffSchedule.endDate>(cache, fsStaffScheduleRow, enableExpirationDate ? PXPersistingCheck.NullOrBlank : PXPersistingCheck.Nothing); fsStaffScheduleRow.SrvOrdTypeMessage = TX.Messages.SERVICE_ORDER_TYPE_USED_FOR_RECURRING_APPOINTMENTS; CheckDates(cache, fsStaffScheduleRow); CheckTimes(cache, fsStaffScheduleRow); FSSchedule fsScheduleRow = (FSSchedule)e.Row; SharedFunctions.SetRecurrenceDescription(fsScheduleRow); bool existAnyGenerationProcess = SharedFunctions.ShowWarningScheduleNotProcessed(cache, fsScheduleRow); openStaffContractScheduleProcess.SetEnabled(existAnyGenerationProcess == false); }
protected virtual void INRegister_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (e.Row == null) { return; } release.SetEnabled(e.Row != null && ((INRegister)e.Row).Hold == false && ((INRegister)e.Row).Released == false); iNEdit.SetEnabled(e.Row != null && ((INRegister)e.Row).Hold == false && ((INRegister)e.Row).Released == false); iNRegisterDetails.SetEnabled(e.Row != null && ((INRegister)e.Row).Released == true); PXUIFieldAttribute.SetEnabled(sender, e.Row, ((INRegister)e.Row).Released == false); PXUIFieldAttribute.SetEnabled <INRegister.totalQty>(sender, e.Row, false); PXUIFieldAttribute.SetEnabled <INRegister.totalCost>(sender, e.Row, false); PXUIFieldAttribute.SetEnabled <INRegister.status>(sender, e.Row, false); sender.AllowInsert = true; sender.AllowUpdate = (((INRegister)e.Row).Released == false); sender.AllowDelete = (((INRegister)e.Row).Released == false); transactions.Cache.AllowInsert = (((INRegister)e.Row).Released == false); transactions.Cache.AllowUpdate = (((INRegister)e.Row).Released == false); transactions.Cache.AllowDelete = (((INRegister)e.Row).Released == false); splits.Cache.AllowInsert = (((INRegister)e.Row).Released == false); splits.Cache.AllowUpdate = (((INRegister)e.Row).Released == false); splits.Cache.AllowDelete = (((INRegister)e.Row).Released == false); PXUIFieldAttribute.SetVisible <INRegister.controlQty>(sender, e.Row, (bool)insetup.Current.RequireControlTotal); PXUIFieldAttribute.SetVisible <INRegister.controlCost>(sender, e.Row, (bool)insetup.Current.RequireControlTotal); }
public virtual void _(Events.RowSelected <APInvoice> args) { AddSubcontracts.SetEnabled(Base1.addPOOrder.GetEnabled()); AddSubcontracts.SetVisible(Base1.addPOOrder.GetVisible()); AddSubcontractLines.SetEnabled(Base2.addPOOrderLine.GetEnabled()); AddSubcontractLines.SetVisible(Base2.addPOOrderLine.GetVisible()); }
public static void EnableDisableActionsByWorkflowStage(PXCache cache, FSWFStage fsWFStageRow, PXAction actionComplete, PXAction actionCancel, PXAction actionClose, PXAction actionReopen) { if (fsWFStageRow == null) { return; } if (fsWFStageRow.AllowComplete == false) { actionComplete?.SetEnabled(fsWFStageRow.AllowComplete.Value); } if (fsWFStageRow.AllowCancel == false) { actionCancel?.SetEnabled(fsWFStageRow.AllowCancel.Value); } if (fsWFStageRow.AllowClose == false) { actionClose?.SetEnabled(fsWFStageRow.AllowClose.Value); } if (fsWFStageRow.AllowReopen == false) { actionReopen?.SetEnabled(fsWFStageRow.AllowReopen.Value); } cache.AllowDelete &= (bool)fsWFStageRow.AllowDelete; }
protected virtual void APInvoice_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { APInvoice document = e.Row as APInvoice; if (document == null) { return; } var invoiceState = Base.GetDocumentState(cache, document); addPOOrder.SetVisible(invoiceState.IsDocumentInvoice); PXUIFieldAttribute.SetEnabled(poorderslist.Cache, null, false); bool allowAddPOOrder = invoiceState.IsDocumentEditable && invoiceState.AllowAddPOByProject && Base.vendor.Current != null && !invoiceState.IsRetainageDebAdj; addPOOrder.SetEnabled(allowAddPOOrder); PXUIFieldAttribute.SetEnabled <POOrderRS.selected>(poorderslist.Cache, null, allowAddPOOrder); PXUIFieldAttribute.SetVisible <POOrderRS.unbilledOrderQty>(poorderslist.Cache, null, invoiceState.IsDocumentInvoice); PXUIFieldAttribute.SetVisible <POOrderRS.curyUnbilledOrderTotal>(poorderslist.Cache, null, invoiceState.IsDocumentInvoice); }
protected void _(Events.RowSelected <SOOrder> e, PXRowSelected baseHandler) { baseHandler?.Invoke(e.Cache, e.Args); addBoxSOLine.SetEnabled(Base.Transactions.Cache.AllowInsert); addBoxSOLine.SetVisible(Base.Accessinfo.CompanyName.Contains("TW")); }
protected override void APInvoice_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (e.Row == null) { return; } APInvoice item = (APInvoice)e.Row; if (item.OrigModule == GL.BatchModule.TX) { base.APInvoice_RowSelected(sender, e); addInvoices.SetEnabled(item.VendorID != null && item.VendorLocationID != null && item.Released == false && item.Voided == false); prebook.SetEnabled(false); prebook.SetVisible(false); voidInvoice.SetVisible(false); voidInvoice.SetEnabled(false); } else { PXUIFieldAttribute.SetEnabled(DocumentList.Cache, e.Row, false); PXUIFieldAttribute.SetEnabled <APInvoice.selected>(DocumentList.Cache, e.Row, true); } Transactions.Cache.AllowInsert = false; Transactions.Cache.AllowUpdate = false; Transactions.Cache.AllowDelete = false; }
protected virtual void SetControlsState(PXCache cache, Schedule s) { bool isDaily = s.ScheduleType == GLScheduleType.Daily; bool isWeekly = s.ScheduleType == GLScheduleType.Weekly; bool isMonthly = s.ScheduleType == GLScheduleType.Monthly; bool isPeriodically = s.ScheduleType == GLScheduleType.Periodically; bool isNotProcessed = s.LastRunDate == null; SetDailyControlsState(cache, s, isDaily); SetWeeklyControlsState(cache, s, isWeekly); SetMonthlyControlsState(cache, s, isMonthly); SetPeriodicallyControlsState(cache, s, isPeriodically); PXUIFieldAttribute.SetEnabled <Schedule.runLimit>(cache, s, s.NoRunLimit != true); PXUIFieldAttribute.SetEnabled <Schedule.endDate>(cache, s, s.NoEndDate != true); PXDefaultAttribute.SetPersistingCheck <Schedule.endDate>(cache, s, (s.NoEndDate == true ? PXPersistingCheck.Nothing : PXPersistingCheck.Null)); cache.AllowDelete = isNotProcessed; RunNow.SetEnabled( cache.GetStatus(s) != PXEntryStatus.Inserted && s.Active == true && this.AnyScheduleDetails()); }
public virtual void APSalesPriceFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { APSalesPriceFilter row = (APSalesPriceFilter)e.Row; Records.Cache.AllowInsert = row.VendorID != null && row.CuryID != null; Records.Cache.AllowUpdate = Records.Cache.AllowDelete = row.VendorID != null; Vendor vend = (Vendor)PXParentAttribute.SelectParent(sender, e.Row, typeof(Vendor)); if (vend != null) { PXUIFieldAttribute.SetEnabled <APSalesPriceFilter.curyID>(sender, e.Row, vend.CuryID == null || vend.AllowOverrideCury == true); } PXUIFieldAttribute.SetVisible <APSalesPrice.pendingBreakQty>(Records.Cache, null, row.PromotionalPrice == false); PXUIFieldAttribute.SetVisible <APSalesPrice.pendingPrice>(Records.Cache, null, row.PromotionalPrice == false); PXUIFieldAttribute.SetVisible <APSalesPrice.effectiveDate>(Records.Cache, null, row.PromotionalPrice == false); PXUIFieldAttribute.SetVisible <APSalesPrice.lastPrice>(Records.Cache, null, row.PromotionalPrice == false); PXUIFieldAttribute.SetVisible <APSalesPrice.lastBreakQty>(Records.Cache, null, row.PromotionalPrice == false); PXUIFieldAttribute.SetVisible <APSalesPrice.expirationDate>(Records.Cache, null, row.PromotionalPrice == true); PXUIFieldAttribute.SetEnabled <APSalesPrice.salesPrice>(Records.Cache, null, row.PromotionalPrice == true); PXUIFieldAttribute.SetEnabled <APSalesPrice.breakQty>(Records.Cache, null, row.PromotionalPrice == true); PXUIFieldAttribute.SetEnabled <APSalesPrice.lastDate>(Records.Cache, null, row.PromotionalPrice == true); PXUIFieldAttribute.SetEnabled(sender, e.Row, typeof(TM.OwnedFilter.ownerID).Name, e.Row == null || (bool?)sender.GetValue(e.Row, typeof(TM.OwnedFilter.myOwner).Name) == false); PXUIFieldAttribute.SetEnabled(sender, e.Row, typeof(TM.OwnedFilter.workGroupID).Name, e.Row == null || (bool?)sender.GetValue(e.Row, typeof(TM.OwnedFilter.myWorkGroup).Name) == false); update.SetEnabled(row.PromotionalPrice != true); }
protected void Customer_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { if (e.Row == null) { return; } Customer customerRow = (Customer)e.Row; FSxCustomer fsxCustomerRow = cache.GetExtension <FSxCustomer>(customerRow); PXUIFieldAttribute.SetEnabled <FSxCustomer.sendInvoicesTo>(cache, customerRow, fsxCustomerRow.BillingCycleID != null); PXUIFieldAttribute.SetEnabled <FSxCustomer.billShipmentSource>(cache, customerRow, fsxCustomerRow.BillingCycleID != null); DisplayCustomerBillingOptions(cache, customerRow, fsxCustomerRow); viewServiceOrderHistory.SetEnabled(customerRow.BAccountID > 0); viewAppointmentHistory.SetEnabled(customerRow.BAccountID > 0); viewEquipmentSummary.SetEnabled(customerRow.BAccountID > 0); viewContractScheduleSummary.SetEnabled(customerRow.BAccountID > 0); openMultipleStaffMemberBoard.SetEnabled(customerRow.BAccountID > 0); openSingleStaffMemberBoard.SetEnabled(customerRow.BAccountID > 0); EnableDisableCustomerBilling(cache, customerRow, fsxCustomerRow); }
protected virtual void INRegister_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (e.Row == null) { return; } release.SetEnabled(e.Row != null && ((INRegister)e.Row).Hold == false && ((INRegister)e.Row).Released == false); iNEdit.SetEnabled(e.Row != null && ((INRegister)e.Row).Hold == false && ((INRegister)e.Row).Released == false); iNRegisterDetails.SetEnabled(e.Row != null && ((INRegister)e.Row).Released == true); PXUIFieldAttribute.SetEnabled(sender, e.Row, ((INRegister)e.Row).Released == false && ((INRegister)e.Row).OrigModule == GL.BatchModule.IN); PXUIFieldAttribute.SetEnabled <INRegister.refNbr>(sender, e.Row, true); PXUIFieldAttribute.SetEnabled <INRegister.totalQty>(sender, e.Row, false); PXUIFieldAttribute.SetEnabled <INRegister.totalAmount>(sender, e.Row, false); PXUIFieldAttribute.SetEnabled <INRegister.totalCost>(sender, e.Row, false); PXUIFieldAttribute.SetEnabled <INRegister.status>(sender, e.Row, false); sender.AllowInsert = true; sender.AllowUpdate = (((INRegister)e.Row).Released == false); sender.AllowDelete = (((INRegister)e.Row).Released == false && ((INRegister)e.Row).OrigModule == GL.BatchModule.IN); lsselect.AllowInsert = (((INRegister)e.Row).Released == false && ((INRegister)e.Row).OrigModule == GL.BatchModule.IN); lsselect.AllowUpdate = (((INRegister)e.Row).Released == false); lsselect.AllowDelete = (((INRegister)e.Row).Released == false && ((INRegister)e.Row).OrigModule == GL.BatchModule.IN); PXUIFieldAttribute.SetVisible <INRegister.controlQty>(sender, e.Row, (bool)insetup.Current.RequireControlTotal); PXUIFieldAttribute.SetVisible <INRegister.controlAmount>(sender, e.Row, (bool)insetup.Current.RequireControlTotal); PXUIFieldAttribute.SetVisible <INTran.projectID>(transactions.Cache, null, IsPMVisible); PXUIFieldAttribute.SetVisible <INTran.taskID>(transactions.Cache, null, IsPMVisible); PXUIFieldAttribute.SetVisible <INRegister.totalCost>(sender, e.Row, ((INRegister)e.Row).Released == true); }
protected virtual void CRCampaign_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { var canAddAndRemove = Campaign.Cache.GetStatus(Campaign.Current) != PXEntryStatus.Inserted; multipleInsert.SetEnabled(canAddAndRemove); multipleDelete.SetEnabled(canAddAndRemove); }
protected virtual void VendorMaster_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (e.Row == null) { return; } var vendor = (VendorMaster)e.Row; bool showWithoutTaxZones = vendor.ShowNoTemp.Value == false; PXUIFieldAttribute.SetVisible <TaxReportLine.tempLine>(ReportLine.Cache, null, showWithoutTaxZones); PXUIFieldAttribute.SetVisible <TaxReportLine.bucketSum>(ReportLine.Cache, null, showWithoutTaxZones); PXUIFieldAttribute.SetEnabled <TaxReportLine.tempLine>(ReportLine.Cache, null, showWithoutTaxZones); PXUIFieldAttribute.SetEnabled <TaxReportLine.netTax>(ReportLine.Cache, null, showWithoutTaxZones); PXUIFieldAttribute.SetEnabled <TaxReportLine.taxZoneID>(ReportLine.Cache, null, showWithoutTaxZones); PXUIFieldAttribute.SetEnabled <TaxReportLine.lineType>(ReportLine.Cache, null, showWithoutTaxZones); PXUIFieldAttribute.SetEnabled <TaxReportLine.lineMult>(ReportLine.Cache, null, showWithoutTaxZones); PXUIFieldAttribute.SetEnabled <TaxReportLine.sortOrder>(ReportLine.Cache, null, showWithoutTaxZones); ReportLine.AllowDragDrop = showWithoutTaxZones; ReportLine.AllowInsert = showWithoutTaxZones; Up.SetEnabled(showWithoutTaxZones); Down.SetEnabled(showWithoutTaxZones); CheckReportSettingsEditableAndSetWarningTo <VendorMaster.bAccountID>(this, sender, vendor, vendor.BAccountID); }
/// <summary> /// The Action buttons get enabled or disabled. /// </summary> private void EnableDisable_ActionButtons(PXCache cache, FSBranchLocation fsBranchLocationRow) { //Validate address action if (BranchLocationRecords.Current != null) { if (BranchLocationRecords.Current.CountryID != null && BranchLocationRecords.Current.City != null && BranchLocationRecords.Current.State != null && BranchLocationRecords.Current.PostalCode != null && BranchLocationRecords.Current.IsValidated == false) { validateAddress.SetEnabled(true); } else { validateAddress.SetEnabled(false); } } }
public void AMLicenseSetup_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (!(e.Row is AMLicenseSetup row)) { return; } CreateKey.SetEnabled(!row.LicenseKey.HasValue); ProductsView.AllowInsert = PagePrimaryView.Current.LicenseKey.HasValue; }
protected virtual void RouteAppointmentForecastingFilter_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { if (e.Row == null) { return; } generateProjection.SetEnabled(RouteAppointmentForecastingFilter.Current.DateBegin != null && RouteAppointmentForecastingFilter.Current.DateEnd != null); }
protected virtual void _(Events.CacheAttached <SOInvoice.refNbr> e) { PXUIFieldAttribute.SetEnabled <SOInvoice.refNbr>(e.Cache, null, false); PXUIFieldAttribute.SetRequired <SOInvoice.refNbr>(e.Cache, false); PXUIFieldAttribute.SetReadOnly <SOInvoice.refNbr>(e.Cache, null, true); Release.SetEnabled(false); Release.SetCaption("Release"); }
public virtual void _(Events.RowSelected <Document> e) { if (e.Row == null) { return; } DuplicateMerge.SetEnabled(e.Cache.GetStatus(e.Row) != PXEntryStatus.Inserted && Base.Caches[typeof(CRDuplicateRecord)].Cached.Cast <CRDuplicateRecord>().Any(_ => _.Selected == true)); }
protected void _(Events.RowSelected <TWNGUIInvCredit> e) { bool EmptyNewGUI = string.IsNullOrEmpty(e.Row.NewGUINbr); GUICreditNote.AllowSelect = EmptyNewGUI; createNewGUI.SetEnabled(EmptyNewGUI); printGUIInvoice.SetEnabled(!EmptyNewGUI); }
protected virtual void _(Events.RowSelected <RouteAppointmentForecastingFilter> e) { if (e.Row == null) { return; } generateProjection.SetEnabled(RouteAppointmentForecastingFilter.Current.DateBegin != null && RouteAppointmentForecastingFilter.Current.DateEnd != null); }
protected void SOOrder_RowSelected(PXCache sender, PXRowSelectedEventArgs e, PXRowSelected baseEventHandler) { if (baseEventHandler != null) { baseEventHandler(sender, e); } advItemSearch.SetEnabled(Base.Transactions.Cache.AllowInsert); }
public virtual void _(Events.RowSelected <APInvoice> args) { if (args.Row == null) { return; } AdjustJointAmounts.SetEnabled(IsAdjustJointAmountActionAvailable()); Base1.JointPayees.AllowUpdate = Base1.JointPayees.AllowUpdate || IsAdjustingInProgress; }