当前位置: 首页>>代码示例>>C#>>正文


C# IO.ExecuteDataSetQuery方法代码示例

本文整理汇总了C#中IO.ExecuteDataSetQuery方法的典型用法代码示例。如果您正苦于以下问题:C# IO.ExecuteDataSetQuery方法的具体用法?C# IO.ExecuteDataSetQuery怎么用?C# IO.ExecuteDataSetQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IO的用法示例。


在下文中一共展示了IO.ExecuteDataSetQuery方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: exportRevenueDataDump_Click

 protected void exportRevenueDataDump_Click(object sender, EventArgs e)
 {
     try
     {
         List<System.Data.SqlClient.SqlParameter> spParams = new List<System.Data.SqlClient.SqlParameter>();
         spParams.Add(Param.CreateParam("STARTDATE", System.Data.SqlDbType.Date, DateTime.Now));
         spParams.Add(Param.CreateParam("ENTRYDATESTART", System.Data.SqlDbType.Date, "1/1/2002"));
         spParams.Add(Param.CreateParam("ENTRYDATEEND", System.Data.SqlDbType.Date, DateTime.Now));
         spParams.Add(Param.CreateParam("COMPANYID", System.Data.SqlDbType.Int, Convert.ToInt32(dropDownCompany.SelectedValue)));
         spParams.Add(Param.CreateParam("TRANSITY", System.Data.SqlDbType.VarChar, "Y"));
         spParams.Add(Param.CreateParam("TRANSITN", System.Data.SqlDbType.VarChar, "N"));
         spParams.Add(Param.CreateParam("REVENUETYPE", System.Data.SqlDbType.VarChar, "M"));
         spParams.Add(Param.CreateParam("ORDERBY", System.Data.SqlDbType.VarChar, "CONTRACT_NUMBER"));
         spParams.Add(Param.CreateParam("SHOWCONSOLIDATED", System.Data.SqlDbType.Int, 1));
         spParams.Add(Param.CreateParam("EXCLUDEMTA", System.Data.SqlDbType.Int, 1));
         spParams.Add(Param.CreateParam("STARTYEAR", System.Data.SqlDbType.Int, Convert.ToInt32(dropDownStartYear.SelectedValue)));
         using (IO io = new IO(WebCommon.ConnectionString))
         {
             WebCommon.ExportHtmlToExcel("RevenueFlashDataDump", WebCommon.DataTableToHtmlTable(io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("OnlineFlash_GetRevFlashDataDump", spParams)).Tables[0], "RevenueFlashDataDump"));
         }
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
     }
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:26,代码来源:FlashDataDump.aspx.cs

示例2: GetContractDetail

 public static Hashtable GetContractDetail(Hashtable values)
 {
     Hashtable contractDetailValues = new Hashtable();
     DataSet contractDetailData;
     using (IO io = new IO(WebCommon.ConnectionString))
     {
         contractDetailData = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("",
             Param.CreateParam("contractNumber", SqlDbType.Int, Convert.ToInt32(values["CONTRACTNUMBER"])),
             Param.CreateParam("companyId", SqlDbType.Int, Convert.ToInt32(values["COMPANYID"]))));
     }
     contractDetailValues["CONTRACT_NUMBER"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "CONTRACT_NUMBER", "");
     contractDetailValues["CONTRACT_ENTRY_DATE"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "CONTRACT_ENTRY_DATE", "");
     contractDetailValues["CONTRACT_START_DATE"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "CONTRACT_START_DATE", "");
     contractDetailValues["AGENCY"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "AGENCY", "");
     contractDetailValues["CONTACT_NAME"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "CONTACT_NAME", "");
     contractDetailValues["AGENCY_FEE"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "AGENCY_FEE", "");
     contractDetailValues["ADVERTISER"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "ADVERTISER", "");
     contractDetailValues["PROGRAM"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "PROGRAM", "");
     contractDetailValues["AGENCY_PO_NUMBER"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "AGENCY_PO_NUMBER", "");
     contractDetailValues["AE1_NAME"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "AE1_NAME", "");
     contractDetailValues["AE2_NAME"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "AE2_NAME", "");
     contractDetailValues["AE3_NAME"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "AE3_NAME", "");
     contractDetailValues["PRODUCT_CLASS_DESCRIPTION"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "PRODUCT_CLASS_DESCRIPTION", "");
     contractDetailValues["LOCAL_OR_NATIONAL"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "LOCAL_OR_NATIONAL", "");
     contractDetailValues["HAS_ATTACHMENTS"] = IO.GetDataRowValue(contractDetailData.Tables[0].Rows[0], "HAS_ATTACHMENTS", "0");
     contractDetailValues["LINE_ITEM_TABLE"] = OnlineFlashReport.BuildDetailLineItemTable(contractDetailData);
     contractDetailValues["TRANSACTIONS_TABLE"] = OnlineFlashReport.BuildDetailTransactionsTable(contractDetailData);
     return contractDetailValues;
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:29,代码来源:contractDetailPopup.aspx.cs

