void okButton_Click(object sender, RoutedEventArgs e) { if (!ValidateStaff()) return; this.DialogResult = true; this.Close(); }