Beispiel #1
0
        public ListModelBase <HospitalPartnerCustomerViewModel, HospitalPartnerCustomerListModelFilter> GetCustomerAggregateResultSummary(int pageNumber, int pageSize, ModelFilterBase filter, out int totalRecords)
        {
            using (var t = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions {
                IsolationLevel = IsolationLevel.ReadUncommitted
            }))
            {
                var customerFilter = filter as HospitalPartnerCustomerListModelFilter;
                var eventCustomers = _eventCustomerRepository.GetEventCustomersForAggregateResultSummary(pageNumber, pageSize, customerFilter, out totalRecords);

                HospitalPartner hospitalPartner = null;
                if (customerFilter != null && customerFilter.HospitalPartnerId > 0)
                {
                    hospitalPartner = _hospitalPartnerRepository.GetHospitalPartnerforaVendor(customerFilter.HospitalPartnerId);
                }

                var model = eventCustomers.IsNullOrEmpty() ? null : GetCustomers(eventCustomers, hospitalPartner);

                t.Complete();
                return(model);
            }
        }