AccountProfile.Controllers.AccountController.LogOn C# (CSharp) Метод

LogOn() приватный Метод

private LogOn ( LogOnModel model, string returnUrl ) : System.Web.Mvc.ActionResult
model AccountProfile.Models.LogOnModel
returnUrl string
Результат System.Web.Mvc.ActionResult
        public ActionResult LogOn(LogOnModel model, string returnUrl)
        {
            if (ModelState.IsValid)
            {
                if (MembershipService.ValidateUser(model.UserName,
                                                   model.Password))
                {
                    FormsService.SignIn(model.UserName, model.RememberMe);
                    if (!String.IsNullOrEmpty(returnUrl))
                    {
                        return Redirect(returnUrl);
                    }
                    else
                    {
                        return RedirectToAction("Index", "Home");
                    }
                }
                else
                {
                    ModelState.AddModelError("",
                        "The user name or password provided is incorrect.");
                }
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }

Same methods

AccountController::LogOn ( ) : System.Web.Mvc.ActionResult
AccountController::LogOn ( LogOnModel model, bool rememberMe, string returnUrl ) : System.Web.Mvc.ActionResult