public List <CallCenterRepMetricDetailViewData> GetBookingCallCenterRepMetricDetailsViewData(long callCenterCallCenterUserId,
                                                                                                     DateTime startDate, DateTime endDate, int pageIndex, int pageSize, out int totalCount)
        {
            var eventCustomerIds =
                _callCenterRepMetricDetailRepository.GetBookedEventCustomersByCallCenterRep(callCenterCallCenterUserId, startDate,
                                                                                            endDate);
            var eventCustomers = _eventCustomerAggregateRepository.GetEventCustomerOrders(eventCustomerIds);

            var orders = _orderRepository.GetAllOrdersByEventCustomerIds(eventCustomerIds);

            var callCenterRep = _callCenterRepRepository.GetCallCenterRep(callCenterCallCenterUserId);

            var metricDetailList =
                _callCenterRepMetricDetailFactory.CreateCallCenterRepMetricDetailViewData(eventCustomers, orders,
                                                                                          callCenterRep);

            totalCount = metricDetailList.Count;
            return(totalCount >= ((pageIndex * pageSize) + pageSize)
                       ? metricDetailList.GetRange((pageIndex * pageSize), pageSize)
                       : metricDetailList.GetRange((pageIndex * pageSize), totalCount - (pageIndex * pageSize)));
        }
예제 #2
0
 public CallCenterRep GetUser(long organizationRoleUserId)
 {
     return(_callcenterRepository.GetCallCenterRep(organizationRoleUserId));
 }