public ActionResult Add(Msg_MessageTemplete model) { model.TemplateCon = model.TemplateCon.FilterHtml(); Result <int> result = new Result <int>(); ResultView <int> view = new ResultView <int>(); if (string.IsNullOrEmpty(model.TitleCon)) { view.Flag = false; view.Message = "模板标题内容不能为空"; return(Json(view)); } if (Request.Form["IsEnable"] == EnumState.Enable.ToString()) { model.IsEnable = true; } else { model.IsEnable = false; } if (Request.Form["IsConfirm"] == EnumState.Confirmed.ToString()) { model.IsConfirm = true; } else { model.IsConfirm = false; } using (MessageClientProxy proxy = new MessageClientProxy(ProxyEx(Request))) { result = proxy.AddMessageTemplete(model); view = result.ToResultView(); } return(Json(view)); }