Exemple #1
0
        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 APIntegrityCheckFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            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 (list.Count > maxVendorCount)
                {
                    WebDialogResult wdr = APVendorList.Ask(Messages.ContinueValidatingBalancesForMultipleVendors, MessageButtons.OKCancel);
                    processing          = wdr == WebDialogResult.OK;
                }
                return(processing);
            });
        }
Exemple #3
0
        protected virtual void APIntegrityCheckFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            APIntegrityCheckFilter filter = Filter.Current;

            APVendorList.SetProcessDelegate <APReleaseProcess>(
                delegate(APReleaseProcess re, Vendor vend)
            {
                re.Clear(PXClearOption.PreserveTimeStamp);
                re.IntegrityCheckProc(vend, filter.FinPeriodID);
            }
                );
        }