/// <summary>
        /// Function to print report
        /// </summary>
        /// <param name="fromDate"></param>
        /// <param name="toDate"></param>
        public void Print(DateTime fromDate, DateTime toDate)
        {
            try
            {
                FinancialStatementBll bllFinancialStatement = new FinancialStatementBll();
                AccountGroupBll       bllAccountGroup       = new AccountGroupBll();
                DataSet          dsAccountGroup             = new DataSet();
                List <DataTable> ListObj = bllAccountGroup.AccountGroupReportFill(fromDate, toDate);
                string           strSum  = lblBalanceTotal.Text;
                DataTable        dtblSum = new DataTable();
                dtblSum.Columns.Add("Sum", typeof(string));
                DataRow dr = dtblSum.NewRow();
                dr[0] = strSum;
                dtblSum.Rows.InsertAt(dr, 0);

                List <DataTable> listCompany = bllFinancialStatement.FundFlowReportPrintCompany(1);
                dsAccountGroup.Tables.Add(ListObj[0]);
                dsAccountGroup.Tables.Add(listCompany[0]);
                dsAccountGroup.Tables.Add(dtblSum);
                frmReport frmReport = new frmReport();
                frmReport.MdiParent = formMDI.MDIObj;
                frmReport.AccountGroup(dsAccountGroup);
            }
            catch (Exception ex)
            {
                MessageBox.Show("AGR:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 /// <summary>
 /// Function to print report
 /// </summary>
 /// <param name="fromDate"></param>
 /// <param name="toDate"></param>
 public void Print(DateTime fromDate, DateTime toDate)
 {
     try
     {
         FinancialStatementSP spFinance = new FinancialStatementSP();
         AccountGroupSP spAccountGroup = new AccountGroupSP();
         DataSet dsAccountGroup = new DataSet();
         DataTable dtblAccountGroup = spAccountGroup.AccountGroupReportFill(fromDate, toDate);
         string strSum = lblBalanceTotal.Text;
         DataTable dtblSum = new DataTable();
         dtblSum.Columns.Add("Sum", typeof(string));
         DataRow dr = dtblSum.NewRow();
         dr[0] = strSum;
         dtblSum.Rows.InsertAt(dr, 0);
         
         DataTable dtblCompany = spFinance.FundFlowReportPrintCompany(1);
         dsAccountGroup.Tables.Add(dtblAccountGroup);
         dsAccountGroup.Tables.Add(dtblCompany);
         dsAccountGroup.Tables.Add(dtblSum);
         frmReport frmReport = new frmReport();
         frmReport.MdiParent = formMDI.MDIObj;
         frmReport.AccountGroup(dsAccountGroup);
     }
     catch (Exception ex)
     {
         MessageBox.Show("AGR:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #3
0
        /// <summary>
        /// Function to print report
        /// </summary>
        /// <param name="fromDate"></param>
        /// <param name="toDate"></param>
        public void Print(DateTime fromDate, DateTime toDate)
        {
            try
            {
                FinancialStatementSP spFinance      = new FinancialStatementSP();
                AccountGroupSP       spAccountGroup = new AccountGroupSP();
                DataSet   dsAccountGroup            = new DataSet();
                DataTable dtblAccountGroup          = spAccountGroup.AccountGroupReportFill(fromDate, toDate);
                string    strSum  = lblBalanceTotal.Text;
                DataTable dtblSum = new DataTable();
                dtblSum.Columns.Add("Sum", typeof(string));
                DataRow dr = dtblSum.NewRow();
                dr[0] = strSum;
                dtblSum.Rows.InsertAt(dr, 0);

                DataTable dtblCompany = spFinance.FundFlowReportPrintCompany(1);
                dsAccountGroup.Tables.Add(dtblAccountGroup);
                dsAccountGroup.Tables.Add(dtblCompany);
                dsAccountGroup.Tables.Add(dtblSum);
                frmReport frmReport = new frmReport();
                frmReport.MdiParent = formMDI.MDIObj;
                frmReport.AccountGroup(dsAccountGroup);
            }
            catch (Exception ex)
            {
                formMDI.infoError.ErrorString = "AGR1:" + ex.Message;
            }
        }