示例3: excelExport_Click

 /// <summary>TBD</summary>
 /// <param name="sender">TBD</param>
 /// <param name="e">TBD</param>
 protected void excelExport_Click(object sender, ImageClickEventArgs e)
 {
     Hashtable spParams = new Hashtable();
     string reportName = "MTA Invoices w/Payments and Notes";
     try
     {
         DataSet reportData;
         using (IO io = new IO(WebCommon.ConnectionString))
         {
             reportData = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("Collections_GetMTAInvoiceNotesGrid"));
         }
         WebCommon.WriteDebugMessage(string.Format("MTA Invoice Report Exported by: {0}", Security.GetCurrentUserId));
         WebCommon.ExportHtmlToExcel("MTAInvoiceReport", WebCommon.DataTableToHtmlTable(reportData.Tables[0], reportName));
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
     }
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:22,代码来源:mtaInvoiceNotes.aspx.cs

示例4: LoadSearchParams

 public static Hashtable LoadSearchParams(string userId, string screen)
 {
     DataSet searchParamsData;
     using (IO io = new IO(WebCommon.ConnectionString))
     {
         searchParamsData = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("APP_GETUSERPREFERENCES",
             Param.CreateParam("USERID", SqlDbType.VarChar, userId),
             Param.CreateParam("SCREEN", SqlDbType.VarChar, screen)));
     }
     Hashtable searchParams = new Hashtable();
     if (searchParamsData != null && searchParamsData.Tables[0].Rows.Count > 0)
     {
         foreach (DataRow row in searchParamsData.Tables[0].Rows)
         {
             searchParams.Add(row["CONTROL"], row["VALUE"]);
         }
     }
     return searchParams;
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:19,代码来源:IOService.cs

示例5: excelExport_Click

 /// <summary>TBD</summary>
 /// <param name="sender">TBD</param>
 /// <param name="e">TBD</param>
 protected void excelExport_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         WebCommon.WriteDebugMessage(string.Format("Quattro-CCNs Report Exported by: {0}", Security.GetCurrentUserId));
         DataSet ds;
         using (IO io = new IO(WebCommon.ConnectionString))
         {
             ds = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("QUATTRO_GETCONTRACTCCNS",
                 Param.CreateParam("SORTBY", SqlDbType.VarChar, "ATTACHMENT_DATE"),
                 Param.CreateParam("SORTDIR", SqlDbType.VarChar, "DESC"),
                 Param.CreateParam("ATTACHMENTDATEFROM", SqlDbType.Date, new DateTime(2002, 1, 1)),
                 Param.CreateParam("ATTACHMENTDATETO", SqlDbType.Date, DateTime.Now)));
         }
         WebCommon.ExportHtmlToExcel("QuattroCCNReport", WebCommon.DataTableToHtmlTable(ds.Tables[0], "Quattro CCN Report"));
     }
     catch (System.Threading.ThreadAbortException)
     {
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
     }
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:27,代码来源:ccn_report.aspx.cs

