public override System.Data.DataSet GetUserProductReviewsAndReplys(UserProductReviewAndReplyQuery query, out int total) { System.Data.Common.DbCommand storedProcCommand = this.database.GetStoredProcCommand("ac_Underling_UserReviewsAndReplys_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, "UserId", System.Data.DbType.Int32, HiContext.Current.User.UserId); this.database.AddInParameter(storedProcCommand, "sqlPopulate", System.Data.DbType.String, CommentData.BuildUserReviewsAndReplysQuery(query)); this.database.AddInParameter(storedProcCommand, "DistributorUserId", System.Data.DbType.Int32, HiContext.Current.SiteSettings.UserId); this.database.AddOutParameter(storedProcCommand, "Total", System.Data.DbType.Int32, 4); System.Data.DataSet dataSet = this.database.ExecuteDataSet(storedProcCommand); dataSet.Relations.Add("PtReviews", dataSet.Tables[0].Columns["ProductId"], dataSet.Tables[1].Columns["ProductId"], false); total = (int)this.database.GetParameterValue(storedProcCommand, "Total"); return(dataSet); }