public HttpResponseMessage ExportMonthExcel(string excelname, string exceltitle, string exceldata, string year, string month, string sourceid)
        {
            StatisticalReportBLL bll = new StatisticalReportBLL();
            //获取导出的数据
            List <StatisticalReportModel> list = bll.GetEventReport(year, month, sourceid);

            //获取导出的Excel表
            CommonFunctionBLL <StatisticalReportModel> cfBll = new CommonFunctionBLL <StatisticalReportModel>(exceldata);

            return(cfBll.saveExcel(list, excelname, exceltitle));
        }
        public HttpResponseMessage ExportYearExcel(string excelname, string exceltitle, string exceldata, string year)
        {
            StatisticalReportBLL bll = new StatisticalReportBLL();
            //获取导出的数据
            DataTable dt = bll.ClassificationStatistics(Convert.ToInt32(year));

            //获取导出的Excel表
            CommonFunctionBLL <StatisticalReportModel> cfBll = new CommonFunctionBLL <StatisticalReportModel>(exceldata);

            return(cfBll.CreateExcel(dt, excelname, exceltitle));
        }
Example #3
0
        public HttpResponseMessage ExportExcel(string excelname, string exceltitle, string exceldata, int type, string filter = null)
        {
            List <Filter> filters = null;

            if (filter != "[]")
            {
                filters = JsonConvert.DeserializeObject <List <Filter> >(filter);
            }

            List <Zfdx_LawStreetStoreModel> list = bll.GetBlackListExcel(type, filters);

            //获取导出的Excel表
            CommonFunctionBLL <Zfdx_LawStreetStoreModel> cfBll = new CommonFunctionBLL <Zfdx_LawStreetStoreModel>(exceldata);

            return(cfBll.saveExcel(list, excelname, exceltitle));
        }
Example #4
0
        public HttpResponseMessage ExportExcel(string excelname, string exceltitle, string exceldata, int month, int year, string filter)
        {
            List <Filter> filters = null;

            if (filter != "[]")
            {
                filters = JsonConvert.DeserializeObject <List <Filter> >(filter);
            }

            List <YH_YhLogModel> list = bll.GetYhLogListExcel(month, year, filters);

            //获取导出的Excel表
            CommonFunctionBLL <YH_YhLogModel> cfBll = new CommonFunctionBLL <YH_YhLogModel>(exceldata);

            return(cfBll.saveExcel(list, excelname, exceltitle));
        }
Example #5
0
        public HttpResponseMessage ExportExcel(string excelname, string exceltitle, string exceldata, string filter = null)
        {
            List <Filter> filters = null;

            if (filter != "[]")
            {
                filters = JsonConvert.DeserializeObject <List <Filter> >(filter);
            }

            List <AlreadyModel> list = bll.GetAlreadySuperviseExcel(filters);

            //获取导出的Excel表
            CommonFunctionBLL <AlreadyModel> cfBll = new CommonFunctionBLL <AlreadyModel>(exceldata);

            return(cfBll.saveExcel(list, excelname, exceltitle));
        }
Example #6
0
        public HttpResponseMessage ExportExcel(string excelname, string exceltitle, string exceldata, string filter = null)
        {
            List <Filter> filters = null;

            if (filter != "[]")
            {
                filters = JsonConvert.DeserializeObject <List <Filter> >(filter);
            }

            Case_SimpleCasesBLL          bll  = new Case_SimpleCasesBLL();
            List <Case_SimpleCasesModel> list = bll.GetSimpleCaseListExcel(filters);

            //获取导出的Excel表
            CommonFunctionBLL <Case_SimpleCasesModel> cfBll = new CommonFunctionBLL <Case_SimpleCasesModel>(exceldata);

            return(cfBll.saveExcel(list, excelname, exceltitle));
        }
