public ActionResult WeChatMenusAdd(VIEW_YX_weiXinMenus model) { var data = false; try { Yx_Menus_Manager.Add(VIEW_YX_weiXinMenus.ToEntity(model)); data = true; return(this.JsonFormat("/admin/WeChatConfig/WeChatMenus", data, SysOperate.Add.ToMessage(data), data)); } catch (Exception) { return(this.JsonFormat(data, data, SysOperate.Add)); } }
public ActionResult WeChatMenusUpdate(VIEW_YX_weiXinMenus model) { var data = false; if (!ModelState.IsValid) { return(this.JsonFormat(ModelState, data, "ERROR")); } var menu = VIEW_YX_weiXinMenus.ToEntity(model); try { Yx_Menus_Manager.Modify(menu, "WX_Fid", "WX_menuName", "WX_MenuType", "WX_MenusKey_URL"); data = true; return(this.JsonFormat("/admin/WeChatConfig/WeChatMenus", data, SysOperate.Update.ToMessage(data), data)); } catch (Exception) { return(this.JsonFormat(data, data, SysOperate.Update)); } }