Пример #1
0
 public ActionResult Index(string searchString, int?page)
 {
     try
     {
         CSF_Users_DAO objUsersDAO = new CSF_Users_DAO();
         var           users       = objUsersDAO.Search(searchString);
         ViewBag.SearchString = searchString;
         int pageSize   = 10;
         int pageNumber = (page ?? 1);
         users = users.OrderBy(s => s.ID);
         return(View(users));
     }
     catch (Exception ex)
     {
         SetAlert("Lỗi" + ex.Message.ToString(), "error");
         Logs.WriteLog(ex);
         return(View());
     }
 }
Пример #2
0
 public ActionResult Index()
 {
     try
     {
         //if (!this.HasPermission) return RedirectToAction("Unauthorized", "Home");
         CSF_Users_DAO objUsersDAO = new CSF_Users_DAO();
         CSF_Roles_DAO objRolesDAO = new CSF_Roles_DAO();
         var           roles       = objRolesDAO.GetAll();
         TempData["Roles"] = roles.ToList();
         var users = objUsersDAO.Search("").ToList();
         TempData["Users"] = users;
         return(View());
     }
     catch (Exception ex)
     {
         SetAlert("Lỗi" + ex.Message.ToString(), AlertType.Error);
         Logs.WriteLog(ex);
         return(View());
     }
 }