private void BtnSearchContractor_Click(object sender, EventArgs e) { // Formatting the form Start ComboLocation.Text = ""; TxtDocNo.Text = ""; ComboInsuranceStatus.Text = ""; ComboReservedStatues.Text = ""; // Formatting the form End // // Search operation Start try { using (DBAuditDataContext dc = new DBAuditDataContext()) { var c = dc.ProGetProjectByContractorID(int.Parse(ComboContractor.SelectedValue.ToString())); GrdViewProject.DataSource = c; } } catch (Exception EX) { MessageBox.Show(EX.Message); } // Search Operation End }