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