Example #1
0
 /// <summary>
 /// print button click, call the print function
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (DGVClraranceReport.RowCount > 0)
         {
             PDCClearanceMasterSP SPPdcClearance = new PDCClearanceMasterSP();
             DataSet dsPDCClearance = new DataSet();
             dsPDCClearance = SPPdcClearance.PDCClearanceReportPrinting(Convert.ToDateTime(dtpFrmDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbAccountLedger.Text.ToString(), cmbVoucherType.Text.ToString(), txtVoucherNo.Text.ToString(), 1);
             frmReport frmreport = new frmReport();
             frmreport.MdiParent = formMDI.MDIObj;
             frmreport.PDCClearanceReportPrinting(dsPDCClearance);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PCREP12:" + ex.Message;
     }
 }