コード例 #1
0
ファイル: HomeController.cs プロジェクト: RAMUNIMMALA/efinpro
        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
ファイル: UserController.cs プロジェクト: RAMUNIMMALA/efinpro
 // 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)));
 }