Example #1
0
        public async Task <QueryResult <SolidarityInvitedRegisteredSupplierModel> > GetAllSuppliersBySearchCretriaForSolidarity(SolidaritySearchCriteria cretria)
        {
            SupplierIntegrationSearchCriteria      integrationSearchCriteria = _mapper.Map <SupplierIntegrationSearchCriteria>(cretria);
            QueryResult <SupplierIntegrationModel> suppliers = await _iidmService.GetSupplierDetailsBySearchCriteria(integrationSearchCriteria);

            List <SolidarityInvitedRegisteredSupplierModel> suppliersInvitation = suppliers.Items.Where(d => d.supplierNumber != cretria.CurrentSupplierCR).Select(supplier => new SolidarityInvitedRegisteredSupplierModel()
            {
                CrName   = supplier.supplierName,
                CrNumber = supplier.supplierNumber,
            }).ToList();
            QueryResult <SolidarityInvitedRegisteredSupplierModel> suppliersList = suppliersInvitation != null ? new QueryResult <SolidarityInvitedRegisteredSupplierModel>(suppliersInvitation, suppliers.TotalCount, suppliers.PageNumber, suppliers.PageSize) : new QueryResult <SolidarityInvitedRegisteredSupplierModel>(new List <SolidarityInvitedRegisteredSupplierModel>(), 0, 1, 1);

            return(suppliersList);
        }
Example #2
0
        public async Task <QueryResult <SupplierIntegrationModel> > GetAllSuppliers(SupplierIntegrationSearchCriteria searchCriteria)
        {
            var supplierList = await _iDMAppService.GetSupplierDetailsBySearchCriteria(searchCriteria);

            return(supplierList);
        }