Example #1
0
        /// <summary>
        /// 根据用户ID获取最佳评论/回答
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="priseEnumType"></param>
        /// <param name="bestornice">1最佳解答 2最优解答</param>
        /// <param name="paging"></param>
        /// <returns></returns>
        public MyCommentsViewModel GetBestAnswersByUserID(long userID, PriseEnumType priseEnumType, int bestornice, Paging paging)
        {
            MyCommentsViewModel model = new MyCommentsViewModel();
            DataSet             ds    = dal.GetBestAnswersByUserID(userID, priseEnumType.GetHashCode(), bestornice, paging.StartIndex, paging.EndIndex);
            int recordCount           = Convert.ToInt32(ds.Tables[0].Rows[0][0]);

            if (recordCount > 0)
            {
                paging.RecordCount = recordCount;
                model.CommentPage  = paging;
                model.CommentList  = ModelConvertHelper <_MyComments> .ConvertToList(ds.Tables[1]);

                model.CommentHeadUrl = ds.Tables[2].Rows[0][0].ToString();
            }
            return(model);
        }
Example #2
0
        public _Gift GetGiftDetail(long id, long userid, Paging page, CommentEnumType commentEnumType, PriseEnumType priseEnumType, JoinItemTypeEnum joinItemType)
        {
            _Gift amodel = GetDetail(id, userid, joinItemType, true);

            amodel.Comments = CommentBLL.Instance.GetCommentCallBack(id, commentEnumType.GetHashCode(), priseEnumType.GetHashCode(), userid, page);
            return(amodel);
        }