Exemplo n.º 1
0
        public ActionResult Index(LoginIndexModel model)
        {
            UserInfo user = this.IUserInfoDataProvider.FindUserInfoByUserNameAndPassword(model.UserName, model.Password);

            if (user != null)
            {
                FormsAuthentication.SetAuthCookie(user.ID.ToString(), true);
                return RedirectToAction("Index", "Home", null);
            }
            else
            {
                model.IsFail = true;
                return View(model);
            }
        }
Exemplo n.º 2
0
 // GET: Login
 public ActionResult Index()
 {
     LoginIndexModel model = new LoginIndexModel();
     return View(model);
 }