public ActionResult List() { List <MenuViewModel> menu = new List <MenuViewModel>( MenuRepo.All() ); foreach (var item in menu) { item.ParentName = MenuRepo.getParentName(item.menu_parent == null ? 0 : (long)item.menu_parent); } return(PartialView("_List", menu)); }
public ActionResult Edit(MenuViewModel model) { var userid = (long)Session["userid"]; ViewBag.ListMenu = new SelectList(MenuRepo.All(null), "id", "title");//untuk dropdownlist ResponResultViewModel result = MenuRepo.Update(model, userid); return(Json(new { success = result.Success, message = result.Message, entity = result.Entity }, JsonRequestBehavior.AllowGet)); }
public ActionResult Edit(long id) { ViewBag.MenuList = new SelectList(MenuRepo.All(), "id", "title"); return(PartialView("_Edit", MenuRepo.ById(id))); }
public ActionResult Create() { ViewBag.MenuList = new SelectList(MenuRepo.All(), "id", "title"); return(PartialView("_Create")); }
//Edit public ActionResult Edit(int id) { ViewBag.ListMenu = new SelectList(MenuRepo.All(null), "id", "title");//untuk dropdownlist return(PartialView("_Edit", MenuRepo.GetMenu(id))); }
//Create public ActionResult Create() { ViewBag.ListMenu = new SelectList(MenuRepo.All(null), "id", "title");//untuk dropdownlist return(PartialView("_Create")); }
// List public ActionResult List(string search) { return(PartialView("_List", MenuRepo.All(search))); }
// GET: Menu public ActionResult Index(string search) { return(View(MenuRepo.All(search))); }
public ActionResult ListMenu() { return(PartialView("_ListMenu", MenuRepo.All())); }