public ActionResult Logout() { LogoutService logoutService = new LogoutService(); logoutService.Logout(); return(RedirectToAction(nameof(Read))); }
private void OnLogout(object sender, EventArgs eventArgs) { LogoutService logoutService = new LogoutService( UIApplication.SharedApplication.Delegate as AppDelegate); logoutService.LogoutStart(); }
public IHttpActionResult PostUser(User user) { LogoutService logoutService = new LogoutService(); logoutService.PostDataOnLogout(user, db); logoutService.PostDataForLoggedOutUser(user, db, loggedInUser); return(CreatedAtRoute("DefaultApi", new { id = user.Id }, user)); }
public LogoutServiceTest() { IMrsCakeDatabaseSettings settings = new MrsCakeDatabaseSettings(); settings.ConnectionString = "mongodb+srv://Alina_Iakimchuk:[email protected]/Mrs_Cake?retryWrites=true&w=majority"; settings.DatabaseName = "Mrs_Cake_Test"; settings.CollectionName_Users = "Login_Logout_Test"; _logoutService = new LogoutService(settings); }
private void LogOutButtonPressed() { var tokenPersistanceService = new TokenPersistanceService(); tokenPersistanceService.RemoveToken(WebApiCred.KeyChainTokenKey); LogoutService logOutService = new LogoutService( UIApplication.SharedApplication.Delegate as AppDelegate); logOutService.LogoutStart(); }
public IHttpActionResult logout([FromBody] UserCredential userCredential) { LogoutService logoutService = new LogoutService(); LogoutResponseDTO response = logoutService.logout(userCredential); if (response.isSuccessful == true) { return(Ok(response.Messages)); } return(Content(HttpStatusCode.NotFound, response.Messages)); }
private void Logout() { try { Mouse.OverrideCursor = Cursors.Wait; using (var logoutService = new LogoutService(_password, _hashBytes, Passwords.ToArray())) { logoutService.Logout(); } } finally { Mouse.OverrideCursor = null; } }
/// <summary> /// TODO : To Define Logout Button Tapped Event... /// </summary> /// <param name="obj"></param> private async void LogoutCommandAsync(object obj) { Settings.IsRemember = false; Settings.Email = String.Empty; Settings.Password = String.Empty; Settings.Role = String.Empty; Settings.UserID = String.Empty; Settings.OpenReportPage = false; Settings.OpenReportNumber = 0; Settings.ProfilePhoto = string.Empty; //FirebaseMessaging.Instance.UnsubscribeFromTopic("news"); LogoutService service = new LogoutService(); await service.LogoutTokenFromApp(Constants.UserProfile.LabID, Constants.UserProfile.Role); await this.Navigation.PushAsync(new Views.Login.LoginPage()); }
public LogoutController(LogoutService logoutService) { _logoutService = logoutService; }
public HomeViewModel() { //// IsMenuListPresented = false; // _menuItemList = new List<Menu>() // { // new Menu {Title = "Homepage", TargetType = typeof(ProfilePage)}, // new Menu {Title = "Laboratory results", TargetType = typeof(LabResultPage)}, // new Menu {Title = "Radiology results", TargetType = typeof(RadioResultPage)}, // new Menu {Title = "Contact Us", TargetType = typeof(ContactUsPage)}, // new Menu {Title = "News", TargetType = typeof(NewsPage)}, // new Menu {Title = "Locate Us", TargetType = typeof(LocationPage)}, // //new Menu {Title = "Billing and payment", TargetType = typeof(RegistrationPage)}, // // new Menu {Title = "Setting", TargetType = typeof(NewsDetailsPage)}, // }; // OnPropertyChanged("MenuItemList"); // MessagingCenter.Subscribe<string>(this, "IsMenuListPresented", async (sender) => // { // // IsMenuListPresented = true; // }); RateCommand = new DelegateCommand(async(s) => { RatingBarView ratingView = new RatingBarView(); bool?dialogResult = await MaterialDialog.Instance.ShowCustomContentAsync(ratingView, "Rate"); if (dialogResult != null && dialogResult.Value) { UserDialogs.Instance.ShowLoading(); var result = await AuthServices.UpdateRating(Constants.UserProfile.Role, Constants.UserProfile.UserID, ratingView.Rating.ToString()); UserDialogs.Instance.HideLoading(); if (result.Success) { UserDialogs.Instance.Alert("Your rating is saved, Thank You!"); } else { UserDialogs.Instance.Alert("Your rating is not saved, Try again later!"); } } }); CloseCommand = new DelegateCommand((s) => { App.HomeView.IsPresented = false; }); GoogleCommand = new DelegateCommand((s) => { Device.OpenUri(new Uri("https://business.google.com/u/1/dashboard/l/03066549321158524192")); App.HomeView.IsPresented = false; }); FacebookCommand = new DelegateCommand((s) => { Device.OpenUri(new Uri("https://www.facebook.com/Saint-Joseph-Medical-Center-603207859770837/?ref=bookmarks")); App.HomeView.IsPresented = false; }); AboutCommand = new DelegateCommand(async(s) => { await App.Current.MainPage.Navigation.PushAsync(new AboutThisAppPage()); App.HomeView.IsPresented = false; }); LogoutCommand = new DelegateCommand(async(s) => { Settings.IsRemember = false; Settings.Email = String.Empty; Settings.Password = String.Empty; Settings.Role = String.Empty; Settings.UserID = String.Empty; Settings.ProfilePhoto = string.Empty; Settings.OpenReportNumber = 0; Settings.OpenReportPage = false; LogoutService service = new LogoutService(); await service.LogoutTokenFromApp(Constants.UserProfile.LabID, Constants.UserProfile.Role); App.Current.MainPage = new NavigationPage(new Views.Login.LoginPage()); //await this.Navigation.PushAsync(new Views.Login.LoginPage()); }); }