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)); }
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)); }