示例6: GetProdOverridesGrid

 public XmlDocument GetProdOverridesGrid(int page, int rows, string sidx, string sord, bool _search)
 {
     XmlDocument xmlDoc = new XmlDocument();
     try
     {
         List<System.Data.SqlClient.SqlParameter> spParams = new List<System.Data.SqlClient.SqlParameter>();
         spParams.Add(Param.CreateParam("SORTBY", SqlDbType.VarChar, sidx));
         spParams.Add(Param.CreateParam("SORTDIR", SqlDbType.VarChar, sord));
         if (_search)
         {
             if (!String.IsNullOrEmpty(HttpContext.Current.Request["CONTRACT_NUMBER"]))
             {
                 spParams.Add(Param.CreateParam("CONTRACTNUMBER", SqlDbType.VarChar, HttpContext.Current.Request["CONTRACT_NUMBER"]));
             }
             if (!String.IsNullOrEmpty(HttpContext.Current.Request["ENTERED_BY"]))
             {
                 spParams.Add(Param.CreateParam("ENTEREDBY", SqlDbType.VarChar, Convert.ToString(HttpContext.Current.Request["ENTERED_BY"])));
             }
         }
         //if the text box contained a search string, apply it:
         DataSet ds;
         using (IO io = new IO(WebCommon.ConnectionString))
         {
             ds = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("Commissions_GetProdOverrideGrid", spParams));
         }
         xmlDoc.LoadXml(WebCommon.GetGridData(ds.Tables[0], string.Empty, page, rows));
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
     }
     return xmlDoc;
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:33,代码来源:IOService.cs

示例7: GetMediaFormRollupGrid

 public XmlDocument GetMediaFormRollupGrid(int page, int rows, string sidx, string sord, bool _search)
 {
     XmlDocument xmlDoc = new XmlDocument();
     try
     {
         List<System.Data.SqlClient.SqlParameter> spParams = new List<System.Data.SqlClient.SqlParameter>();
         if (_search)
         {
             if (!String.IsNullOrEmpty(HttpContext.Current.Request["MEDIA_TYPE_DESCRIPTION"]))
             {
                 spParams.Add(Param.CreateParam("MEDIA_TYPE_DESCRIPTION", SqlDbType.VarChar, Convert.ToString(HttpContext.Current.Request["MEDIA_TYPE_DESCRIPTION"])));
             }
             if (!String.IsNullOrEmpty(HttpContext.Current.Request["MEDIA_FORM_DESCRIPTION"]))
             {
                 spParams.Add(Param.CreateParam("MEDIA_FORM_DESCRIPTION", SqlDbType.VarChar, Convert.ToString(HttpContext.Current.Request["MEDIA_FORM_DESCRIPTION"])));
             }
             if (!String.IsNullOrEmpty(HttpContext.Current.Request["ROLLUP_NAME"]))
             {
                 spParams.Add(Param.CreateParam("ROLLUP_NAME", SqlDbType.VarChar, Convert.ToString(HttpContext.Current.Request["ROLLUP_NAME"])));
             }
             if (!String.IsNullOrEmpty(HttpContext.Current.Request["SHOULD_BE"]))
             {
                 spParams.Add(Param.CreateParam("SHOULD_BE", SqlDbType.VarChar, Convert.ToString(HttpContext.Current.Request["SHOULD_BE"])));
             }
         }
         if (!String.IsNullOrEmpty(sidx))
         {
             spParams.Add(Param.CreateParam("SORTBY", SqlDbType.VarChar, sidx));
         }
         if (!String.IsNullOrEmpty(sord))
         {
             spParams.Add(Param.CreateParam("SORTDIR", SqlDbType.VarChar, sord));
         }
         DataSet ds;
         using (IO io = new IO(WebCommon.ConnectionString))
         {
             ds = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("MASTERDATA_GETMEDIAFORMROLLUPGRID", spParams));
         }
         xmlDoc.LoadXml(WebCommon.GetGridData(ds.Tables[0], string.Empty, page, rows));
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
     }
     return xmlDoc;
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:46,代码来源:IOService.cs

示例8: GetEthnicityGrid

 public XmlDocument GetEthnicityGrid(int page, int rows, string sidx, string sord, bool _search)
 {
     XmlDocument xmlDoc = new XmlDocument();
     try
     {
         List<System.Data.SqlClient.SqlParameter> spParams = new List<System.Data.SqlClient.SqlParameter>();
         if (!String.IsNullOrEmpty(sidx))
         {
             spParams.Add(Param.CreateParam("SORTBY", SqlDbType.VarChar, sidx));
         }
         if (!String.IsNullOrEmpty(sord))
         {
             spParams.Add(Param.CreateParam("SORTDIR", SqlDbType.VarChar, sord));
         }
         DataSet ds;
         using (IO io = new IO(WebCommon.ConnectionString))
         {
             ds = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("DIGITALLIBRARY_GETETHNICITYGRID", spParams));
         }
         xmlDoc.LoadXml(WebCommon.GetGridData(ds.Tables[0], string.Empty, page, rows));
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
     }
     return xmlDoc;
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:27,代码来源:IOService.cs

