Example #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
     {
         dtblItems.Clear();
         foreach (TreeNode child in tvChartOfAccount.Nodes)
         {
             DataRow dr = dtblItems.NewRow();
             dr["name"] = child.Text;
             dr["type"] = "group";
             dtblItems.Rows.Add(dr);
             if (child.IsExpanded)
             {
                 NodePrint(child);
             }
         }
         frmReport frmReportView = new frmReport();
         frmReportView.MdiParent = formMDI.MDIObj;
         frmReportView.PrintChartOfAccounts(dtblItems);
     }
     catch (Exception ex)
     {
         MessageBox.Show("COA:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #2
0
 /// <summary>
 /// On 'Print' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         dtblItems.Clear();
         foreach (TreeNode child in tvChartOfAccount.Nodes)
         {
             DataRow dr = dtblItems.NewRow();
             dr["name"] = child.Text;
             dr["type"] = "group";
             dtblItems.Rows.Add(dr);
             if (child.IsExpanded)
             {
                 NodePrint(child);
             }
         }
         frmReport frmReportView = new frmReport();
         frmReportView.MdiParent = formMDI.MDIObj;
         frmReportView.PrintChartOfAccounts(dtblItems);
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "COA4:" + ex.Message;
     }
 }
 /// <summary>
 /// On 'Print' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         dtblItems.Clear();
         foreach (TreeNode child in tvChartOfAccount.Nodes)
         {
             DataRow dr = dtblItems.NewRow();
             dr["name"] = child.Text;
             dr["type"] = "group";
             dtblItems.Rows.Add(dr);
             if (child.IsExpanded)
             {
                 NodePrint(child);
             }
         }
         frmReport frmReportView = new frmReport();
         frmReportView.MdiParent = formMDI.MDIObj;
         frmReportView.PrintChartOfAccounts(dtblItems);
     }
     catch (Exception ex)
     {
         MessageBox.Show("COA:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }