public ActionResult Logout() { FormsService.SignOut(); return(RedirectToAction("Login", "Account")); }
// ************************************** // URL: /Account/LogOff // ************************************** public ActionResult LogOff() { FormsService.SignOut(); return(RedirectToAction("Index", "Home")); }
// ************************************** // URL: /Account/LogOff // ************************************** public virtual ActionResult LogOff() { FormsService.SignOut(); return(RedirectToAction(MVC.Home.Index())); }
public ActionResult LogOff() { FormsService.SignOut(); return(RedirectToAction("LogOn")); }
// ************************************** // URL: /Account/LogOff // ************************************** public ActionResult LogOff() { ProjectTracker.Library.Security.PTPrincipal.Logout(); FormsService.SignOut(); return(RedirectToAction("Index", "Home")); }
public ActionResult LogOff() { FormsService.SignOut(); Session.Clear(); return(RedirectToAction("LogOn", "Account")); }
//[HttpPost] //public ActionResult LogOn(LogOnModel model, string returnUrl) //{ // if (ModelState.IsValid) // { // if (MembershipService.ValidateUser(model.UserName, model.Password)) // { // FormsService.SignIn(model.UserName, model.RememberMe); // if (Url.IsLocalUrl(returnUrl)) // { // return Redirect(returnUrl); // } // else // { // return RedirectToAction("Index", "Home"); // } // } // else // { // ModelState.AddModelError("", "提供的用户名或密码不正确。"); // } // } // // 如果我们进行到这一步时某个地方出错,则重新显示表单 // return View(model); //} // ************************************** // URL: /Account/LogOff // ************************************** public ActionResult LogOff() { FormsService.SignOut(); return(View()); }
public virtual ActionResult Edit(Customer customer) { var emailExists = hopeLingerieEntities.Customers.SingleOrDefault(a => a.CustomerId != customer.CustomerId && a.Email == customer.Email && a.Active); if (emailExists != null) { TempData["Message"] = "El Email ingresado ya existe en nuestra base de datos!"; TempData["ActionType"] = ActionType.Back; return(Redirect("/Account/Information")); } var newCustomer = hopeLingerieEntities.Customers.SingleOrDefault(a => a.CustomerId == customer.CustomerId && a.Active); newCustomer.BirthDate = customer.BirthDate; newCustomer.Cellular = customer.Cellular; newCustomer.City = customer.City; newCustomer.DNI = customer.DNI; newCustomer.Fax = customer.Fax; newCustomer.FirstName = customer.FirstName; newCustomer.LastName = customer.LastName; newCustomer.NewsLetter = customer.NewsLetter; newCustomer.Number = customer.Number; newCustomer.StateId = customer.StateId; newCustomer.Telephone1 = customer.Telephone1; newCustomer.Telephone2 = customer.Telephone2; newCustomer.Telephone3 = customer.Telephone3; newCustomer.ZipCode = customer.ZipCode; newCustomer.Gender = customer.Gender; newCustomer.Address = customer.Address; if (!customer.NewsLetter) { var newsLetter = hopeLingerieEntities.NewsLetters.SingleOrDefault(x => x.Email == newCustomer.Email); hopeLingerieEntities.NewsLetters.DeleteObject(newsLetter); } else { var newsLetter = hopeLingerieEntities.NewsLetters.SingleOrDefault(x => x.Email == newCustomer.Email); if (newsLetter != null) { newsLetter.Email = customer.Email; newsLetter.Name = customer.LastName + ", " + customer.FirstName; } else { newsLetter = new NewsLetter(); newsLetter.Email = customer.Email; newsLetter.Name = customer.LastName + ", " + customer.FirstName; newsLetter.AddedDate = DateTime.Now; hopeLingerieEntities.NewsLetters.AddObject(newsLetter); } } // Si hay cambio de mail lo desloguea. if (newCustomer.Email != customer.Email) { newCustomer.Email = customer.Email; hopeLingerieEntities.SaveChanges(); FormsService.SignOut(); TempData["Message"] = "Tu cuenta ha sido modificada con éxito! Al modificar el Email deberás ingresar nuevamente al sitio"; TempData["ActionType"] = ActionType.Catalogue; return(Redirect("/Account/Information")); } hopeLingerieEntities.SaveChanges(); TempData["Message"] = "Tu cuenta ha sido modificada con éxito!"; TempData["ActionType"] = ActionType.Catalogue; return(Redirect("/Account/Information")); }
// ************************************** // URL: /Account/LogOff // ************************************** public ActionResult LogOff() { FormsService.SignOut(); return(RedirectToAction("Index", "Main", new { area = "" })); }
// ************************************** // URL: /Account/LogOff // ************************************** public ActionResult LogOff() { FormsService.SignOut(); Session.Remove("Usuario"); return(RedirectToAction("Index", "Home")); }
// ************************************** // URL: /Customer/LogOff // ************************************** public ActionResult LogOff() { FormsService.SignOut(); Session.Add("accountNumber", null); return(RedirectToAction("Index", "Home")); }