示例9: GetAgedARBalances

 public static string GetAgedARBalances(string agingDate)
 {
     try
     {
         DataSet agedBalancesData = null;
         using (IO io = new IO(WebCommon.KPIConnectionString))
         {
             agedBalancesData = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("KPI_Data_HATB_Wrapper",
                 Param.CreateParam("REPORTDATE", SqlDbType.Date, Convert.ToDateTime(agingDate))));
         }
         if (agedBalancesData == null)
         {
             throw new Exception("No data was retrieved for Aged Balances.");
         }
         return RetrieveAgedARBalancesJSON(agedBalancesData);
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
         throw new Exception("An error occurred while trying to retrieve the Aged Balances");
     }
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:22,代码来源:daily_kpi.aspx.cs

示例10: GetMarketList

 public CascadingDropDownNameValue[] GetMarketList(string defaultValue)
 {
     List<CascadingDropDownNameValue> values = new List<CascadingDropDownNameValue>();
     DataSet results;
     using (IO io = new IO(WebCommon.DigitalAvailsConnectionString))
     {
         results = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("DigitalAvails_GetMarkets"));
     }
     values.Add(new CascadingDropDownNameValue(" - Select a Market - ", "", (defaultValue == "")));
     foreach (DataRow row in results.Tables[0].Rows)
     {
         values.Add(new CascadingDropDownNameValue(Convert.ToString(row["Market"]), Convert.ToString(row["Market"]), (defaultValue == Convert.ToString(row["Market"]))));
     }
     return values.ToArray();
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:15,代码来源:DigitalAvailsService.cs

示例11: GetAuditGrid

 public XmlDocument GetAuditGrid(string fromDate, string toDate, int page, int rows, string sidx, string sord, bool _search)
 {
     StringBuilder xml = new StringBuilder();
     string filter = string.Empty;
     string tableKeyFilter = string.Empty;
     string tableNameFilter = string.Empty;
     string fromDateFilter = string.Empty;
     string toDateFilter = string.Empty;
     string dateChangedFilter = string.Empty;
     string actionFilter = string.Empty;
     DataSet searchResults;
     using (IO io = new IO(WebCommon.ConnectionString))
     {
         searchResults = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("Admin_GetAuditRecords"));
     }
     if (!String.IsNullOrEmpty(fromDate))
     {
         fromDateFilter = string.Format(" AND DATE_CHANGED >= #{0}#", fromDate);
     }
     if (!String.IsNullOrEmpty(toDate))
     {
         toDateFilter = string.Format(" AND DATE_CHANGED <= #{0}#", toDate);
     }
     //If the user searched any of the columns
     //  build the dynamic filter
     if (_search)
     {
         if (!String.IsNullOrEmpty(HttpContext.Current.Request["SEARCH_ON"]))
         {
             tableKeyFilter = string.Format(" AND TABLE_KEY LIKE'{0}%'", HttpContext.Current.Request["SEARCH_ON"]);
         }
         if (!String.IsNullOrEmpty(HttpContext.Current.Request["TABLE_NAME_DISPLAY"]))
         {
             tableNameFilter = string.Format(" AND TABLE_NAME = '{0}'", HttpContext.Current.Request["TABLE_NAME_DISPLAY"]);
         }
         if (!String.IsNullOrEmpty(HttpContext.Current.Request["ACTION_TAKEN"]))
         {
             actionFilter = string.Format(" AND ACTION_TAKEN = '{0}'", HttpContext.Current.Request["ACTION_TAKEN"]);
         }
     }
     filter = string.Format("(1=1) {0} {1} {2} {3} {4}", tableKeyFilter, tableNameFilter, fromDateFilter, toDateFilter, actionFilter);
     //if the text box contained a search string, apply it:
     DataTable table = searchResults.Tables[0];
     //Sort the table based on the sort index and sort direction
     DataView sortedView = new DataView(table);
     if (!String.IsNullOrEmpty(sidx) && !String.IsNullOrEmpty(sord))
     {
         //A sort index was specified, apply it
         sortedView.Sort = string.Format("{0} {1}", sidx, sord);
     }
     XmlDocument xmlDoc = new XmlDocument();
     xmlDoc.LoadXml(WebCommon.GetGridData(sortedView.ToTable(), filter, page, rows));
     return xmlDoc;
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:54,代码来源:IOService.cs

