/// <summary> /// 根据标题搜索新闻 /// </summary> /// <param name="title">标题</param> /// <returns></returns> public static DataTable SelectByTitle(string title) { //TODO:根据标题搜索新闻 return(NewsService.SelectByTitle(title)); }
/// <summary> /// 根据内容搜索新闻 /// </summary> /// <param name="content">新闻内容</param> /// <returns></returns> public static DataTable SelectByContent(string content) { //TODO:根根据内容搜索新闻 return(NewsService.SelectByContent(content)); }
/// <summary> /// 根据类别ID取出该类别下的所有新闻 /// </summary> /// <param name="caId">类别ID</param> /// <returns></returns> public static DataTable SelectByCaId(string caId) { //TODO:根据类别ID取出该类别下的所有新闻 return(NewsService.SelectByCaId(caId)); }
/// <summary> /// 根据新闻ID取出该条新闻主体内容 /// </summary> /// <param name="id">新闻ID</param> /// <returns></returns> public static News SelectById(string id) { //TODO:根据新闻ID取出该条新闻主体内容 return(NewsService.SelectById(id)); }
/// <summary> /// 取出10条热点新闻(评论回复最多的十条新闻) /// </summary> /// <returns></returns> public static DataTable SelectHotNews() { //TODO:取出10条热点新闻 return(NewsService.SelectHotNews()); }
/// <summary> /// 取出最新10条新闻(所属分类、新闻标题、发布时间) /// </summary> /// <returns></returns> public static DataTable SelectNewNews() { return(NewsService.SelectNewNews()); }
/// <summary> /// 删除新闻(连同其下新闻评论一起删除) /// </summary> /// <param name="id">新闻ID</param> /// <returns></returns> public static bool Delete(string id) { //TODO:删除新闻(连同其下新闻评论一起删除) return(NewsService.Delete(id)); }
/// <summary> /// 修改新闻 /// </summary> /// <param name="news">新闻实体类</param> /// <returns></returns> public static bool Update(News news) { //TODO:修改新闻 return(NewsService.Update(news)); }
/// <summary> /// 增加新闻 /// </summary> /// <param name="news">新闻实体类</param> /// <returns></returns> public static bool Insert(News news) { //TODO:增加新闻 return(NewsService.Insert(news)); }