예제 #1
0
        public ActionResult Index()
        {
            ClientVisitListModel model = new ClientVisitListModel(CurrentUser);

            if (TempData["ClientVisitSaveDataModel"] != null)
            {
                model.SearchCriteriaModel = (ClientVisitSearchCriteriaModel)TempData["ClientVisitSaveDataModel"];
                DataPage <ClientVisitInfo> clients = clientBusinessLogic.ClientVisit_Find(
                    model.SearchCriteriaModel.GetClientSearchCriteria(),
                    new List <SortCriteria <ClientVisitSortField> >(),
                    new PageRequest()
                {
                    PageNumber = 1, PageSize = 100
                });

                model.Items = clients.Data
                              .Select(item => new ClientVisitInfoModel(item));
            }
            return(Index(model));
        }
        public ActionResult Index(FundRequestIndexModel model)
        {
            ClientVisitSearchCriteria  criteria = model.SearchCriteriaModel.GetClientSearchCriteria();
            DataPage <ClientVisitInfo> visits   = clientBusinessLogic.ClientVisit_Find(
                criteria,
                new List <SortCriteria <ClientVisitSortField> >(),
                new PageRequest()
            {
                PageNumber = 1, PageSize = 1000
            });
            FundRequestIndexModel m = new FundRequestIndexModel()
            {
                ClientVisits = visits.Data
                               .Select(item => new ClientVisitFundInfoModel(item)).OrderBy(item => item.Lastname).ToList(),
                SearchCriteriaModel = new ClientVisitSearchCriteriaModel(
                    criteria)
            };

            return(View(m));
        }
예제 #3
0
        public ActionResult ClientVisitReport(ClientVisitReportModel model)
        {
            ClientVisitSearchCriteria criteria = new ClientVisitSearchCriteria();

            criteria.TemporaryPolicyDateFrom = model.CVDateFrom;
            criteria.TemporaryPolicyDateTo   = (model.CVDateTo);
            //criteria.IsActualInVisitGroup = true;
            List <ClientVisitInfo> clientVisits = clientBusinessLogic.ClientVisit_Find(
                criteria,
                new List <SortCriteria <ClientVisitSortField> >(),
                new PageRequest()
            {
                PageNumber = 1, PageSize = int.MaxValue
            }).Data;
            List <Entities.User> listUser    = userBusinessLogic.Find("");
            ClientVisitReport    printedForm = new ClientVisitReport(clientVisits, model.CVDateFrom, model.CVDateTo, listUser);

            return(File(printedForm.GetExcel(),
                        System.Net.Mime.MediaTypeNames.Application.Octet, "Сводный отчет по обращениям.xls"));
        }