IemployeeDAL.cs
资源名称:OASystem.rar [点击查看]
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:10k
源码类别:
OA系统
开发平台:
C#
- // ===================================================================
- // 产品规则(COM.OA.IDAL)项目
- //====================================================================
- // wangyp @Copy Right 2006-2008
- // 文件:IemployeeDAL.cs
- // 项目名称:工程项目管理
- // 创建时间:2008-9-23
- // 负责人:wangyp
- // 引用实体(COM.OA.Entity)项目
- // ===================================================================
- using System;
- using System.Collections;
- using System.Data;
- using System.Data.SqlClient;
- using COM.OA.Entity;
- using System.Collections.Generic;
- namespace COM.OA.IDAL
- {
- /// <summary>
- /// 数据层dbo.employee接口
- /// </summary>
- public interface IemployeeDAL
- {
- #region 基本方法
- #region 增加
- /// <summary>
- /// 向数据库中插入一条新记录
- /// </summary>
- /// <param name="employee">employee实体</param>
- /// <returns></returns>
- int Insert(employee employee);
- /// <summary>
- /// 向数据库中插入一条新记录。带事务
- /// </summary>
- /// <param name="sp">事务对象</param>
- /// <param name="employee">employee实体</param>
- /// <returns></returns>
- int Insert(SqlTransaction sp, employee employee);
- #endregion
- #region 更新
- /// <summary>
- /// 向数据表employee更新一条记录
- /// </summary>
- /// <param name="employee">employee实体</param>
- /// <returns></returns>
- int Update(employee employee);
- /// <summary>
- /// 向数据表employee更新一条记录。带事务
- /// </summary>
- /// <param name="sp">事务对象</param>
- /// <param name="employee">employee实体</param>
- /// <returns></returns>
- int Update(SqlTransaction sp, employee employee);
- #endregion
- #region 删除
- /// <summary>
- /// 删除数据表employee中的一条记录
- /// </summary>
- /// <param name="em_id">em_id</param>
- /// <returns></returns>
- int Delete(int em_id);
- /// <summary>
- /// 删除数据表employee中的一条记录
- /// </summary>
- /// <param name="employee">employee实体</param>
- /// <returns></returns>
- int Delete(employee employee);
- /// <summary>
- /// 删除数据表employee中的一条记录,带事务
- /// </summary>
- /// <param name="sp">事务对象</param>
- /// <param name="em_id">em_id</param>
- /// <returns></returns>
- int Delete(SqlTransaction sp, int em_id);
- /// <summary>
- /// 删除数据表employee中的一条记录,带事务
- /// </summary>
- /// <param name="sp">事务对象</param>
- /// <param name="employee">employee</param>
- /// <returns></returns>
- int Delete(SqlTransaction sp, employee employee);
- #endregion
- #region 实体对象
- /// <summary>
- /// 通过DataRow创建一个employee实体
- /// </summary>
- /// <param name="row">row</param>
- /// <returns>employee实体</returns>
- employee Select(DataRow row);
- /// <summary>
- /// 得到employee数据实体
- /// </summary>
- /// <param name="dr">dr</param>
- /// <returns>employee数据实体</returns>
- employee Select(IDataReader dr);
- /// <summary>
- /// 得到 employee数据实体
- /// </summary>
- /// <param name="em_id">em_id</param>
- /// <returns>employee数据实体</returns>
- employee Select(int em_id);
- /// <summary>
- /// 根据ID,返回一个employee对象
- /// </summary>
- /// <param name="em_id">em_id</param>
- /// <param name="bParentTable">将employee对象设置与父表关联</param>
- /// <param name="bChildrenTable">将employee对象设置与子表关联</param>
- /// <returns>employee</returns>
- employee Select(int em_id, bool bParentTable, bool bChildrenTable);
- /// <summary>
- /// 将employee对象设置与父表和子表关联
- /// </summary>
- /// <param name="obj">employee对象</param>
- /// <param name="bParentTable">是/否设置与父表对象关联</param>
- /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
- void Select(employee obj, bool bParentTable, bool bChildrenTable);
- #endregion
- #region 父表
- /// <summary>
- /// 设置实体对象(employee)的父表对象
- /// </summary>
- /// <param name="employee">实体对象</param>
- void nation(employee employee);
- /// <summary>
- /// 设置实体对象(employee)的父表对象
- /// </summary>
- /// <param name="employee">实体对象</param>
- void visage(employee employee);
- /// <summary>
- /// 设置实体对象(employee)的父表对象
- /// </summary>
- /// <param name="employee">实体对象</param>
- void province(employee employee);
- /// <summary>
- /// 设置实体对象(employee)的父表对象
- /// </summary>
- /// <param name="employee">实体对象</param>
- void native(employee employee);
- /// <summary>
- /// 设置实体对象(employee)的父表对象
- /// </summary>
- /// <param name="employee">实体对象</param>
- void learn(employee employee);
- /// <summary>
- /// 设置实体对象(employee)的父表对象
- /// </summary>
- /// <param name="employee">实体对象</param>
- void department(employee employee);
- #endregion
- #region 子表
- /// <summary>
- /// 设置实体对象(employee)的子表对象
- /// </summary>
- /// <param name="employee">实体对象</param>
- void users(employee employee);
- #endregion
- #region 查询
- /// <summary>
- /// 得到数据表employee所有记录
- /// </summary>
- /// <returns>数据实体</returns>
- IList<employee> Select();
- /// <summary>
- /// 得到数据表employee所有记录
- /// </summary>
- /// <param name="bParentTable">是/否设置与父表对象关联</param>
- /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
- /// <returns>数据实体</returns>
- IList<employee> Select(bool bParentTable, bool bChildrenTable);
- /// <summary>
- /// 得到数据表employee满足查询条件的记录
- /// </summary>
- /// <param name="where">查询条件</param>
- /// <returns>结果集</returns>
- IList<employee> Select(string where);
- /// <summary>
- /// 得到数据表employee满足查询条件的记录
- /// </summary>
- /// <param name="where">查询条件</param>
- /// <param name="bParentTable">是/否设置与父表对象关联</param>
- /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
- /// <returns>结果集</returns>
- IList<employee> Select(string where, bool bParentTable, bool bChildrenTable);
- /// <summary>
- /// 得到数据表ArticalInfo满足外键字段查询条件的记录
- /// </summary>
- /// <param name="foreignFieldName">外键字段名称</param>
- /// <param name="foreignFieldValue">外键字段值</param>
- /// <returns>结果集</returns>
- IList<employee> Select(string foreignFieldName, int foreignFieldValue);
- /// <summary>
- /// 得到数据表ArticalInfo满足外键字段查询条件的记录
- /// </summary>
- /// <param name="foreignFieldName">外键字段名称</param>
- /// <param name="foreignFieldValue">外键字段值</param>
- /// <param name="bParentTable">是/否设置与父表对象关联</param>
- /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
- /// <returns>结果集</returns>
- IList<employee> Select(string foreignFieldName, int foreignFieldValue, bool bParentTable, bool bChildrenTable);
- /// <summary>
- /// 得到数据表employee满足查询条件的记录数
- /// </summary>
- /// <param name="where">查询条件</param>
- /// <param name="recordCount">记录数</param>
- void Select(string where, out int recordCount);
- /// <summary>
- /// 得到数据表employee满足查询条件的分页记录
- /// </summary>
- /// <param name="pageSize">每页显示记录数</param>
- /// <param name="pageIndex">当前显示第几页</param>
- /// <param name="where">查询条件</param>
- /// <returns>结果集</returns>
- IList<employee> Select(int pageSize, int pageIndex, string where);
- /// <summary>
- /// 得到数据表employee满足查询条件的分页记录
- /// </summary>
- /// <param name="pageSize">每页显示记录数</param>
- /// <param name="pageIndex">当前显示第几页</param>
- /// <param name="where">查询条件</param>
- /// <param name="bParentTable">是/否设置与父表对象关联</param>
- /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
- /// <returns>结果集</returns>
- IList<employee> Select(int pageSize, int pageIndex, string where, bool bParentTable, bool bChildrenTable);
- /// <summary>
- /// 得到数据表employee满足查询条件记录
- /// </summary>
- /// <param name="commandType">命令类型</param>
- /// <param name="sqlCommand">SQL命令</param>
- /// <param name="SqlParameter[]">命令参数数组</param>
- /// <returns>结果集</returns>
- IList<employee> Select(CommandType commandType, string sqlCommand, params SqlParameter[] param);
- /// <summary>
- /// 得到数据表employee满足查询条件记录
- /// </summary>
- /// <param name="bParentTable">是/否设置与父表对象关联</param>
- /// <param name="bChildrenTable">是/否设置与子表对象关联</param>
- /// <param name="commandType">命令类型</param>
- /// <param name="sqlCommand">SQL命令</param>
- /// <param name="SqlParameter[]">命令参数数组</param>
- /// <returns>结果集</returns>
- IList<employee> Select(bool bParentTable, bool bChildrenTable, CommandType commandType, string sqlCommand, params SqlParameter[] param);
- /// <summary>
- /// 根据主键检测是否存在该条记录
- /// </summary>
- /// <param name="em_id">em_id</param>
- /// <returns>存在/不存在</returns>
- bool Exists(int em_id);
- #endregion
- #endregion
- }
- }