Пример #1
0
 public System.Data.DataTable GetProductVisitAndBuyStatistics(SaleStatisticsQuery query, out int totalProductSales)
 {
     System.Data.Common.DbCommand storedProcCommand = this.database.GetStoredProcCommand("cp_ProductVisitAndBuyStatistics_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, "sqlPopulate", System.Data.DbType.String, SaleStatisticDao.BuildProductVisitAndBuyStatisticsQuery(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);
 }