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

            try
            {
                DingdanMingxiFilterModel model = JsonConvert.DeserializeObject <DingdanMingxiFilterModel>(Request["argsJson"]);
                model.start = 0;
                model.size  = 5000;
                DingdanMingxiListModel listModel = WebHelper.DingdanService.GetDingdanMingxi(model);
                string fileName = this.ShengchengExcel(listModel.dingdanMingxiList);
                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));
        }
예제 #2
0
        public ActionResult GetDingdanMingxiList()
        {
            ControllerResultModel resultModel = new ControllerResultModel();

            try
            {
                DingdanMingxiFilterModel model     = JsonConvert.DeserializeObject <DingdanMingxiFilterModel>(Request["argsJson"]);
                DingdanMingxiListModel   listModel = WebHelper.DingdanService.GetDingdanMingxi(model);
                resultModel.Add("dingdanMingxiList", listModel.dingdanMingxiList);
                resultModel.Add("totalCount", listModel.totalCount);
                resultModel.Add("zongjineSum", listModel.zongjineSum);
                resultModel.Add("yewufeiSum", listModel.yewufeiSum);
                resultModel.Add("tichengSum", listModel.tichengSum);
                resultModel.Add("fahuoJineSum", listModel.fahuoJineSum);
            }
            catch (Exception ex)
            {
                resultModel.result  = false;
                resultModel.message = ex.Message;
                WebHelper.Logger.Error(ex.Message, ex);
            }
            return(Json(resultModel, JsonRequestBehavior.AllowGet));
        }