public ContentEntity GetContentByContentID(string contentID) { ContentEntity item = new ContentEntity(); DataTable dt = HelpCenterDAL.BaseProvider.GetContentByContentID(contentID); foreach (DataRow dr in dt.Rows) { item.FillData(dr); } return(item); }
public List <ContentEntity> GetContents(int moduleType, string typeID, string keyWords, string beginTime, string endTime, string orderBy, int pageSize, int pageIndex, ref int totalCount, ref int pageCount) { List <ContentEntity> list = new List <ContentEntity>(); DataSet ds = HelpCenterDAL.BaseProvider.GetContents(moduleType, typeID, keyWords, beginTime, endTime, orderBy, pageSize, pageIndex, ref totalCount, ref pageCount); foreach (DataRow dr in ds.Tables[0].Rows) { ContentEntity model = new ContentEntity(); model.FillData(dr); list.Add(model); } return(list); }