Пример #1
0
        public List <StatementInfo> Statement_Find(StatementSearchCriteria criteria)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.AddInputParameter("@CountView", SqlDbType.BigInt, criteria.CountView);
            parameters.AddInputParameter("@StatementID", SqlDbType.BigInt, criteria.StatementID);
            parameters.AddInputParameter("@Firstname", SqlDbType.NVarChar, criteria.Firstname);
            parameters.AddInputParameter("@Secondname", SqlDbType.NVarChar, criteria.Secondname);
            parameters.AddInputParameter("@Lastname", SqlDbType.NVarChar, criteria.Lastname);
            parameters.AddInputParameter("@Birthday", SqlDbType.Date, criteria.Birthday);
            parameters.AddInputParameter("@SubjectInsuranceID", SqlDbType.BigInt, criteria.SubjectInsuranceID);
            parameters.AddInputParameter("@CreateDateFrom", SqlDbType.Date, criteria.CreateDateFrom);
            parameters.AddInputParameter("@CreateDateTo", SqlDbType.Date, criteria.CreateDateTo);
            parameters.AddInputParameter("@LastStatusDateFrom", SqlDbType.Date, criteria.LastStatusDateFrom);
            parameters.AddInputParameter("@LastStatusDateTo", SqlDbType.Date, criteria.LastStatusDateTo);
            parameters.AddInputParameter("@LastStatementStatusID", SqlDbType.BigInt, criteria.LastStatementStatusID);
            parameters.AddInputParameter("@CuratorID", SqlDbType.BigInt, criteria.CuratorID);
            parameters.AddInputParameter("@ResponsibleID", SqlDbType.BigInt, criteria.ResponsibleID);
            parameters.AddInputParameter("@ReasonID", SqlDbType.BigInt, criteria.ReasonID);
            parameters.AddInputParameter("@ExpertiseID", SqlDbType.BigInt, criteria.ExpertiseID);
            parameters.AddInputParameter("@ExecutiveID", SqlDbType.BigInt, criteria.ExecutiveID);
            //SqlParameter totalCountParameter = parameters.AddOutputParameter("@total_count", SqlDbType.Int);
            //parameters.AddInputParameter("@sort_criteria", SqlDbType.Structured, DaoHelper.GetSortFieldsTable(sortCriteria));
            //parameters.AddInputParameter("@Page_size", SqlDbType.Int, pageRequest.PageSize);
            //parameters.AddInputParameter("@Page_number", SqlDbType.Int, pageRequest.PageNumber);
            List <StatementInfo> result = Execute_GetList(StatementInfoMaterializer.Instance, "Statement_Find", parameters);

            return(result);
        }
Пример #2
0
        public List <BaseReport> GetBaseReport(StatementSearchCriteria criteria)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.AddInputParameter("@CountView", SqlDbType.BigInt, criteria.CountView);
            parameters.AddInputParameter("@StatementID", SqlDbType.BigInt, criteria.StatementID);
            parameters.AddInputParameter("@Firstname", SqlDbType.NVarChar, criteria.Firstname);
            parameters.AddInputParameter("@Secondname", SqlDbType.NVarChar, criteria.Secondname);
            parameters.AddInputParameter("@Lastname", SqlDbType.NVarChar, criteria.Lastname);
            parameters.AddInputParameter("@Birthday", SqlDbType.Date, criteria.Birthday);
            parameters.AddInputParameter("@SubjectInsuranceID", SqlDbType.BigInt, criteria.SubjectInsuranceID);
            parameters.AddInputParameter("@CreateDateFrom", SqlDbType.Date, criteria.CreateDateFrom);
            parameters.AddInputParameter("@CreateDateTo", SqlDbType.Date, criteria.CreateDateTo);
            parameters.AddInputParameter("@LastStatusDateFrom", SqlDbType.Date, criteria.LastStatusDateFrom);
            parameters.AddInputParameter("@LastStatusDateTo", SqlDbType.Date, criteria.LastStatusDateTo);
            parameters.AddInputParameter("@LastStatementStatusID", SqlDbType.BigInt, criteria.LastStatementStatusID);
            parameters.AddInputParameter("@CuratorID", SqlDbType.BigInt, criteria.CuratorID);
            parameters.AddInputParameter("@ResponsibleID", SqlDbType.BigInt, criteria.ResponsibleID);
            parameters.AddInputParameter("@ExecutiveID", SqlDbType.BigInt, criteria.ExecutiveID);

            List <BaseReport> result = Execute_GetList(BaseReportMaterializer.Instance, "report.BaseReport", parameters);

            //List<BaseReport> result = Execute_GetList(BaseReportMaterializer.Instance, "report.BaseReport", parameters);
            return(result);
        }
Пример #3
0
        public async Task <JsonResult> SearchJournal(StatementSearchCriteria filter)
        {
            try
            {
                var journal = statementBusinessLogic.Statement_Find(filter);

                return(Json(journal));
            }
            catch (Exception ex)
            {
                Response.StatusCode = (int)HttpStatusCode.InternalServerError;
                var exceptionDetails = new ExceptionDetails(ex, "Ошибка при получении списка обращений.");
                return(Json(exceptionDetails));
            }
        }
Пример #4
0
        public ActionResult GetBaseReport(BaseReportModel model)
        {
            StatementSearchCriteria criteria = new StatementSearchCriteria();

            criteria.CountView          = null;
            criteria.CreateDateFrom     = model.DateBaseReportFrom;
            criteria.CreateDateTo       = model.DateBaseReportTo.AddDays(1);
            criteria.LastStatusDateFrom = model.BaseReportStatusDateFrom;
            if (model.BaseReportStatusDateTo.HasValue)
            {
                criteria.LastStatusDateTo = model.BaseReportStatusDateTo.Value.AddDays(1);
            }
            criteria.LastStatementStatusID = model.StatusID;

            List <Entities.Report.BaseReport> list    = reportBusinessLogic.GetBaseReport(criteria);
            List <ReferenceItem> listSubjectInsurance = ReferencesProvider.GetReferenceItems(Constants.RefSubjectInsurance);
            List <ReferenceItem> listStatus           = ReferencesProvider.GetReferenceItems(Constants.RefStatus);
            List <User>          listUser             = userBusinessLogic.Find(" ");

            PrintedForms.BaseReport printedForm = new PrintedForms.BaseReport(list, listSubjectInsurance, listStatus, listUser);
            return(File(printedForm.GetExcel(),
                        System.Net.Mime.MediaTypeNames.Application.Octet, "Отчет по обращениям.xlsx"));
        }
Пример #5
0
 public List <BaseReport> GetBaseReport(StatementSearchCriteria criteria)
 {
     return(ReportDao.Instance.GetBaseReport(criteria));
 }
Пример #6
0
 public List <StatementInfo> Statement_Find(StatementSearchCriteria criteria)
 {
     return(StatementDao.Instance.Statement_Find(criteria));
 }