void Page_ColumnSet_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { var gridHeader = sp1.FindControl("gridHeader") as PXGrid; var gridColumn = sp1.FindControl("gridColumn") as PXGrid; CreateColumns(ds.GetSchema("Headers"), gridHeader); CreateColumns(ds.GetSchema("Properties"), gridColumn); }
protected void Users_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { Users user = (Users)e.Row; if (user == null) return; bool isNotFromAD = user.Source != PXUsersSourceListAttribute.ActiveDirectory; PXDefaultAttribute.SetPersistingCheck<Users.password>(sender, user, isNotFromAD ? PXPersistingCheck.Null : PXPersistingCheck.Nothing); PXDefaultAttribute.SetPersistingCheck<Users.email>(sender, user, isNotFromAD ? PXPersistingCheck.Null : PXPersistingCheck.Nothing); }
protected override void Location_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { BAccount baccount = (BAccount)PXParentAttribute.SelectParent(sender, e.Row, typeof(BAccount)); PXUIFieldAttribute.SetEnabled<CR.Location.isAPAccountSameAsMain>(sender, e.Row, baccount!=null && !object.Equals(baccount.DefLocationID, ((Location)e.Row).LocationID)); PXUIFieldAttribute.SetEnabled<CR.Location.isAPPaymentInfoSameAsMain>(sender, e.Row, baccount != null && !object.Equals(baccount.DefLocationID, ((Location)e.Row).LocationID)); base.Location_RowSelected(sender, e); }
protected virtual void Customer_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { Customer cust = e.Row as Customer; if (cust != null && sender.GetStatus(cust) == PXEntryStatus.Notchanged) { if (cust.GroupMask != null) { foreach (byte b in cust.GroupMask) { if (b != 0x00) { cust.Included = true; return; } } } else { cust.Included = true; } } }
protected override void Batch_RowSelected(PX.Data.PXCache cache, PX.Data.PXRowSelectedEventArgs e) { base.Batch_RowSelected(cache, e); }
public void RowSelected(PXCache sender, PXRowSelectedEventArgs e) { CurrencyInfo info = e.Row as CurrencyInfo; if (info != null) { bool disabled = info.IsReadOnly == true || (info.CuryID == info.BaseCuryID); PXUIFieldAttribute.SetEnabled<CurrencyInfo.curyMultDiv>(sender, info, !disabled); PXUIFieldAttribute.SetEnabled<CurrencyInfo.sampleCuryRate>(sender, info, !disabled); PXUIFieldAttribute.SetEnabled<CurrencyInfo.sampleRecipRate>(sender, info, !disabled); PXUIFieldAttribute.SetEnabled<CurrencyInfo.curyRateTypeID>(sender, info, !disabled); PXUIFieldAttribute.SetEnabled<CurrencyInfo.curyEffDate>(sender, info, !disabled); PXUIFieldAttribute.SetEnabled<CurrencyInfo.baseCuryID>(sender, info, false); PXUIFieldAttribute.SetEnabled<CurrencyInfo.displayCuryID>(sender, info, false); PXUIFieldAttribute.SetEnabled<CurrencyInfo.curyID>(sender, info, true); } }
protected virtual void RelationGroup_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { PX.SM.RelationGroup group = e.Row as PX.SM.RelationGroup; if (group != null) { if (String.IsNullOrEmpty(group.GroupName)) { Save.SetEnabled(false); Customer.Cache.AllowInsert = false; } else { Save.SetEnabled(true); Customer.Cache.AllowInsert = true; } } }
protected override void UserPreferences_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { base.UserPreferences_RowSelected(sender, e); ResetTimeZone.SetVisible(true); }
protected virtual void InventoryItem_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { InventoryItem item = e.Row as InventoryItem; if (item != null && sender.GetStatus(item) == PXEntryStatus.Notchanged) { if (item.GroupMask != null) { foreach (byte b in item.GroupMask) { if (b != 0x00) { item.Included = true; return; } } } else { item.Included = true; } } }
protected virtual void LocationAPAccountSub_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (e.Row == null) return; if (Location.Current != null) { PXUIFieldAttribute.SetEnabled(sender, e.Row, object.Equals(Location.Current.LocationID, Location.Current.VAPAccountLocationID)); } }
protected virtual void VendorPaymentMethodDetail_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (e.Row == null) return; if (Location.Current != null) { PXUIFieldAttribute.SetEnabled(sender, e.Row, object.Equals(Location.Current.LocationID, Location.Current.VPaymentInfoLocationID)); } }
protected override void FinPeriod_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { base.FinPeriod_RowSelected(sender, e); FinPeriod per = (FinPeriod)e.Row; if (per == null) return; FinPeriod p = PeriodList.Select(); ShowAssets.SetEnabled(p.Selected == true); }
protected virtual void Vendor_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { Vendor vend = e.Row as Vendor; if (vend != null && sender.GetStatus(vend) == PXEntryStatus.Notchanged) { if (vend.GroupMask != null) { foreach (byte b in vend.GroupMask) { if (b != 0x00) { vend.Included = true; return; } } } else { vend.Included = true; } } }
protected override void ARInvoice_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { base.ARInvoice_RowSelected(cache, e); PXUIFieldAttribute.SetVisible<ARInvoice.projectID>(cache, e.Row, PM.ProjectAttribute.IsPMVisible(this, BatchModule.SO) || PM.ProjectAttribute.IsPMVisible(this, BatchModule.AR) || PXAccess.FeatureInstalled<FeaturesSet.contractManagement>()); PXUIFieldAttribute.SetVisible<ARTran.taskID>(Transactions.Cache, null, PM.ProjectAttribute.IsPMVisible(this, BatchModule.SO) || PM.ProjectAttribute.IsPMVisible(this, BatchModule.AR)); if (e.Row != null) { ARInvoice doc = e.Row as ARInvoice; if (((ARInvoice)e.Row).DocType == ARDocType.CashSale || ((ARInvoice)e.Row).DocType == ARDocType.CashReturn) { PXUIFieldAttribute.SetVisible<ARInvoice.curyOrigDocAmt>(cache, e.Row); PXUIFieldAttribute.SetEnabled<ARInvoice.curyOrigDocAmt>(cache, e.Row, ((ARInvoice)e.Row).Released == false); } SODocument.Cache.AllowUpdate = Document.Cache.AllowUpdate; FreightDetails.Cache.AllowUpdate = Document.Cache.AllowUpdate; CCProcTran lastCCran; CCPaymentState ccPaymentState = CCPaymentEntry.ResolveCCPaymentState(ccProcTran.Select(), out lastCCran); bool isCCCaptured = (ccPaymentState & CCPaymentState.Captured) != 0; bool isCCPreAuthorized = (ccPaymentState & CCPaymentState.PreAuthorized) != 0; bool isAuthorizedCashSale = (doc.DocType == ARDocType.CashSale && (isCCPreAuthorized || isCCCaptured)); bool isRefundedCashReturn = doc.DocType == ARDocType.CashReturn && (ccPaymentState & CCPaymentState.Refunded) != 0; Transactions.Cache.AllowDelete = !isAuthorizedCashSale && !isRefundedCashReturn; Transactions.Cache.AllowUpdate = !isAuthorizedCashSale && !isRefundedCashReturn; Transactions.Cache.AllowInsert = !isAuthorizedCashSale && !isRefundedCashReturn; PXUIFieldAttribute.SetEnabled<ARInvoice.curyOrigDocAmt>(cache, doc, !isAuthorizedCashSale && !isRefundedCashReturn); PXUIFieldAttribute.SetEnabled<ARInvoice.curyOrigDiscAmt>(cache, doc, !isAuthorizedCashSale && !isRefundedCashReturn); release.SetEnabled(arsetup.Current.IntegratedCCProcessing != true || doc.DocType != ARDocType.CashReturn || (ccPaymentState & CCPaymentState.Refunded) != 0); } }
protected virtual void SOOrderShipment_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { PXUIFieldAttribute.SetEnabled(sender, e.Row, false); PXUIFieldAttribute.SetEnabled<SOOrderShipment.selected>(sender, e.Row, true); }
protected virtual void SOFreightDetail_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (Document.Current != null) { PXUIFieldAttribute.SetEnabled<SOFreightDetail.curyPremiumFreightAmt>(sender, e.Row, Document.Current.Released != true); } }
protected override void ARTran_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { base.ARTran_RowSelected(sender, e); ARTran row = e.Row as ARTran; if (row != null) { PXUIFieldAttribute.SetEnabled<ARTran.inventoryID>(sender, row, row.SOOrderNbr == null); PXUIFieldAttribute.SetEnabled<ARTran.qty>(sender, row, row.SOOrderNbr == null); PXUIFieldAttribute.SetEnabled<ARTran.uOM>(sender, row, row.SOOrderNbr == null); } }
protected virtual void SOInvoice_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (e.Row == null) return; SOInvoice doc = (SOInvoice)e.Row; ARInvoice arDoc = this.Document.Current; bool docNotOnHold = (arDoc!= null) && (arDoc.OpenDoc == true && arDoc.Released == false); //It's always on Hold ??? bool enableCCProcess = false; bool docTypePayment = (doc.DocType == ARDocType.Invoice || doc.DocType == ARDocType.CashSale); bool isCashReturn = doc.DocType == ARDocType.CashReturn; doc.IsCCPayment = false; doc.PaymentProjectID = PM.ProjectDefaultAttribute.NonProject(this); if (doc.PMInstanceID!= null) { PXResult<CustomerPaymentMethodC,CA.PaymentMethod> pmInstance =(PXResult<CustomerPaymentMethodC,CA.PaymentMethod>) PXSelectJoin<CustomerPaymentMethodC, InnerJoin<CA.PaymentMethod, On<CA.PaymentMethod.paymentMethodID,Equal<CustomerPaymentMethodC.paymentMethodID>>>, Where<CustomerPaymentMethodC.pMInstanceID, Equal<Optional<SOInvoice.pMInstanceID>>, And<CA.PaymentMethod.paymentType,Equal<CA.PaymentMethodType.creditCard>, And<CA.PaymentMethod.aRIsProcessingRequired,Equal<True>>>>>.Select(this,doc.PMInstanceID); if (pmInstance != null) { doc.IsCCPayment = true; enableCCProcess = (isCashReturn || docTypePayment || doc.DocType == ARDocType.Refund || doc.DocType == ARDocType.VoidPayment); } } arDoc.IsCCPayment = doc.IsCCPayment; bool isCCVoided = false; bool isCCCaptured = false; bool isCCPreAuthorized = false; bool isCCRefunded = false; bool isCCVoidingAttempted = false; //Special flag for VoidPayment Release logic if (enableCCProcess) { CCProcTran lastCCran; CCPaymentState ccPaymentState = CCPaymentEntry.ResolveCCPaymentState(ccProcTran.Select(), out lastCCran); isCCVoided = (ccPaymentState & CCPaymentState.Voided) != 0; isCCCaptured = (ccPaymentState & CCPaymentState.Captured) != 0; isCCPreAuthorized = (ccPaymentState & CCPaymentState.PreAuthorized) != 0; isCCRefunded = (ccPaymentState & CCPaymentState.Refunded) != 0; isCCVoidingAttempted = (ccPaymentState & CCPaymentState.VoidFailed) != 0; doc.CCPaymentStateDescr = CCPaymentEntry.FormatCCPaymentState(ccPaymentState); doc.CCAuthTranNbr = lastCCran != null ? lastCCran.TranNbr : null; } bool canAuthorize = docNotOnHold && docTypePayment && !(isCCPreAuthorized || isCCCaptured); bool canCapture = docNotOnHold && docTypePayment && !(isCCCaptured); bool canVoid = docNotOnHold && ((isCCCaptured || isCCPreAuthorized) && docTypePayment); this.authorizeCCPayment.SetEnabled(enableCCProcess && canAuthorize); this.captureCCPayment.SetEnabled(enableCCProcess && canCapture); this.voidCCPayment.SetEnabled(enableCCProcess && canVoid); this.creditCCPayment.SetEnabled(enableCCProcess && isCashReturn && !isCCRefunded && doc.RefTranExtNbr != null); PXUIFieldAttribute.SetEnabled(this.ccLastTran.Cache, null, false); //PXUIFieldAttribute.SetEnabled<SOInvoice.cCAuthExpirationDate>(sender, doc, false); //PXUIFieldAttribute.SetEnabled<SOInvoice.curyCCPreAuthAmount>(sender, doc, false); PXUIFieldAttribute.SetEnabled<SOInvoice.refTranExtNbr>(sender, doc, doc.PMInstanceID.HasValue && doc.IsCCPayment == true && isCashReturn && !isCCRefunded); PXUIFieldAttribute.SetVisible<SOInvoice.cCPaymentStateDescr>(sender, doc, enableCCProcess); PXUIFieldAttribute.SetEnabled<SOInvoice.curyDiscTot>(SODocument.Cache, e.Row, Document.Cache.AllowUpdate); bool allowPaymentInfo = Document.Cache.AllowUpdate && (((SOInvoice)e.Row).DocType == ARDocType.CashSale || ((SOInvoice)e.Row).DocType == ARDocType.CashReturn || ((SOInvoice)e.Row).DocType == ARDocType.Invoice) && !isCCPreAuthorized && !isCCCaptured; bool isPMInstanceRequired = false; if (allowPaymentInfo && (String.IsNullOrEmpty(doc.PaymentMethodID) == false)) { CA.PaymentMethod pm = PXSelect<CA.PaymentMethod, Where<CA.PaymentMethod.paymentMethodID, Equal<Required<CA.PaymentMethod.paymentMethodID>>>>.Select(this, doc.PaymentMethodID); isPMInstanceRequired = (pm.IsAccountNumberRequired == true); } PXUIFieldAttribute.SetEnabled<SOInvoice.paymentMethodID>(SODocument.Cache, e.Row, allowPaymentInfo); PXUIFieldAttribute.SetEnabled<SOInvoice.pMInstanceID>(SODocument.Cache, e.Row, allowPaymentInfo && isPMInstanceRequired); PXUIFieldAttribute.SetEnabled<SOInvoice.cashAccountID>(SODocument.Cache, e.Row, Document.Cache.AllowUpdate && (((SOInvoice)e.Row).PMInstanceID != null || string.IsNullOrEmpty(doc.PaymentMethodID)==false)); PXUIFieldAttribute.SetEnabled<SOInvoice.extRefNbr>(SODocument.Cache, e.Row, Document.Cache.AllowUpdate && (((SOInvoice)e.Row).PMInstanceID != null || string.IsNullOrEmpty(doc.PaymentMethodID) == false)); PXUIFieldAttribute.SetEnabled<SOInvoice.cleared>(SODocument.Cache, e.Row, Document.Cache.AllowUpdate && (((SOInvoice)e.Row).PMInstanceID != null || string.IsNullOrEmpty(doc.PaymentMethodID) == false) && (((SOInvoice)e.Row).DocType == ARDocType.CashSale || ((SOInvoice)e.Row).DocType == ARDocType.CashReturn)); PXUIFieldAttribute.SetEnabled<SOInvoice.clearDate>(SODocument.Cache, e.Row, Document.Cache.AllowUpdate && (((SOInvoice)e.Row).PMInstanceID != null || string.IsNullOrEmpty(doc.PaymentMethodID) == false) && (((SOInvoice)e.Row).DocType == ARDocType.CashSale || ((SOInvoice)e.Row).DocType == ARDocType.CashReturn)); if (IsExternalTax == true && ((SOInvoice)e.Row).IsTaxValid != true) PXUIFieldAttribute.SetWarning<SOInvoice.curyTaxTotal>(sender, e.Row, AR.Messages.TaxIsNotUptodate); if (Document.Current != null && Document.Current.SkipDiscounts == true) { DiscountDetails.Cache.AllowDelete = false; DiscountDetails.Cache.AllowUpdate = false; DiscountDetails.Cache.AllowInsert = false; } else { DiscountDetails.Cache.AllowDelete = Transactions.Cache.AllowDelete; DiscountDetails.Cache.AllowUpdate = Transactions.Cache.AllowUpdate; DiscountDetails.Cache.AllowInsert = Transactions.Cache.AllowInsert; } bool isAuthorizedCashSale = (doc.DocType == ARDocType.CashSale && (isCCPreAuthorized || isCCCaptured)); PXUIFieldAttribute.SetEnabled<SOInvoice.curyDiscTot>(sender, doc, !isAuthorizedCashSale); }
protected virtual void LocationAPPaymentInfo_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (e.Row == null) return; LocationAPPaymentInfo row = (LocationAPPaymentInfo)e.Row; if (Location.Current != null) { bool enableEdit = object.Equals(Location.Current.LocationID, Location.Current.VPaymentInfoLocationID); bool hasPaymentMethod = (row!= null) && (String.IsNullOrEmpty(row.VPaymentMethodID) == false); PXUIFieldAttribute.SetEnabled(sender, e.Row, enableEdit); PXUIFieldAttribute.SetEnabled<LocationAPPaymentInfo.vCashAccountID>(sender, e.Row, enableEdit && hasPaymentMethod); } }
protected virtual void INSite_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { INSite site = e.Row as INSite; PX.SM.RelationGroup group = Group.Current; if (site != null && site.GroupMask != null && group != null && group.GroupMask != null && sender.GetStatus(site) == PXEntryStatus.Notchanged) { for (int i = 0; i < site.GroupMask.Length && i < group.GroupMask.Length; i++) { if (group.GroupMask[i] != 0x00 && (site.GroupMask[i] & group.GroupMask[i]) == group.GroupMask[i]) { site.Included = true; } } } }
protected override void Address_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { Address row = e.Row as Address; if (row != null) { BAccount acct = BAccountUtility.FindAccount(this, row.BAccountID); bool isSameAsMain = false; if (acct != null) { isSameAsMain = (row.AddressID == acct.DefAddressID); } if (!isSameAsMain && Location.Current != null && APPaymentInfoLocation.Current != null && object.Equals(APPaymentInfoLocation.Current.VRemitAddressID, row.AddressID)) { PXUIFieldAttribute.SetEnabled(sender, e.Row, object.Equals(Location.Current.LocationID, Location.Current.VPaymentInfoLocationID)); } else { base.Address_RowSelected(sender, e); } } }
protected virtual void INItemClass_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { INItemClass cLass = e.Row as INItemClass; PX.SM.RelationGroup group = Group.Current; if (cLass != null && cLass.GroupMask != null && group != null && group.GroupMask != null && sender.GetStatus(cLass) == PXEntryStatus.Notchanged) { for (int i = 0; i < cLass.GroupMask.Length && i < group.GroupMask.Length; i++) { if (group.GroupMask[i] != 0x00 && (cLass.GroupMask[i] & group.GroupMask[i]) == group.GroupMask[i]) { cLass.Included = true; } } } }