public ActionResult GetPageListJson(Pagination pagination, string queryJson) { var watch = CommonHelper.TimerStart(); var queryParam = queryJson.ToJObject(); var para = new ShipFeesEntity(); if (!queryParam["tempid"].IsEmpty()) { para.ShipTempId = queryParam["tempid"].ToString(); } //数据对象 var pageList = ShipFeesBLL.Instance.GetPageList(para, ref pagination); var JsonData = new { rows = pageList, total = pagination.total, page = pagination.page, records = pagination.records, costtime = CommonHelper.TimerEnd(watch) }; return(Content(JsonData.ToJson())); }
public ActionResult SaveForm(string keyValue, ShipFeesEntity entity) { try { if (keyValue != "") { entity.ShipFeesId = keyValue; ShipFeesBLL.Instance.Update(entity); } else { if (entity.ProvinceId == "0") { var count = ShipFeesBLL.Instance.GetList(new ShipFeesEntity() { ProvinceId = entity.ProvinceId, ShipTempId = entity.ShipTempId }).Count; if (count > 0) { return(Error("已设置默认区域")); } } entity.ShipFeesId = Util.Util.NewUpperGuid(); ShipFeesBLL.Instance.Add(entity); } return(Success("保存成功")); } catch (Exception ex) { ex.Data["Method"] = "ShipFeesController>>Save"; new ExceptionHelper().LogException(ex); return(Error("保存失败")); } }
public ActionResult GetFormJson(string keyValue) { var data = new ShipFeesEntity(); try { data = ShipFeesBLL.Instance.GetEntity(keyValue); } catch (Exception ex) { ex.Data["Method"] = "ShipFeesController>>GetFormJson"; new ExceptionHelper().LogException(ex); } return(Content(data.ToJson())); }