//Users edit, delete, add event handlers private void Users_EditClickedEventHandler(object sender, RoutedEventArgs e) { UserAccount userAccount = UsersDataGrid.SelectedItem as UserAccount; User_AddEdit editUserForm = new User_AddEdit(UserAccounts, Ctx, userAccount); editUserForm.Show(); }
private void UsersDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (UsersDataGrid.SelectedItem == UsersDataGrid.Items[UsersDataGrid.Items.Count - 1]) { User_AddEdit userAddEdit = new User_AddEdit(UserAccounts, Ctx); userAddEdit.Show(); UsersDataGrid.SelectedItem = null; } }
private void Users_AddClickedEventHandler(object sender, RoutedEventArgs e) { User_AddEdit addUserForm = new User_AddEdit(UserAccounts, Ctx); addUserForm.Show(); }