private void BtnSearchDoctor_Click(object sender, EventArgs e) { try { using (DBAuditDataContext dc = new DBAuditDataContext()) { // Search progress: var c = dc.ProGetDoctorBillByDoctorID(int.Parse(ComboDoctor.SelectedValue.ToString())); GrdViewDoctorBills.DataSource = c; // Formatting the form BtnSearchDocNo.Enabled = false; BtnSearchPayDate.Enabled = false; BtnSearchDoctor.Enabled = false; TxtDocNo.Text = ""; ComboLocation.Text = ""; } } catch (Exception EX) { MessageBox.Show(EX.Message); } }