public async void DoAddItem() { if (AddNewCustomer.Password == AddNewCustomer.ConfirmPassword) { CustomersCatalogVm.Add(AddNewCustomer); await _getMembers.SavetoJson(CustomersCatalogVm); _frameNavigation.ActivateFrameNavigation(typeof(MainPage)); } else { MessageDialog msd = new MessageDialog("password incorrect", "error"); msd.ShowAsync(); } }
public static async void LoginUser(User userToLogIn) { User foundUser = FindUser(userToLogIn); bool succesfullyLogIn = CheckPassword(foundUser, userToLogIn); if (succesfullyLogIn) { CurrentSessioncs.CurrentUser = foundUser; CurrentSessioncs.StartSession(); FrameNavigationClass.ActivateFrameNavigation(typeof(HomeView)); } else { MessageDialog msg = new MessageDialog("Username or Password was incorrect. Please try again.", "No Acces"); await msg.ShowAsync(); } }