zoukankan      html  css  js  c++  java
  • 编写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

  • 相关阅读:
    滴水穿石Pydoop 架构和模块包介绍
    滴水穿石SSH Secure Shell Client安装和使用
    安装memcache到CentOS(另附yum法)
    php文件锁(转)
    MySQL中distinct和group by性能比较
    php中的自动加载
    php注释标准
    新浪API40310错误解决方法
    CentOS 5.5使用yum来安装LAMP(php运行环境)(转)
    MySQL优化之COUNT()效率
  • 原文地址:https://www.cnblogs.com/wangzenb/p/3472133.html
Copyright © 2011-2022 走看看