Пример #1
0
        public ActionResult Index(Users _userdetails)
        {
            string returnAction     = null;
            string returnController = null;

            _daUsers = new DA_Users();
            try
            {
                _users = _daUsers.VerifyUserLogin(_userdetails.MailID, _userdetails.Password);
                if (_users != null)
                {
                    if (_users.Status)
                    {
                        Session["userdata"] = _users;
                        returnAction        = "Dashboard";
                        returnController    = "Home";
                    }
                    else
                    {
                        ViewBag.Login    = "******";
                        returnAction     = "Index";
                        returnController = "Home";
                    }
                }
                else
                {
                    ViewBag.Login = "******";
                }
            }
            catch (Exception ex)
            {
                ViewBag.alertMessage = ErrorMessage;
            }
            return(RedirectToAction(returnAction, returnController));
        }
Пример #2
0
 // GET: Active User List
 public ActionResult Index(int?page)
 {
     try
     {
         _dausers = new DA_Users();
         users    = _dausers.GetUsers();
     }
     catch (Exception ex)
     {
         ViewBag.alertMessage = ErrorMessage;
     }
     return(View(users.ToList().ToPagedList(page ?? 1, 5)));
 }