public ActionResult WeChatMenuSetDetail(string id, string type) { var wid = TypeParser.ToInt32(id); ViewBag.Menu_ID = wid; ViewBag.TYPE = type; ViewBag.WX_NewsTypes = DataSelect.ToListViewModel(ConfigSettings.GetSysConfigList("WECHATNEWSTYPE")); var model = new VIEW_YX_MenusMsg() { MID = 0, Event_ID = wid, Event_Type = type, EventCate = "menu" }; switch (type) { case "1": model = VIEW_YX_MenusMsg.ToViewModel(VIEW_YX_text.ToViewModel(Yx_Text_M.Get(n => n.EventId == wid && n.EventCate == "menu"))); break; case "2": model = VIEW_YX_MenusMsg.ToViewModel(VIEW_YX_news.ToViewModel(Yx_News_M.Get(n => n.EventId == wid && n.EventCate == "menu"))); break; } return(View(model)); }
public VIEW_YX_text GetClickMenusText(int eventId, string EventCate = "menu") { return(VIEW_YX_text.ToViewModel(base.Get(t => t.EventId == eventId && t.EventCate == EventCate))); }