Esempio n. 1
0
        public ActionResult Delete(string id = null)
        {
            RoleList         roleList = new RoleList();
            List <RoleClass> obj      = roleList.GetRoleClasses(id);

            return(View(obj.FirstOrDefault()));
        }
Esempio n. 2
0
        // 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));
        }