//UPDATE DETAILS private void ButtonUpdateTrainee_Click(object sender, RoutedEventArgs e) { this.Close(); UpdateTrainee upTrainee = new UpdateTrainee(); upTrainee.receiveTrainee(currentTrainee); upTrainee.Show(); }
private void Button_Click(object sender, RoutedEventArgs e) { try { //This is special to the password box, because it not depency property //And I dont have to worry about htis because password we just do one time. trainee._password = passwordBox.Password; bl.addTrainee(trainee); //The continue if there isnt excemption this.Close(); UpdateTrainee upTrainee = new UpdateTrainee(); upTrainee.receiveTrainee(trainee); upTrainee.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }