/// <summary>
 /// Function to check the voucher type and fill the corresponding vouchertype in VoucherType combobox
 /// </summary>
 /// <param name="strVoucherType"></param>
 public void CallFromVoucherMenu(string strVoucherType)
 {
     try
     {
         if (formMDI.strVouchertype == "POS")
         {
             VoucherType = "POS";
         }
         else
             VoucherType = strVoucherType;
         VoucherTypeBll BllVoucherType = new VoucherTypeBll();
         List<DataTable> listObjVouchetType = new List<DataTable>();
         listObjVouchetType = BllVoucherType.VoucherTypeSelectionComboFill(strVoucherType);
         int inCount = listObjVouchetType[0].Rows.Count;
         cmbVoucherType.DataSource = listObjVouchetType[0];
         cmbVoucherType.ValueMember = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = -1;
         if (inCount == 1)
         {
             cmbVoucherType.SelectedValue = listObjVouchetType[0].Rows[0].ItemArray[0].ToString();
             btnGo_Click(btnGo, EventArgs.Empty);
         }
         else
         {
             base.Show();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("VTS1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to fill AgainstVoucherType combobox
 /// </summary>
 /// <param name="strVoucherType"></param>
 public void AgainstVoucherTypeComboFill(string strVoucherType)
 {
     VoucherTypeBll BllVoucherType = new VoucherTypeBll();
     List<DataTable> listObj = new List<DataTable>();
     try
     {
         listObj = BllVoucherType.VoucherTypeSelectionComboFill(strVoucherType);
         DataRow drow = listObj[0].NewRow();
         drow["voucherTypeId"] = 0;
         drow["voucherTypeName"] = "All";
         listObj[0].Rows.InsertAt(drow, 0);
         cmbAgainstVoucherType.DataSource = listObj[0];
         cmbAgainstVoucherType.ValueMember = "voucherTypeId";
         cmbAgainstVoucherType.DisplayMember = "voucherTypeName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("PIREP4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 ///  Function to fill VoucherType combobox
 /// </summary>
 public void VoucherTypeComboLoad()
 {
     try
     {
         VoucherTypeBll BllVoucherType = new VoucherTypeBll();
         List<DataTable> listObjVouchetType = new List<DataTable>();
         listObjVouchetType = BllVoucherType.VoucherTypeSelectionComboFill("Journal Voucher");
         DataRow dr = listObjVouchetType[0].NewRow();
         dr[0] = 0;
         dr[1] = "ALL";
         listObjVouchetType[0].Rows.InsertAt(dr, 0);
         cmbVoucherType.DataSource = listObjVouchetType[0];
         cmbVoucherType.ValueMember = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         MessageBox.Show("JVREP2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to fill VoucherType combobox
 /// </summary>
 public void VoucherTypeComboFill()
 {
     try
     {
         List<DataTable> listObjVoucherTypes = new List<DataTable>();
         VoucherTypeBll BllVoucherType = new VoucherTypeBll();
         listObjVoucherTypes = BllVoucherType.VoucherTypeSelectionComboFill("Service Voucher");
         DataRow dr = listObjVoucherTypes[0].NewRow();
         dr["voucherTypeId"] = 0;
         dr["voucherTypeName"] = "All";
         listObjVoucherTypes[0].Rows.InsertAt(dr, 0);
         cmbVoucherType.DataSource = listObjVoucherTypes[0];
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.ValueMember = "voucherTypeId";
         cmbVoucherType.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         MessageBox.Show("SVRT 6 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to fill vouchertype combobox 
 /// </summary>
 /// <param name="strVoucherType"></param>
 public void VoucherTypeComboFill(string strVoucherType)
 {
     VoucherTypeBll BllVoucherType = new VoucherTypeBll();
     List<DataTable> listObj = new List<DataTable>();
     try
     {
         listObj = BllVoucherType.VoucherTypeSelectionComboFill(strVoucherType);
         cmbVoucherType.DataSource = listObj[0];
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.ValueMember = "voucherTypeId";
     }
     catch (Exception ex)
     {
         MessageBox.Show("PI4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Voucher Type Combobox Fill
 /// </summary>
 public void VoucherTypeComboFill()
 {
     try
     {
         List<DataTable> listObjVoucherType = new List<DataTable>();
         VoucherTypeBll BllVoucherType = new VoucherTypeBll();
         listObjVoucherType = BllVoucherType.VoucherTypeSelectionComboFill("Material Receipt");
         cmbVoucherType.DataSource = listObjVoucherType[0];
         cmbVoucherType.ValueMember = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = -1;
     }
     catch (Exception ex)
     {
         MessageBox.Show("RO27:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }