private void schDepartment_changee(object sender, EventArgs e) { int idOfDep = DBConnection.GetDepartmentID(schDepartment.Text); DataTable dt = DBConnection.SelectWorkersByDep(idOfDep); dataGridView1.DataSource = dt; }