IpopedomDAL.cs
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:9k
源码类别:

OA系统

开发平台:

C#

  1. // =================================================================== 
  2. // 产品规则(COM.OA.IDAL)项目
  3. //====================================================================
  4. // wangyp @Copy Right 2006-2008
  5. // 文件:IpopedomDAL.cs
  6. // 项目名称:工程项目管理
  7. // 创建时间:2008-9-23
  8. // 负责人:wangyp
  9. // 引用实体(COM.OA.Entity)项目
  10. // ===================================================================
  11. using System;
  12. using System.Collections;
  13. using System.Data;
  14. using System.Data.SqlClient;
  15. using COM.OA.Entity;
  16. using System.Collections.Generic;
  17. namespace COM.OA.IDAL
  18. {
  19.     /// <summary>
  20.     /// 数据层dbo.popedom接口
  21.     /// </summary>
  22.     public interface IpopedomDAL
  23.     {
  24.         #region 基本方法
  25.         #region 增加
  26.         /// <summary>
  27.         /// 向数据库中插入一条新记录
  28.         /// </summary>
  29.         /// <param name="popedom">popedom实体</param>
  30.         /// <returns></returns>
  31.         int Insert(popedom popedom);
  32.         /// <summary>
  33.         /// 向数据库中插入一条新记录。带事务
  34.         /// </summary>
  35.         /// <param name="sp">事务对象</param>
  36.         /// <param name="popedom">popedom实体</param>
  37.         /// <returns></returns>
  38.         int Insert(SqlTransaction sp, popedom popedom);
  39.         #endregion
  40.         #region 更新
  41.         /// <summary>
  42.         /// 向数据表popedom更新一条记录
  43.         /// </summary>
  44.         /// <param name="popedom">popedom实体</param>
  45.         /// <returns></returns>
  46.         int Update(popedom popedom);
  47.         /// <summary>
  48.         /// 向数据表popedom更新一条记录。带事务
  49.         /// </summary>
  50.         /// <param name="sp">事务对象</param>
  51.         /// <param name="popedom">popedom实体</param>
  52.         /// <returns></returns>
  53.         int Update(SqlTransaction sp, popedom popedom);
  54.         #endregion
  55.         #region 删除
  56.         /// <summary>
  57.         /// 删除数据表popedom中的一条记录
  58.         /// </summary>
  59.         /// <param name="pop_id">pop_id</param>
  60.         /// <returns></returns>
  61.         int Delete(int pop_id);
  62.         /// <summary>
  63.         /// 删除数据表popedom中的一条记录
  64.         /// </summary>
  65.         /// <param name="popedom">popedom实体</param>
  66.         /// <returns></returns>
  67.         int Delete(popedom popedom);
  68.         /// <summary>
  69.         /// 删除数据表popedom中的一条记录,带事务
  70.         /// </summary>
  71.         /// <param name="sp">事务对象</param>
  72.         /// <param name="pop_id">pop_id</param>
  73.         /// <returns></returns>
  74.         int Delete(SqlTransaction sp, int pop_id);
  75.         /// <summary>
  76.         /// 删除数据表popedom中的一条记录,带事务
  77.         /// </summary>
  78.         /// <param name="sp">事务对象</param>
  79.         /// <param name="popedom">popedom</param>
  80.         /// <returns></returns>
  81.         int Delete(SqlTransaction sp, popedom popedom);
  82.         #endregion
  83.         #region 实体对象
  84.         /// <summary>
  85.         /// 通过DataRow创建一个popedom实体
  86.         /// </summary>
  87.         /// <param name="row">row</param>
  88.         /// <returns>popedom实体</returns>
  89.         popedom Select(DataRow row);
  90.         /// <summary>
  91.         /// 得到popedom数据实体
  92.         /// </summary>
  93.         /// <param name="dr">dr</param>
  94.         /// <returns>popedom数据实体</returns>
  95.         popedom Select(IDataReader dr);
  96.         /// <summary>
  97.         /// 得到 popedom数据实体
  98.         /// </summary>
  99.         /// <param name="pop_id">pop_id</param>
  100.         /// <returns>popedom数据实体</returns>
  101.         popedom Select(int pop_id);
  102.         /// <summary>
  103.         /// 根据ID,返回一个popedom对象
  104.         /// </summary>
  105.         /// <param name="pop_id">pop_id</param>
  106.         /// <param name="bParentTable">将popedom对象设置与父表关联</param>
  107.         /// <param name="bChildrenTable">将popedom对象设置与子表关联</param>
  108.         /// <returns>popedom</returns>
  109.         popedom Select(int pop_id, bool bParentTable, bool bChildrenTable);
  110.         /// <summary>
  111.         /// 将popedom对象设置与父表和子表关联
  112.         /// </summary>
  113.         /// <param name="obj">popedom对象</param>
  114.         /// <param name="bParentTable">是/否设置与父表对象关联</param>
  115.         /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
  116.         void Select(popedom obj, bool bParentTable, bool bChildrenTable);
  117.         #endregion
  118.         #region 父表
  119.         #endregion
  120.         #region 子表
  121.         /// <summary>
  122.         /// 设置实体对象(popedom)的子表对象
  123.         /// </summary>
  124.         /// <param name="popedom">实体对象</param>
  125.         void operate(popedom popedom);
  126.         #endregion
  127.         #region 查询
  128.         /// <summary>
  129.         /// 得到数据表popedom所有记录
  130.         /// </summary>
  131.         /// <returns>数据实体</returns>
  132.         IList<popedom> Select();
  133.         /// <summary>
  134.         /// 得到数据表popedom所有记录
  135.         /// </summary>
  136.         /// <param name="bParentTable">是/否设置与父表对象关联</param>
  137.         /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
  138.         /// <returns>数据实体</returns>
  139.         IList<popedom> Select(bool bParentTable, bool bChildrenTable);
  140.         /// <summary>
  141.         /// 得到数据表popedom满足查询条件的记录
  142.         /// </summary>
  143.         /// <param name="where">查询条件</param>
  144.         /// <returns>结果集</returns>
  145.         IList<popedom> Select(string where);
  146.         /// <summary>
  147.         /// 得到数据表popedom满足查询条件的记录
  148.         /// </summary>
  149.         /// <param name="where">查询条件</param>
  150.         /// <param name="bParentTable">是/否设置与父表对象关联</param>
  151.         /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
  152.         /// <returns>结果集</returns>
  153.         IList<popedom> Select(string where, bool bParentTable, bool bChildrenTable);
  154.         /// <summary>
  155.         /// 得到数据表ArticalInfo满足外键字段查询条件的记录
  156.         /// </summary>
  157.         /// <param name="foreignFieldName">外键字段名称</param>
  158.         /// <param name="foreignFieldValue">外键字段值</param>
  159.         /// <returns>结果集</returns>
  160.         IList<popedom> Select(string foreignFieldName, int foreignFieldValue);
  161.         /// <summary>
  162.         /// 得到数据表ArticalInfo满足外键字段查询条件的记录
  163.         /// </summary>
  164.         /// <param name="foreignFieldName">外键字段名称</param>
  165.         /// <param name="foreignFieldValue">外键字段值</param>
  166.         /// <param name="bParentTable">是/否设置与父表对象关联</param>
  167.         /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
  168.         /// <returns>结果集</returns>
  169.         IList<popedom> Select(string foreignFieldName, int foreignFieldValue, bool bParentTable, bool bChildrenTable);
  170.         /// <summary>
  171.         /// 得到数据表popedom满足查询条件的记录数
  172.         /// </summary>
  173.         /// <param name="where">查询条件</param>
  174.         /// <param name="recordCount">记录数</param>
  175.         void Select(string where, out int recordCount);
  176.         /// <summary>
  177.         /// 得到数据表popedom满足查询条件的分页记录
  178.         /// </summary>
  179.         /// <param name="pageSize">每页显示记录数</param>
  180.         /// <param name="pageIndex">当前显示第几页</param>
  181.         /// <param name="where">查询条件</param>
  182.         /// <returns>结果集</returns>
  183.         IList<popedom> Select(int pageSize, int pageIndex, string where);
  184.         /// <summary>
  185.         /// 得到数据表popedom满足查询条件的分页记录
  186.         /// </summary>
  187.         /// <param name="pageSize">每页显示记录数</param>
  188.         /// <param name="pageIndex">当前显示第几页</param>
  189.         /// <param name="where">查询条件</param>
  190.         /// <param name="bParentTable">是/否设置与父表对象关联</param>
  191.         /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
  192.         /// <returns>结果集</returns>
  193.         IList<popedom> Select(int pageSize, int pageIndex, string where, bool bParentTable, bool bChildrenTable);
  194.         /// <summary>
  195.         /// 得到数据表popedom满足查询条件记录
  196.         /// </summary>
  197.         /// <param name="commandType">命令类型</param>
  198.         /// <param name="sqlCommand">SQL命令</param>
  199.         /// <param name="SqlParameter[]">命令参数数组</param>
  200.         /// <returns>结果集</returns>
  201.         IList<popedom> Select(CommandType commandType, string sqlCommand, params SqlParameter[] param);
  202.         /// <summary>
  203.         /// 得到数据表popedom满足查询条件记录
  204.         /// </summary>
  205.         /// <param name="bParentTable">是/否设置与父表对象关联</param>
  206.         /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
  207.         /// <param name="commandType">命令类型</param>
  208.         /// <param name="sqlCommand">SQL命令</param>
  209.         /// <param name="SqlParameter[]">命令参数数组</param>
  210.         /// <returns>结果集</returns>
  211.         IList<popedom> Select(bool bParentTable, bool bChildrenTable, CommandType commandType, string sqlCommand, params SqlParameter[] param);
  212.         /// <summary>
  213.         /// 根据主键检测是否存在该条记录
  214.         /// </summary>
  215.         /// <param name="pop_id">pop_id</param>
  216.         /// <returns>存在/不存在</returns>
  217.         bool Exists(int pop_id);
  218.         #endregion
  219.         #endregion
  220.     }
  221. }