예제 #1
0
        private bool DoesAnyOutstandingComplianceExistForPrimaryVendor()
        {
            var projectIds = LienWaiverProjectDataProvider.GetProjectIds(graph);

            return(lienWaiverDataProvider.DoesAnyOutstandingComplianceExistForPrimaryVendor(
                       graph.Document.Current.VendorID, projectIds));
        }
예제 #2
0
 private void CheckPrimaryVendorForOutstandingLienWaivers(APRegister document, IEnumerable <int?> projectIds)
 {
     if (lienWaiverDataProvider.DoesAnyOutstandingComplianceExistForPrimaryVendor(document.VendorID, projectIds))
     {
         throw new PXException(exceptionMessage);
     }
 }
        private bool AreThereAnyOutstandingLienWaivers(int?vendorId)
        {
            var projectIds = Transactions.Select(tran => LienWaiverProjectDataProvider.GetProjectId(Graph, tran))
                             .Distinct();

            return(LienWaiverDataProvider.DoesAnyOutstandingComplianceExistForPrimaryVendor(vendorId, projectIds));
        }
예제 #4
0
        private bool DoesAnyOutstandingLienWaiverExist(APAdjust adjustment)
        {
            var projectIds = LienWaiverProjectDataProvider.GetProjectIds(adjustment, Base).ToList();

            return(lienWaiverDataProvider
                   .DoesAnyOutstandingComplianceExistForPrimaryVendor(adjustment.VendorID, projectIds) ||
                   DoesAnyOutstandingLienWaiverExistForJointPayees(adjustment, projectIds));
        }
예제 #5
0
        public void ValidatePrimaryVendor <TField>(PXCache cache, object row, int?vendorId,
                                                   IEnumerable <int?> projectIds, string message, PXErrorLevel errorLevel = PXErrorLevel.Warning)
            where TField : IBqlField
        {
            var doesAnyOutstandingComplianceExist = lienWaiverDataProvider
                                                    .DoesAnyOutstandingComplianceExistForPrimaryVendor(vendorId, projectIds);

            SetWarningIfNeeded <TField>(cache, row, message, doesAnyOutstandingComplianceExist, errorLevel);
        }