private void btnEdit_Click(object sender, RoutedEventArgs e) { Employee = SelectUserFromList(); if (null != Employee) { _profile = new PgUserProfile(_userManager, Employee, editMode: true); this.NavigationService.Navigate(_profile); } else { MessageBox.Show("Please select an employee to edit", "Select An Employee", MessageBoxButton.OK, MessageBoxImage.Error); } }
private void btnAdd_Click(object sender, RoutedEventArgs e) { _profile = new PgUserProfile(_userManager, addMode: true); this.NavigationService.Navigate(_profile); }
private void dgEmployeeList_MouseDoubleClick(object sender, MouseButtonEventArgs e) { _profile = new PgUserProfile(_userManager, SelectUserFromList()); this.NavigationService.Navigate(_profile); }