예제 #1
0
        public ActionResult CallQueueExcludedCustomerReport(CallQueueExcludedCustomerReportModelFilter filter = null, int pageNumber = 1)
        {
            if (filter != null && ((filter.CustomerId.HasValue && filter.CustomerId > 0) || filter.HealthPlanId > 0 || !string.IsNullOrEmpty(filter.MemberId)))
            {
                int totalRecords;
                var model = _callQueueService.GetCallQueueExcludedCustomerReport(pageNumber, _pageSize, filter, out totalRecords);
                if (model == null)
                {
                    model = new CallQueueExcludedCustomerReportListModel();
                }
                model.Filter = filter;

                var currentAction        = ControllerContext.RouteData.Values["action"].ToString();
                var routeValueDictionary = GetRouteValueDictionaryForCallQueueExcludedCustomerReportModel(filter);

                Func <int, string> urlFunc = pn => Url.Action(currentAction, AddRouteValueDictionary(routeValueDictionary, pn));

                model.PagingModel = new PagingModel(pageNumber, _pageSize, totalRecords, urlFunc);
                return(View(model));
            }
            else
            {
                return(View(new CallQueueExcludedCustomerReportListModel {
                    Filter = filter
                }));
            }
        }
예제 #2
0
        public string CallQueueExcludedCustomerReportExport(CallQueueExcludedCustomerReportModelFilter filter, long userId)
        {
            var dataGen = new ExportableDataGenerator <CallQueueExcludedCustomerReportModel, CallQueueExcludedCustomerReportModelFilter>(_callQueueService.GetCallQueueExcludedCustomerReport, Logger);

            var model = dataGen.GetData(filter);

            var exporter = ExportableDataGeneratorProcessManager <ViewModelBase, ModelFilterBase> .GetCsvExporter <CallQueueExcludedCustomerReportModel>();

            return(WriteCsv(GetExportableFileName("CallQueueExcludedCustomerReport"), exporter, model.Collection, userId));
        }
예제 #3
0
        public void CallQueueExcludedCustomerReportAsync(string id = null, CallQueueExcludedCustomerReportModelFilter filter = null)
        {
            if (id == null)
            {
                return;
            }

            AsyncManager.OutstandingOperations.Increment();
            var dataGen = new ExportableDataGenerator <CallQueueExcludedCustomerReportModel, CallQueueExcludedCustomerReportModelFilter>(_callQueueService.GetCallQueueExcludedCustomerReport);

            var processmanager = new ExportableDataGeneratorProcessManager <CallQueueExcludedCustomerReportModel, CallQueueExcludedCustomerReportModelFilter>();

            processmanager.Add(id, dataGen);

            GetNewProcessStarted(filter, dataGen, id);
        }
예제 #4
0
        private RouteValueDictionary GetRouteValueDictionaryForCallQueueExcludedCustomerReportModel(CallQueueExcludedCustomerReportModelFilter filter)
        {
            var routeValueDictionary = new RouteValueDictionary
            {
                { "CustomerId", filter.CustomerId },
                { "HealthPlanId", filter.HealthPlanId },
                { "MemberId", filter.MemberId },
                { "IsEligible", filter.IsEligible },
                { "DoNotContact", filter.DoNotContact },
                { "BookedAppointment", filter.BookedAppointment },
                { "InCorrectPhoneNumber", filter.InCorrectPhoneNumber },
                { "ZipCode", filter.ZipCode },
                { "CampaignId", filter.CampaignId },
                { "DirectMailDate", filter.DirectMailDate }
            };

            if (filter.CustomTags != null)
            {
                var index = 0;
                foreach (var customtag in filter.CustomTags)
                {
                    routeValueDictionary.Add(string.Format("CustomTags[{0}]", index), customtag);
                    index++;
                }
            }

            return(routeValueDictionary);
        }
예제 #5
0
 public ActionResult CallQueueExcludedCustomerReport(CallQueueExcludedCustomerReportModelFilter filter = null)
 {
     return(CreateExportQueue(filter, ExportableReportType.CallQueueExcludedCustomerReport, _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId));
 }