public ActionResult AddDetails(Epm_TemplateDetails model) { ResultView <string> view = new ResultView <string>(); if (string.IsNullOrEmpty(model.Name)) { view.Flag = false; view.Message = "名称不能为空"; return(Json(view)); } if (model.ParentId == null) { view.Flag = false; view.Message = "父级不能为空"; return(Json(view)); } if (model.TemplateId == null) { view.Flag = false; view.Message = "模板Id不能为空"; return(Json(view)); } Result <long> result = new Result <long>(); using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request))) { result = proxy.AddTemplateDetails(model); } return(Json(result.ToResultView())); }
///<summary> ///修改: ///</summary> ///<param name="model">要修改的model</param> ///<returns>受影响的行数</returns> public Result <int> UpdateTemplateDetails(Epm_TemplateDetails model) { return(base.Channel.UpdateTemplateDetails(model)); }
///<summary> ///添加: ///</summary> ///<param name="model">要添加的model</param> ///<returns>受影响的行数</returns> public Result <long> AddTemplateDetails(Epm_TemplateDetails model) { return(base.Channel.AddTemplateDetails(model)); }