public ActionResult Edit([Bind(Include = "Id,MenuAltId,RoleId")] MenuAltRole menuAltRole) { if (ModelState.IsValid) { _menuAltRoleService.Update(menuAltRole); return(RedirectToAction("Index")); } var menuAltlar = _menuAltService.GetList().Select(s => new MyDrop { Id = s.Id, Value = $"{s.LinkText} ({s.MenuId})" }).OrderBy(w => w.Value); var roller = _roleService.GetList().Select(s => new MyDrop { Id = s.Id, Value = s.Name }); ViewBag.MenuAltId = new SelectList(menuAltlar, "Id", "Value"); ViewBag.RoleId = new SelectList(roller, "Id", "Value"); return(View(menuAltRole)); }
public void Update(MenuAltRole menuAltRole) { _menuAltRoleDal.Update(menuAltRole); }
public void Insert(MenuAltRole menuAltRole) { _menuAltRoleDal.Insert(menuAltRole); }