private void GoBackButton(object sender, RoutedEventArgs e) { var BackMyAccount = new MyAccount(); BackMyAccount.Show(); this.Close(); }
private void MyAccountClick(object sender, RoutedEventArgs e) { var next_window_myaccount = new MyAccount(); next_window_myaccount.Show(); this.Close(); }
private void ChangePasswordButton(object sender, RoutedEventArgs e) { if (ExistingPasswordBox.Password == State.User.Password) { if (NewPasswordBox1.Password == NewPasswordBox2.Password) { State.User.Password = NewPasswordBox1.Password; API.ctx.Customers.Update(State.User); API.ctx.SaveChanges(); MessageBox.Show("Successfully changed password", "Password Changed", MessageBoxButton.OK, MessageBoxImage.Information); var BackMyAccount = new MyAccount(); BackMyAccount.Show(); this.Close(); } else { MessageBox.Show("New password not matching", "Password Error", MessageBoxButton.OK, MessageBoxImage.Information); } } else { MessageBox.Show("Wrong Existing Password", "Password Error", MessageBoxButton.OK, MessageBoxImage.Information); } }