private void ButtonSelect_Click(object sender, RoutedEventArgs e) { WindowUserSearch userSearch = new WindowUserSearch(mySqlClient) { Owner = this }; if (userSearch.ShowDialog() != true) { return; } SelectedEmployee = userSearch.SelectedEmployee; UpdateWorkPeriods(); }
private void ButtonEmployeeAddToReport_Click(object sender, RoutedEventArgs e) { WindowUserSearch userSearch = new WindowUserSearch(mySqlClient) { Owner = this }; if (userSearch.ShowDialog() != true) { return; } ItemEmployee employee = userSearch.SelectedEmployee; if (!ReportEmployees.Contains(employee)) { ReportEmployees.Add(employee); } }