private void FillDepartmentComboBox() { DataSet dataSet = DBConnection.SelectAllDepartments(); if (dataSet.Tables[0].Rows.Count >= 1) { for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++) { Department.AddDepartmentToList(new Department(dataSet.Tables[0].Rows[i]["Name"].ToString())); schDepartment.Items.Add(dataSet.Tables[0].Rows[i]["Name"].ToString()); } } }