コード例 #1
0
        public IActionResult DummyCredentials()
        {
            dUser model = new dUser();

            ViewBag.lst_users = model.GetDummyUsers();

            return(View());
        }
コード例 #2
0
        public ActionResult ValidateLogin(string pUserName, string pPassword)
        {
            dUser model    = new dUser();
            bool  b_exists = model.ValidateUser(pUserName, pPassword);

            //we force the Action to call the action Index() from HomeController
            if (b_exists)
            {
                ViewBag.LoginError = string.Empty;
                return(RedirectToAction("Index", "Home"));
            }

            else
            {
                return((ActionResult)ErrorLogin());
            }
        }