public ActionResult ExportToExcel() { ControllerResultModel resultModel = new ControllerResultModel(); try { DingdanFilterModel model = JsonConvert.DeserializeObject <DingdanFilterModel>(Request["argsJson"]); model.start = 0; model.size = 5000; DingdanListModel listModel = WebHelper.DingdanService.GetDingdan(model); string fileName = this.ShengchengExcel(listModel.dingdanList); 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 GetDingdanList() { ControllerResultModel resultModel = new ControllerResultModel(); try { DingdanFilterModel model = JsonConvert.DeserializeObject <DingdanFilterModel>(Request["argsJson"]); DingdanListModel listModel = WebHelper.DingdanService.GetDingdan(model); resultModel.Add("dingdanList", listModel.dingdanList); resultModel.Add("totalCount", listModel.totalCount); resultModel.Add("tichengSum", listModel.tichengSum.ToString("0.00")); resultModel.Add("weishoukuanJineSum", listModel.weishoukuanJineSum.ToString("0.00")); resultModel.Add("yingshoukuanJineSum", listModel.yingshoukuanJineSum.ToString("0.00")); resultModel.Add("yishoukuanJineSum", listModel.yishoukuanJineSum.ToString("0.00")); } catch (Exception ex) { resultModel.result = false; resultModel.message = ex.Message; WebHelper.Logger.Error(ex.Message, ex); } return(Json(resultModel, JsonRequestBehavior.AllowGet)); }