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