public ActionResult MenuChildrenField(int id) { int count = MenuBO.GetInstance().GetMenuCount(id); ChildrenFieldUIModel model = new ChildrenFieldUIModel() { ID = id, Count = count, ClassName = "Menu" }; return(View("ChildrenField", model)); }
public ActionResult Menu() { List <MenuDataModel> menus = MenuBO.GetInstance().GetParentMenus(); List <MenuUIModel> model = new List <MenuUIModel>(); foreach (var item in menus) { model.Add(new MenuUIModel() { Item = item , Children = MenuBO.GetInstance().GetByMenu(item.ID) }); } return(View(model)); }
public ActionResult Delete(int id) { MenuBO.GetInstance().Delete(id); return(Json(new { success = true }, JsonRequestBehavior.AllowGet)); }
public ActionResult Create(MenuDataModel menu) { MenuBO.GetInstance().Create(menu); return(RedirectToAction("Index")); }
public ActionResult Edit(int id) { return(View(MenuBO.GetInstance().Get(id))); }
// // GET: /ManageMenu/ public ActionResult Index(int id = 0) { return(View(MenuBO.GetInstance().GetAll(id))); }