示例12: GetAEReportingGrid

 public XmlDocument GetAEReportingGrid(int page, int rows, string sidx, string sord, bool _search)
 {
     XmlDocument xmlDoc = new XmlDocument();
     StringBuilder searchFilter = new StringBuilder();
     if (_search)
     {
         if (!String.IsNullOrEmpty(HttpContext.Current.Request["ACCOUNT_EXECUTIVE_ID"]))
         {
             searchFilter.AppendFormat(" AND ACCOUNT_EXECUTIVE_ID LIKE '%{0}%'", HttpContext.Current.Request["ACCOUNT_EXECUTIVE_ID"]);
         }
         if (!String.IsNullOrEmpty(HttpContext.Current.Request["ACCOUNT_EXECUTIVE_NAME"]))
         {
             searchFilter.AppendFormat(" AND ACCOUNT_EXECUTIVE_NAME LIKE '%{0}%'", HttpContext.Current.Request["ACCOUNT_EXECUTIVE_NAME"]);
         }
         if (!String.IsNullOrEmpty(HttpContext.Current.Request["ACTIVE"]))
         {
             searchFilter.AppendFormat(" AND ACTIVE LIKE '%{0}%'", HttpContext.Current.Request["ACTIVE"]);
         }
         if (!String.IsNullOrEmpty(HttpContext.Current.Request["ACCOUNT_EXECUTIVE_MARKET_ID"]))
         {
             searchFilter.AppendFormat(" AND ACCOUNT_EXECUTIVE_MARKET_ID LIKE '%{0}%'", HttpContext.Current.Request["ACCOUNT_EXECUTIVE_MARKET_ID"]);
         }
         if (!String.IsNullOrEmpty(HttpContext.Current.Request["COMPANY_NAME"]))
         {
             searchFilter.AppendFormat(" AND COMPANY_NAME LIKE '%{0}%'", HttpContext.Current.Request["COMPANY_NAME"]);
         }
     }
     try
     {
         DataSet ds;
         using (IO io = new IO(WebCommon.ConnectionString))
         {
             ds = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("MasterData_GetAEReportingGrid"));
         }
         DataTable table = ds.Tables[0];
         //Sort the table based on the sort index and sort direction
         DataView sortedView = new DataView(table);
         if (!String.IsNullOrEmpty(sidx) && !String.IsNullOrEmpty(sord))
         {
             if (String.Compare("HIDDEN_CHECK_BOX", sidx, true) == 0)
             {
                 sidx = "HIDDEN";
             }
             sortedView.Sort = string.Format("{0} {1}", sidx, sord);
         }
         string filter = string.Format("(1=1) {0}", searchFilter.ToString());
         table = sortedView.ToTable();
         table.DefaultView.RowFilter = "";
         xmlDoc.LoadXml(WebCommon.GetGridData(table, filter, page, rows));
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
     }
     return xmlDoc;
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:56,代码来源:IOService.cs

示例13: GetMarketBreakdown

 public static List<MarketBreakdownRecord> GetMarketBreakdown(int companyId, string reportDate)
 {
     List<MarketBreakdownRecord> marketBreakdown = new List<MarketBreakdownRecord>();
     string storedProcName = (companyId == 1 ? "KPI_Data_BreakdownByMarket" : "KPI_Data_BreakdownByMarket_TOC");
     try
     {
         DataSet marketBreakdownData = null;
         using (IO io = new IO(WebCommon.KPIConnectionString))
         {
             marketBreakdownData = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc(storedProcName,
                 Param.CreateParam("REPORTDATE", SqlDbType.Date, Convert.ToDateTime(reportDate))));
         }
         if (marketBreakdownData == null)
         {
             throw new Exception("No Market Breakdown data was retrieved.");
         }
         foreach (DataRow row in marketBreakdownData.Tables[0].Rows)
         {
             marketBreakdown.Add(new MarketBreakdownRecord(Convert.ToString(IO.GetDataRowValue(row, "MARKET", string.Empty))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Amount Collectable", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Balance Over 150 Days", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Balance Over 120 Days", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Balance Over 60 Days", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Balance", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Sales Past 90 Days", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Credits Past 90 Days", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Debits Past 90 Days", "0.00"))
             ));
         }
         return marketBreakdown;
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
         throw new Exception("An error occurred while trying to retrieve the Market Breakdown.");
     }
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:37,代码来源:daily_kpi.aspx.cs

