private void btnConfirmTutor_Click(object sender, RoutedEventArgs e) { // General input handling Dictionary <String, String> inputValues = new Dictionary <string, string>(); inputValues.Add("Social security number", tbxSsn.Text); inputValues.Add("First name", tbxFirstName.Text); inputValues.Add("Last Name", tbxLastName.Text); inputValues.Add("Email", tbxEmail.Text); inputValues.Add("Password", tbxRePassword.Password); String message; if (!InputHandler.IsFieldsFilledOut(out message, inputValues)) { tvm.Status = message; } else if (!tbxPassword.Password.Equals(tbxRePassword.Password)) { tvm.Status = "Passwords does not match!"; } else { String hashedPassword = PasswordUtility.HashPassword(tbxPassword.Password); tvm.AddTutor(tbxSsn.Text, tbxFirstName.Text, tbxLastName.Text, tbxEmail.Text, hashedPassword); ((Panel)this.Parent).Children.Remove(this); } }
private void BtnAddToPlannedSessions_Click(object sender, RoutedEventArgs e) { TutoringSession tmpTs = (TutoringSession)dgAvailableSessions.SelectedItem; tvm.AddTutor(tmpTs); }