public ActionResult Search(string argsJson) { ControllerResultModel model = new ControllerResultModel(); try { GujiFilterModel filterModel = JsonConvert.DeserializeObject<GujiFilterModel>(argsJson); int totalCount; List<GujiDetailsModel> gujiList = ZhongyiWebsiteHelper.GujiService.Find(filterModel, out totalCount); model.Add("gujiList", gujiList); model.Add("gujiCount", totalCount); } catch(Exception ex) { model.result = false; model.message = ex.Message; } return Json(model); }
public ActionResult Search(string argsJson) { ControllerResultModel model = new ControllerResultModel(); try { GujiFilterModel filterModel = JsonConvert.DeserializeObject <GujiFilterModel>(argsJson); int totalCount; List <GujiDetailsModel> gujiList = ZhongyiWebsiteHelper.GujiService.Find(filterModel, out totalCount); model.Add("gujiList", gujiList); model.Add("gujiCount", totalCount); } catch (Exception ex) { model.result = false; model.message = ex.Message; } return(Json(model)); }
public ActionResult GetChanpinList() { ControllerResultModel resultModel = new ControllerResultModel(); try { ChanpinFilterModel model = JsonConvert.DeserializeObject <ChanpinFilterModel>(Request["argsJson"]); int totalCount; List <ChanpinGridModel> models = WebHelper.ChanpinService.GetChanpin(model, out totalCount); resultModel.Add("chanpinList", models); resultModel.Add("totalCount", totalCount); } catch (Exception ex) { resultModel.result = false; resultModel.message = ex.Message; WebHelper.Logger.Error(ex.Message, ex); } return(Json(resultModel, JsonRequestBehavior.AllowGet)); }
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)); }
public ActionResult SignIn(string account, string password, bool remember, string returnUrl) { ControllerResultModel resultModel = new ControllerResultModel(); try { string token = WebHelper.AuthenticationService.SignIn(account, password, Request.UserHostAddress); resultModel.Add("data", this.Url.Action("Redirect", new { url = returnUrl, token = token, remember = remember })); } catch (Exception ex) { resultModel.result = false; resultModel.message = ex.Message; WebHelper.Logger.Error(ex.Message, ex); } return(Json(resultModel, JsonRequestBehavior.AllowGet)); }
public ActionResult JisuanDingdanMingxi() { ControllerResultModel resultModel = new ControllerResultModel(); try { DingdanMingxiDetailsModel model = JsonConvert.DeserializeObject <DingdanMingxiDetailsModel>(Request["argsJson"]); model = WebHelper.DingdanService.JisuanMingxi(model); resultModel.Add("dingdanMingxi", model); } catch (Exception ex) { resultModel.result = false; resultModel.message = ex.Message; WebHelper.Logger.Error(ex.Message, ex); } return(Json(resultModel, JsonRequestBehavior.AllowGet)); }
public ActionResult JisuanShoukuanTicheng() { ControllerResultModel resultModel = new ControllerResultModel(); try { DingdanDetailsModel dingdanModel = JsonConvert.DeserializeObject <DingdanDetailsModel>(Request["dingdanJson"]); ShoukuanDetailsModel shoukuanModel = JsonConvert.DeserializeObject <ShoukuanDetailsModel>(Request["shoukuanJson"]); double ticheng = WebHelper.DingdanService.JisuanTicheng(dingdanModel, shoukuanModel); resultModel.Add("ticheng", ticheng); } catch (Exception ex) { resultModel.result = false; resultModel.message = ex.Message; WebHelper.Logger.Error(ex.Message, ex); } return(Json(resultModel, JsonRequestBehavior.AllowGet)); }
public ActionResult GetCurrentUserInfo() { ControllerResultModel resultModel = new ControllerResultModel(); try { UserDetailsModel model = new UserDetailsModel(); model.account = this.CurrentUser.Account; model.email = this.CurrentUser.Email; model.id = this.CurrentUser.ID; model.name = this.CurrentUser.Name; resultModel.Add("data", model); } catch (Exception ex) { resultModel.message = ex.Message; WebHelper.Logger.Error(ex.Message, ex); } return(Json(resultModel, JsonRequestBehavior.AllowGet)); }
public ActionResult ExportToExcel() { ControllerResultModel resultModel = new ControllerResultModel(); try { KehuFilterModel model = JsonConvert.DeserializeObject <KehuFilterModel>(Request["argsJson"]); int totalCount; List <KehuGridModel> models = WebHelper.KehuService.GetKehu(model, out totalCount); string fileName = this.ShengchengExcel(models); 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 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 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)); }