示例14: GetCustomerTypeBreakdown

 public static string GetCustomerTypeBreakdown(int companyId, string reportDate)
 {
     StringBuilder customerBreakdownJSON = new StringBuilder();
     string storedProcName = (companyId == 1 ? "KPI_Data_BreakdownByCustType" : "KPI_Data_BreakdownByCustType_TOC");
     Hashtable spParams = new Hashtable();
     spParams.Add("REPORTDATE", Convert.ToDateTime(reportDate));
     try
     {
         DataSet customerBreakdownData = null;
         using (IO io = new IO(WebCommon.KPIConnectionString))
         {
             customerBreakdownData = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc(storedProcName,
                 Param.CreateParam("REPORTDATE", SqlDbType.Date, Convert.ToDateTime(reportDate))));
         }
         if (customerBreakdownData == null)
         {
             throw new Exception("No Customer Breakdown data was retrieved.");
         }
         foreach (DataRow row in customerBreakdownData.Tables[0].Rows)
         {
             if (!String.IsNullOrEmpty(customerBreakdownJSON.ToString()))
             {
                 customerBreakdownJSON.Append(",");
             }
             else
             {
                 customerBreakdownJSON.Append("[");
             }
             customerBreakdownJSON.Append(GetCustDataJSON(Convert.ToString(IO.GetDataRowValue(row, "Customer Type", ""))
             , Convert.ToInt32(IO.GetDataRowValue(row, "Count of Customer Type", "0"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Amount Collectable", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Balance Over 150 Days", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Sales Past 90 Days", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Credits Past 90 Days", "0.00"))
             , Convert.ToDouble(IO.GetDataRowValue(row, "Debits Past 90 Days", "0.00"))
             ));
         }
         if (!String.IsNullOrEmpty(customerBreakdownJSON.ToString()))
         {
             customerBreakdownJSON.Append("]");
         }
     }
     catch (Exception ex)
     {
         WebCommon.LogExceptionInfo(ex);
         throw new Exception("An error occurred while trying to retrieve the Customer Breakdown.");
     }
     return customerBreakdownJSON.ToString();
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:49,代码来源:daily_kpi.aspx.cs

示例15: GetBankingHolidaysForMonth

 /// <summary>TBD</summary>
 /// <param name="companyId">TBD</param>
 /// <param name="reportDate">TBD</param>
 /// <returns>TBD</returns>
 public static List<DateTime> GetBankingHolidaysForMonth(int companyId, DateTime reportDate)
 {
     List<DateTime> bankingHolidays = new List<DateTime>();
     DataSet bankingHolidayData = null;
     using (IO io = new IO(WebCommon.KPIConnectionString))
     {
         bankingHolidayData = io.ExecuteDataSetQuery(IO.CreateCommandFromStoredProc("KPI_HOLIDAYS_GETBANKINGHOLIDAYS",
             Param.CreateParam("MONTH", SqlDbType.Int, reportDate.Month),
             Param.CreateParam("YEAR", SqlDbType.Int, reportDate.Year)));
     }
     if (bankingHolidayData != null)
     {
         foreach (DataRow row in bankingHolidayData.Tables[0].Rows)
         {
             bankingHolidays.Add(Convert.ToDateTime(row["BANKING_HOLIDAY_DATE"]));
         }
     }
     return bankingHolidays;
 }
开发者ID:adayalantitan,项目名称:Apollo,代码行数:23,代码来源:daily_kpi.aspx.cs


注:本文中的IO.ExecuteDataSetQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。