public ActionResult Index(LoginModel model) { var result = new AccountModel().Login(model.UserName, model.PassWord); if (result && ModelState.IsValid) { SectionHelper.SetSection(new UserSection() { UserName = model.UserName }); return(RedirectToAction("Index", "Home")); } else { ModelState.AddModelError("", "Tao đố mày biết tên đăng nhập hay mật khẩu sai :) "); } return(View(model)); }