protected virtual void APIntegrityCheckFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { bool errorsOnForm = PXUIFieldAttribute.GetErrors(sender, null, PXErrorLevel.Error, PXErrorLevel.RowError).Count > 0; APVendorList.SetProcessEnabled(!errorsOnForm); APVendorList.SetProcessAllEnabled(!errorsOnForm); APIntegrityCheckFilter filter = Filter.Current; APVendorList.SetProcessDelegate <APReleaseProcess>( delegate(APReleaseProcess re, Vendor vend) { re.Clear(PXClearOption.PreserveTimeStamp); re.IntegrityCheckProc(vend, filter.FinPeriodID); } ); //For perfomance recomended select not more than maxVendorCount vendors, //because the operation is performed for a long time. const int maxVendorCount = 5; APVendorList.SetParametersDelegate(delegate(List <Vendor> list) { bool processing = true; if (PX.Common.PXContext.GetSlot <AUSchedule>() == null && list.Count > maxVendorCount) { WebDialogResult wdr = APVendorList.Ask(Messages.ContinueValidatingBalancesForMultipleVendors, MessageButtons.OKCancel); processing = wdr == WebDialogResult.OK; } return(processing); }); }
protected virtual void ARIntegrityCheckFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { ARIntegrityCheckFilter filter = Filter.Current; ARCustomerList.SetProcessDelegate <ARReleaseProcess>( delegate(ARReleaseProcess re, Customer cust) { re.Clear(PXClearOption.PreserveTimeStamp); re.IntegrityCheckProc(cust, filter.FinPeriodID); } ); //For perfomance recomended select not more than maxCustomerCount customers, //becouse the operation is performed for a long time. const int maxCustomerCount = 5; ARCustomerList.SetParametersDelegate(delegate(List <Customer> list) { bool processing = true; if (list.Count > maxCustomerCount) { WebDialogResult wdr = ARCustomerList.Ask(Messages.ContinueValidatingBalancesForMultipleCustomers, MessageButtons.OKCancel); processing = wdr == WebDialogResult.OK; } return(processing); }); }