public ActionResult AllocationBSO(AllocationBSOModel model) { ClientVisitSearchCriteria criteria = new ClientVisitSearchCriteria(); criteria.PartyNumber = model.PartyNumber; criteria.DeliveryCenterIds = model.DeliveryCenterIds; // new List<long>(); criteria.DeliveryPointIds = model.DeliveryPointIds; //new List<long>(); criteria.IsActualInVisitGroup = true; criteria.TemporaryPolicyDateFrom = model.AllocationBSODateFrom; criteria.TemporaryPolicyDateTo = (model.AllocationBSODateTo); List <ClientVisitInfo> clientVisits = clientBusinessLogic.ClientVisit_Find( criteria, new List <SortCriteria <ClientVisitSortField> >(), new PageRequest() { PageNumber = 1, PageSize = int.MaxValue }).Data; if (clientVisits.Count > 65500) { return(RedirectToAction("Index", "PrintedForms", new { m = string.Format("Получено слишком много записей ({0}) в отчете по распределению БСО. Сузьте диапазон выбора!", clientVisits.Count) })); } AllocationBSO printedForm = new AllocationBSO(clientVisits); return(File(printedForm.GetExcel(), System.Net.Mime.MediaTypeNames.Application.Octet, string.Format("Отчет по распределению БСО_{0}.xlsx", DateTime.Now.ToShortDateString()))); }
public PrintedFormsModel() { PartyJournal = new PartyJournalModel(); BSOFailForm13 = new BSOFailForm13Model(); BSOOperativeInformation = new BSOOperativeInformationModel(); BSOReportForm10 = new BSOReportForm10Model(); BSOReportForm10Full = new BSOReportForm10FullModel(); SMSBaseReport = new SMSBaseReportModel(); AllocationBSO = new AllocationBSOModel(); BSOMoveReportYear = new BSOMoveReportYearModel(); ScenarioForm2 = new ScenarioForm2Model(); ClientVisitReport = new ClientVisitReportModel(); SNILSReport = new SNILSReportModel(); StatusReport = new StatusReportModel(); }