/// calculate the report public static HtmlDocument Calculate( string AHTMLReportDefinition, TParameterList parameterlist) { HTMLTemplateProcessor templateProcessor = new HTMLTemplateProcessor(AHTMLReportDefinition, parameterlist); bool NewTransaction; TDBTransaction ReadTransaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction( IsolationLevel.ReadCommitted, out NewTransaction, "AccountDetailRead"); // get all the transactions string sql = templateProcessor.GetSQLQuery("SelectTransactions"); DataTable transactions = DBAccess.GDBAccessObj.SelectDT(sql, "transactions", ReadTransaction); // get all the balances sql = templateProcessor.GetSQLQuery("SelectBalances"); DataTable balances = DBAccess.GDBAccessObj.SelectDT(sql, "balances", ReadTransaction); if (NewTransaction) { DBAccess.GDBAccessObj.RollbackTransaction(); } // generate the report from the HTML template HtmlDocument html = templateProcessor.GetHTML(); CalculateData(ref html, balances, transactions, templateProcessor); return(html); }
/// calculate the report public static HtmlDocument Calculate( string AHTMLReportDefinition, TParameterList parameterlist) { HTMLTemplateProcessor templateProcessor = new HTMLTemplateProcessor(AHTMLReportDefinition, parameterlist); bool NewTransaction; TDBTransaction ReadTransaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction( IsolationLevel.ReadCommitted, out NewTransaction, "PartnerBySpecialTypesRead"); // get all the partners string sql = templateProcessor.GetSQLQuery("SelectPartners"); DataTable partners = DBAccess.GDBAccessObj.SelectDT(sql, "transactions", ReadTransaction); // TODO: get best address if (NewTransaction) { DBAccess.GDBAccessObj.RollbackTransaction(); } // generate the report from the HTML template HtmlDocument html = templateProcessor.GetHTML(); CalculateData(ref html, partners, templateProcessor); return(html); }
/// calculate the report public static HtmlDocument Calculate( string AHTMLReportDefinition, TParameterList parameterlist) { HTMLTemplateProcessor templateProcessor = new HTMLTemplateProcessor(AHTMLReportDefinition, parameterlist); TDBTransaction ReadTransaction = new TDBTransaction(); DataTable recipients = null; DBAccess.ReadTransaction( ref ReadTransaction, delegate { // get all the recipients string sql = templateProcessor.GetSQLQuery("SelectRecipients"); recipients = ReadTransaction.DataBaseObj.SelectDT(sql, "recipients", ReadTransaction); }); // generate the report from the HTML template HtmlDocument html = templateProcessor.GetHTML(); CalculateData(ref html, recipients, templateProcessor); return(html); }
/// calculate the report public static HtmlDocument Calculate( string AHTMLReportDefinition, TParameterList parameterlist, TDBTransaction ATransaction ) { HTMLTemplateProcessor templateProcessor = new HTMLTemplateProcessor(AHTMLReportDefinition, parameterlist); DataTable recipients = null; // get all the recipients string sql = templateProcessor.GetSQLQuery("SelectRecipients"); recipients = ATransaction.DataBaseObj.SelectDT(sql, "recipients", ATransaction); // ensure consents string needed_consent = parameterlist.Get("param_consent").ToString().Replace("*", "").Replace("%", "").Trim(); recipients = Utils.PartnerRemoveUnconsentReportData(recipients, needed_consent); // generate the report from the HTML template HtmlDocument html = templateProcessor.GetHTML(); CalculateData(ref html, recipients, templateProcessor); return(html); }
/// calculate the report public static HtmlDocument Calculate( string AHTMLReportDefinition, TParameterList parameterlist, TDBTransaction ATransaction) { if (parameterlist.Get("param_city").ToString().Replace("*", "").Replace("%", "").Trim() == String.Empty) { throw new Exception("invalid parameters"); } HTMLTemplateProcessor templateProcessor = new HTMLTemplateProcessor(AHTMLReportDefinition, parameterlist); // get all the partners string sql = templateProcessor.GetSQLQuery("SelectPartners"); DataTable partners = ATransaction.DataBaseObj.SelectDT(sql, "transactions", ATransaction); // TODO: get best address // ensure consents string needed_consent = parameterlist.Get("param_consent").ToString().Replace("*", "").Replace("%", "").Trim(); partners = Utils.PartnerRemoveUnconsentReportData(partners, needed_consent); // generate the report from the HTML template HtmlDocument html = templateProcessor.GetHTML(); CalculateData(ref html, partners, templateProcessor); return(html); }
/// calculate the report public static HtmlDocument Calculate( string AHTMLReportDefinition, TParameterList parameterlist, TDBTransaction ATransaction) { HTMLTemplateProcessor templateProcessor = new HTMLTemplateProcessor(AHTMLReportDefinition, parameterlist); // get all the transactions string sql = templateProcessor.GetSQLQuery("SelectTransactions"); DataTable transactions = ATransaction.DataBaseObj.SelectDT(sql, "transactions", ATransaction); // get all the balances sql = templateProcessor.GetSQLQuery("SelectBalances"); DataTable balances = ATransaction.DataBaseObj.SelectDT(sql, "balances", ATransaction); // generate the report from the HTML template HtmlDocument html = templateProcessor.GetHTML(); CalculateData(ref html, balances, transactions, templateProcessor); return(html); }