/// <summary> /// 获取论坛板块信息 CategoryModel /// </summary> public BbsBoardModel GetBbsBoard(CategoryModel c) { cms_varticle lastpost = new cms_varticle(); BbsBoardModel board = new BbsBoardModel(); if (c != null) { board = GetBbsBoardStat(Utils.StrToInt(c.CateId)); board.CateId = c.CateId; board.Path = c.Path; board.CateName = c.CateName; board.ReName = c.ReName; board.SubCount = c.SubCount; board.ReplyPermit = c.ReplyPermit; board.ParentId = c.ParentId; } return board; }
/// <summary> /// 获取论坛板块统计信息 /// </summary> public BbsBoardModel GetBbsBoardStat(int cid) { BbsBoardModel newboard = new BbsBoardModel(); newboard.Admins = ""; newboard.Description = ""; newboard.TodayPostCount = GetTodayArticleCountByCategory(cid); newboard.PostCount = GetArticleCountByCategory(cid); newboard.ItemCount = GetDataCountByCategory(cid); newboard.LastPost = GetLatestArticle(cid); BbsExtendedModel bbsextendedModel=GetBbsExtendedByID(cid); if (bbsextendedModel != null) { newboard.Admins = bbsextendedModel.Admins; newboard.Description = bbsextendedModel.Description; } return newboard; }