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

  • 相关阅读:
    ORA-12170 TNS 连接超时
    判断字符串里面是否包含汉字
    关于Try/Catch 代码块
    SOLID 原则
    整洁代码原则
    装箱 拆箱
    存储过程优缺点
    ANTLR Tool version 4.4中使用ANTLR 4.7.1
    The Apache Tomcat installation at this directory is version 8.5.40. A Tomcat 8.0 installation is expected.
    实现功能:构建一个JSON到XML的翻译器。
  • 原文地址:https://www.cnblogs.com/wangzenb/p/3472133.html
Copyright © 2011-2022 走看看