public ActionResult Delete(string id = null) { RoleList roleList = new RoleList(); List <RoleClass> obj = roleList.GetRoleClasses(id); return(View(obj.FirstOrDefault())); }
// GET: Role public ActionResult Index(string strSearch) { RoleList roleList = new RoleList(); List <RoleClass> obj = roleList.GetRoleClasses(string.Empty).OrderBy(x => x.Id_Role).ToList(); if (!string.IsNullOrEmpty(strSearch)) { obj = obj.Where(x => x.Name.Contains(strSearch)).ToList(); } @ViewBag.strSearch = strSearch; return(View(obj)); }