public ActionResult Authorization(CustomerModel model) { _customerServices = new CustomerServices(); if (_customerServices.Authorization(model) != 0) { if (_customerServices.GetRoleByLogin(model.Login) == "user") { TempData["idUser"] = _customerServices.GetIdByLogin(model.Login); return(RedirectToAction("ListTheaterForUser", "Theater")); } else { return(RedirectToAction("Index", "AdminPage")); } } else { ModelState.AddModelError("Password", "Login or password entered incorrectly"); } return(View(model)); }