public ActionResult LogOffError() { AppSecurity.Logout(); FormsAuthentication.SignOut(); return(RedirectToAction("Index", "Home")); }
public ActionResult LogOffCompletely(string userName, string password, decimal?totalHotelReceivable, decimal?totalBarReceivable, decimal?totalSales, string closeShift) { closeShift = closeShift.Trim().ToUpper(); EndShift(userName, password, totalHotelReceivable.Value, totalBarReceivable.Value, totalSales.Value, closeShift); AppSecurity.Logout(); FormsAuthentication.SignOut(); return(RedirectToAction("Index", "Home")); }
public ActionResult LogOff() { //var person = AppSecurity.GetUserByUsername(User.Identity.Name); var person = _personService.GetAll(HotelID).FirstOrDefault(x => x.Username.ToUpper() == User.Identity.Name.ToUpper()); if (person.PersonTypeId == (int)PersonTypeEnum.Guest || person.PersonTypeId == (int)PersonTypeEnum.Admin) { if (person != null) { person.Salary = decimal.Zero; _personService.Update(person); } AppSecurity.Logout(); FormsAuthentication.SignOut(); if (IsSelfServiceCentre()) { return(RedirectToAction("SelfService", "Account")); } return(RedirectToAction("NewLogOff")); } var unclearedItems = _tableItemService.GetAll().Where(x => x.Cashier == person.PersonID).Count(); var personModel = new PersonViewModel(); personModel.CanCloseTill = true; if (unclearedItems > 0) { personModel.CanCloseTill = false; } if (person != null) { personModel.TotalHotelRecievable = person.GetTotalHotelRecievable(DateTime.Today); personModel.TotalBarRecievable = person.GetTotalBarRecievable(DateTime.Today); personModel.TotalSales = personModel.TotalHotelRecievable + personModel.TotalBarRecievable; personModel.UserName = person.Username; personModel.Password = person.Password; } return(View(personModel)); }
private async void OnSignoutClicked() { AppSecurity.Logout(); await new LoginPage().SetItAsRootPageAsync(false); }
private void App_Exit(object sender, ExitEventArgs e) { AppSecurity.Logout(); }