protected virtual void ARIntegrityCheckFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { bool errorsOnForm = PXUIFieldAttribute.GetErrors(sender, null, PXErrorLevel.Error, PXErrorLevel.RowError).Count > 0; ARCustomerList.SetProcessEnabled(!errorsOnForm); ARCustomerList.SetProcessAllEnabled(!errorsOnForm); 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 (PX.Common.PXContext.GetSlot <AUSchedule>() == null && list.Count > maxCustomerCount) { WebDialogResult wdr = ARCustomerList.Ask(Messages.ContinueValidatingBalancesForMultipleCustomers, 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); }); }
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); } ); }