/// <summary> /// 搜索帖子 /// </summary> /// <param name="keywords"></param> /// <param name="page"></param> /// <returns></returns> public List <_QuestionInfo> SearchQuestion(string keywords, Paging page) { DataSet ds = dal.SearchQuestion(page.StartIndex, page.EndIndex, keywords); List <_QuestionInfo> list = new List <_QuestionInfo>(); page.RecordCount = Convert.ToInt32(ds.Tables[0].Rows[0][0]); list.AddRange(ModelConvertHelper <_QuestionInfo> .ConvertToList(ds.Tables[1]).OrderByDescending(a => Convert.ToDateTime(a.CreateTime).ToString("yyyy-MM-dd")).ThenByDescending(a => a.PVCount).ToList()); return(list); }