/// <summary> /// Opens Create Update Employee in Add mode /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAdd(object sender, RoutedEventArgs e) { //Open in Add Mode var subfrmCreateUpdateDelete = new subfrmCreateUpdateEmployee(_user); subfrmCreateUpdateDelete.ShowDialog(); }
/// <summary> /// Action Event Handler for Edit /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEdit(object sender, RoutedEventArgs e) { //Get username from datagrid var selectedEmployee = (Employee)globalEmployeeList.SelectedItem; var username = selectedEmployee.Username; //Open in Edit Mode var subfrmCreateUpdateDelete = new subfrmCreateUpdateEmployee(_user, username); subfrmCreateUpdateDelete.ShowDialog(); }