Пример #1
0
 /// <summary>
 /// On print button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         DateTime  FromDate    = this.dtpFromDate.Value;
         DateTime  ToDate      = this.dtpToDate.Value;
         DataSet   ds          = new DataSet();
         CompanySP spcompany   = new CompanySP();
         DataTable dtblProduct = dtbl.Copy();
         DataTable dtblCompany = spcompany.CompanyViewDataTable(1);
         if (dgvProductBatch.Rows.Count > 0)
         {
             DataTable dtblNew = dtbl.Copy();
             ds.Tables.Add(dtblCompany);
             ds.Tables.Add(dtblProduct);
             frmReport frmReport = new frmReport();
             frmReport.MdiParent = formMDI.MDIObj;
             frmReport.ProductBatchReportPrinting(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PVSBR9:" + ex.Message;
     }
 }