public System.Data.DataTable GetMemberStatisticsNoPage(SaleStatisticsQuery query) { System.Data.Common.DbCommand sqlStringCommand = this.database.GetSqlStringCommand(SaleStatisticDao.BuildMemberStatisticsQuery(query)); System.Data.DataTable result = null; using (System.Data.IDataReader dataReader = this.database.ExecuteReader(sqlStringCommand)) { result = DataHelper.ConverDataReaderToDataTable(dataReader); } return(result); }
public System.Data.DataTable GetMemberStatistics(SaleStatisticsQuery query, out int totalProductSales) { System.Data.Common.DbCommand storedProcCommand = this.database.GetStoredProcCommand("cp_MemberStatistics_Get"); this.database.AddInParameter(storedProcCommand, "PageIndex", System.Data.DbType.Int32, query.PageIndex); this.database.AddInParameter(storedProcCommand, "PageSize", System.Data.DbType.Int32, query.PageSize); this.database.AddInParameter(storedProcCommand, "IsCount", System.Data.DbType.Boolean, query.IsCount); this.database.AddInParameter(storedProcCommand, "sqlPopulate", System.Data.DbType.String, SaleStatisticDao.BuildMemberStatisticsQuery(query)); this.database.AddOutParameter(storedProcCommand, "TotalProductSales", System.Data.DbType.Int32, 4); System.Data.DataTable result = null; using (System.Data.IDataReader dataReader = this.database.ExecuteReader(storedProcCommand)) { result = DataHelper.ConverDataReaderToDataTable(dataReader); } totalProductSales = (int)this.database.GetParameterValue(storedProcCommand, "TotalProductSales"); return(result); }