Beispiel #1
0
        public ActionResult ExportToExcel()
        {
            ControllerResultModel resultModel = new ControllerResultModel();

            try
            {
                ShoukuanFilterModel model = JsonConvert.DeserializeObject <ShoukuanFilterModel>(Request["argsJson"]);
                model.start = 0;
                model.size  = 5000;
                ShoukuanListModel listModel = WebHelper.DingdanService.GetShoukuan(model);
                string            fileName  = this.ShengchengExcel(listModel.shoukuanList);
                resultModel.Add("fileName", fileName);
            }
            catch (Exception ex)
            {
                resultModel.result  = false;
                resultModel.message = ex.Message;
                WebHelper.Logger.Error(ex.Message, ex);
            }
            return(Json(resultModel, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public ActionResult GetShoukuanList()
        {
            ControllerResultModel resultModel = new ControllerResultModel();

            try
            {
                ShoukuanFilterModel model     = JsonConvert.DeserializeObject <ShoukuanFilterModel>(Request["argsJson"]);
                ShoukuanListModel   listModel = WebHelper.DingdanService.GetShoukuan(model);
                resultModel.Add("shoukuanList", listModel.shoukuanList);
                resultModel.Add("totalCount", listModel.totalCount);
                resultModel.Add("shoukuanJineSum", listModel.shoukuanJineSum);
                resultModel.Add("tichengSum", listModel.tichengSum);
            }
            catch (Exception ex)
            {
                resultModel.result  = false;
                resultModel.message = ex.Message;
                WebHelper.Logger.Error(ex.Message, ex);
            }
            return(Json(resultModel, JsonRequestBehavior.AllowGet));
        }