Example #7
0
        public HttpResponseMessage ExportExcel()
        {
            HttpRequestBase request      = ((HttpContextWrapper)this.Request.Properties["MS_HttpContext"]).Request;
            string          excelname    = request["excelname"];
            string          exceltitle   = request["exceltitle"];
            string          exceldata    = request["exceldata"];
            string          filter       = request["filter"];
            int             type         = string.IsNullOrEmpty(request["type"])?4:Convert.ToInt32(request["type"]);
            string          filetemppath = System.Web.Hosting.HostingEnvironment.MapPath("~/DocumentTemplate/reportTemplate.xls");

            List <Filter> filters = null;

            if (filter != "[]")
            {
                filters = JsonConvert.DeserializeObject <List <Filter> >(filter);
            }

            if (type == 1)
            {
                List <view_casestatistical> list = bll.GetCommonCaseListExcel(filters);
                CommonFunctionBLL <view_casestatistical> cfBll = new CommonFunctionBLL <view_casestatistical>(exceldata);
                return(cfBll.saveExcel(9, filetemppath, "", list, excelname, exceltitle, 0));
            }
            else if (type == 2)
            {
                List <Case_SimpleCasesModel> list = bll.GetSimpleCaseListExcel(filters);
                CommonFunctionBLL <Case_SimpleCasesModel> cfBll = new CommonFunctionBLL <Case_SimpleCasesModel>(exceldata);
                return(cfBll.saveExcel(list, excelname, exceltitle));
            }
            else if (type == 3)
            {
                List <Case_SimpleCasesModel> list = bll.GetSimpleCaseListExcel(filters);
                CommonFunctionBLL <Case_SimpleCasesModel> cfBll = new CommonFunctionBLL <Case_SimpleCasesModel>(exceldata);
                return(cfBll.saveExcel(list, excelname, exceltitle));
            }
            else
            {
                List <Case_SimpleCasesModel> list = bll.GetSimpleCaseListExcel(filters);
                CommonFunctionBLL <Case_SimpleCasesModel> cfBll = new CommonFunctionBLL <Case_SimpleCasesModel>(exceldata);
                return(cfBll.saveExcel(list, excelname, exceltitle));
            }
        }
Example #8
0
        public HttpResponseMessage ExportExcel()
        {
            HttpRequestBase request    = ((HttpContextWrapper)this.Request.Properties["MS_HttpContext"]).Request;
            string          excelname  = request["excelname"];
            string          exceltitle = request["exceltitle"];
            string          exceldata  = request["exceldata"];
            string          filter     = request["filter"];

            List <Filter> filters = null;

            if (filter != "[]")
            {
                filters = JsonConvert.DeserializeObject <List <Filter> >(filter);
            }

            List <QW_CheckinModel> list = bll.GetCheckinExportExcel(filters);
            CommonFunctionBLL <QW_CheckinModel> cfBll = new CommonFunctionBLL <QW_CheckinModel>(exceldata);

            return(cfBll.saveExcel(list, excelname, exceltitle));
        }
Example #9
0
        public HttpResponseMessage ExportExcel()
        {
            HttpRequestBase request    = ((HttpContextWrapper)this.Request.Properties["MS_HttpContext"]).Request;
            string          excelname  = request["excelname"];
            string          exceltitle = request["exceltitle"];
            string          exceldata  = request["exceldata"];
            string          filter     = request["filter"];
            int             status     = string.IsNullOrEmpty(request["status"]) ? 0 : Convert.ToInt32(request["status"]);
            int             userid     = Convert.ToInt32(request["userid"]);

            List <Filter> filters = null;

            if (filter != "[]")
            {
                filters = JsonConvert.DeserializeObject <List <Filter> >(filter);
            }

            Zxzz_SpecialTaskBLL   bll  = new Zxzz_SpecialTaskBLL();
            List <Zxzz_TaskModel> list = bll.GetSpecialTaskListExcel(userid, status, filters);

            CommonFunctionBLL <Zxzz_TaskModel> cfBll = new CommonFunctionBLL <Zxzz_TaskModel>(exceldata);

            return(cfBll.saveExcel(list, excelname, exceltitle));
        }