/// <summary>
 /// TO serch the datas and fill the grid
 /// </summary>
 public void Search()
 {
     try
     {
         if (cmbVoucherType.Items.Count != 0 && cmbAccountLedger.Items.Count != 0)
         {
             if ((cmbAccountLedger.SelectedValue.ToString() != "System.Data.DataRowView") && (cmbVoucherType.SelectedValue.ToString() != "System.Data.DataRowView"))
             {
                 if (txtFromDate.Text.Trim() != string.Empty && txtToDate.Text.Trim() != string.Empty)
                 {
                     string strFromDate = txtFromDate.Text;
                     string strToDate = txtToDate.Text;
                     decimal decVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
                     decimal decLedgerId = Convert.ToDecimal(cmbAccountLedger.SelectedValue.ToString());
                     List<DataTable> listObjDebitNoteReport = new List<DataTable>();
                     //DebitNoteMasterSP spDebitNoteMaster = new DebitNoteMasterSP();
                     DebitNoteBll bllDebitNote = new DebitNoteBll();
                     listObjDebitNoteReport = bllDebitNote.DebitNoteReportSearch(strFromDate, strToDate, decVoucherTypeId, decLedgerId);
                     dgvDebitNoteReport.DataSource = listObjDebitNoteReport[0];
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("DRNTREP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }