/// <summary>
 /// On 'Print' button click to take print
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvAdvancePayment.Rows.Count > 0)
         {
             DataSet ds = new DataSet();
             //CompanySP spCompany = new CompanySP();
             CompanyCreationBll bllCompanyCreation = new CompanyCreationBll();
             List <DataTable>   listObjCompany     = bllCompanyCreation.CompanyViewDataTable(1);
             ds.Tables.Add(listObjCompany[0]);
             AdvancePaymentBll bllAdvancePayment = new AdvancePaymentBll();
             List <DataTable>  listObj           = new List <DataTable>();
             listObj = bllAdvancePayment.AdvancePaymentViewAllForAdvancePaymentReport(dtpFrmDate.Value, dtpToDate.Value, cmbEmployeeCode.Text, DateTime.Parse(dtpSalaryMonth.Text.ToString()));
             ds.Tables.Add(listObj[0]);
             frmReport frmReportObj = new frmReport();
             frmReportObj.MdiParent = formMDI.MDIObj;
             frmReportObj.AdvancePaymentReportPrinting(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("APR:8" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// On 'Print' button click to take print
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvAdvancePayment.Rows.Count > 0)
         {
             DataSet   ds          = new DataSet();
             CompanySP spCompany   = new CompanySP();
             DataTable dtblCompany = spCompany.CompanyViewDataTable(1);
             ds.Tables.Add(dtblCompany);
             AdvancePaymentSP spAdvancePayment   = new AdvancePaymentSP();
             DataTable        dtblAdvancePayment = new DataTable();
             dtblAdvancePayment = spAdvancePayment.AdvancePaymentViewAllForAdvancePaymentReport(dtpFrmDate.Value, dtpToDate.Value, cmbEmployeeCode.Text, DateTime.Parse(dtpSalaryMonth.Text.ToString()));
             ds.Tables.Add(dtblAdvancePayment);
             frmReport frmReportObj = new frmReport();
             frmReportObj.MdiParent = formMDI.MDIObj;
             frmReportObj.AdvancePaymentReportPrinting(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "APR:8 " + ex.Message;
     }
 }
 /// <summary>
 /// On 'Print' button click to take print
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvAdvancePayment.Rows.Count > 0)
         {
             DataSet ds = new DataSet();
             //CompanySP spCompany = new CompanySP();
             CompanyCreationBll bllCompanyCreation = new CompanyCreationBll();
             List<DataTable> listObjCompany = bllCompanyCreation.CompanyViewDataTable(1);
             ds.Tables.Add(listObjCompany[0]);
             AdvancePaymentBll bllAdvancePayment = new AdvancePaymentBll();
             List<DataTable> listObj = new List<DataTable>();
             listObj = bllAdvancePayment.AdvancePaymentViewAllForAdvancePaymentReport(dtpFrmDate.Value, dtpToDate.Value, cmbEmployeeCode.Text, DateTime.Parse(dtpSalaryMonth.Text.ToString()));
             ds.Tables.Add(listObj[0]);
             frmReport frmReportObj = new frmReport();
             frmReportObj.MdiParent = formMDI.MDIObj;
             frmReportObj.AdvancePaymentReportPrinting(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("APR:8" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }