// GET: Admin/Menu/Edit/5 public ActionResult Edit(long id) { MenuDao dbMenu = new MenuDao(); MenuTypeDao dbMenuType = new MenuTypeDao(); Menu menu = null; try { menu = dbMenu.FindByID(id); var items = GetClientMenuViewModel(); ViewBag.ParentID = new SelectList(items, "ID", "Text", menu.ParentID); ViewBag.GroupID = new SelectList(dbMenuType.ToList(), "ID", "Name"); } catch { ModelState.AddModelError("", Resources.ResourceAdmin.ErrorGetRecordMessage); } return(View(menu)); }
// GET: Admin/Menu/Details/5 public ActionResult Details(long id) { MenuDao bdDao = new MenuDao(); return(View(bdDao.FindByID(id))); }