编写BLL层

编写新闻评论表业务类:

private CommentDAO cdao=null;         

public CommentManager ()          {              cdao=new CommentDAO();          }

#region 根据新闻ID取出该新闻的所有评论         

/// <summary>          /// 根据新闻ID取出该新闻的所有评论          /// </summary>          /// <param name="newsId">新闻ID</param>          /// <returns></returns>         

public DataTable SelectByNewsId(string newsId)          {              return cdao.SelectByNewsId(newsId);          }          #endregion

#region 添加评论         

/// <summary>          /// 添加评论          /// </summary>          /// <param name="c">评论实体类</param>          /// <returns></returns>         

public bool Insert(Comment c)          {              return cdao.Insert(c);          }          #endregion

#region 删除评论         

/// <summary>          /// 删除评论          /// </summary>          /// <param name="id">评论ID</param>          /// <returns></returns>         

public bool Delete(string id)          {              return cdao.Delete(id);          }          #endregion

 

 

posted @ 2013-12-12 22:21  小泽子  阅读(200)  评论(0编辑  收藏  举报