private void btnSearch_Click(object sender, EventArgs e) { try { dgvReport.DataSource = rc.GetBugByProject(Convert.ToInt32(cmbProjectName.SelectedValue.ToString())); } catch (Exception ex) { MessageBox.Show(ex.Message); } }