Пример #1
0
        public ActionResult Login()
        {
            AccountLoginVM model = new AccountLoginVM();

            TryUpdateModel(model);

            AuthenticationService.AuthenticateConsultant(model.Username, model.Password);
            if (AuthenticationService.LoggedConsultant != null)
            {
                if (!String.IsNullOrEmpty(model.RedirectUrl))
                {
                    return(Redirect(model.RedirectUrl));
                }
                return(RedirectToAction("Index", "Home"));
            }
            return(View(model));
        }