private void disableEmployeeButton_Click(object sender, RoutedEventArgs e) { String firstName = inputFirstNameBox.Text; String lastName = inputLastNameBox.Text; // verify valid name fields if (String.IsNullOrEmpty(firstName) || String.IsNullOrEmpty(lastName)) { ClearAll(); outputTextBlock.Text = "Please enter both first and last names"; return; } try { SqlManage.DisableEmployee(firstName, lastName); } catch (SqlException ex) { ClearAll(); outputTextBlock.Text = ex.Message; } catch (IOException ex) { ClearAll(); outputTextBlock.Text = ex.Message; } ClearAll(); outputTextBlock.Text = String.Format("Disabled {0} {1}", firstName, lastName); }