Beispiel #1
0
 /// <summary>
 /// On 'Print' button click to print
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvPayHead.RowCount > 0)
         {
             DataSet   ds          = new DataSet();
             PayHeadSP spPayHead   = new PayHeadSP();
             DataTable dtbl        = spPayHead.PayHeadViewAllForPayHeadReport(cmbPayHead.Text, cmbType.Text);
             CompanySP spCompany   = new CompanySP();
             DataTable dtblCompany = spCompany.CompanyViewDataTable(1);
             frmReport frmreport   = new frmReport();
             frmreport.MdiParent = formMDI.MDIObj;
             ds.Tables.Add(dtbl);
             ds.Tables.Add(dtblCompany);
             frmreport.PayHeadReport(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PHR:7 " + ex.Message;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         PayHeadSP spPayHead = new PayHeadSP();
         DataTable dtbl      = spPayHead.PayHeadViewAllForPayHeadReport(cmbPayHead.Text, cmbType.Text);
         dgvPayHead.DataSource = dtbl;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PHR:2 " + ex.Message;
     }
 }