public ActionResult Login(User user) { var res = FormsAuthentication.Authenticate(user.Name, user.Password); if (res) { FormsAuthentication.SetAuthCookie(user.Name, false); return(View("Index", RepositoryRoom.GetRooms())); } else { ModelState.AddModelError("", "Не коррекный логин или пароль"); return(View()); } return(View()); }
public ActionResult Del(int Id) { RepositoryRoom.Del(Id); return(View("Index", RepositoryRoom.GetRooms())); }
public ActionResult Index() { return(View(RepositoryRoom.GetRooms())); }