Beispiel #1
0
        /// <summary>
        /// 查找用户所有提问问题
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        public BBSListViewModel GetQuestionListByUserid(long userID, Paging page)
        {
            BBSListViewModel bmodel     = new BBSListViewModel();
            DataSet          ds         = dal.GetQuestionListByUserid(userID, page.StartIndex, page.EndIndex, UserBaseBLL.Instance.IsMaster);
            DataTable        questiondt = ds.Tables[1];

            if (questiondt.IsNotNullAndRowCount())
            {
                page.RecordCount    = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
                bmodel.QuestionPage = page;
                bmodel.QuestionList = ModelConvertHelper <_QuestionInfo> .ConvertToList(questiondt);

                bmodel.QuestionHeadUrl = ds.Tables[2].Rows[0][0].ToString();
            }
            return(bmodel);
        }