天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

93 lines
2.9 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Common.Data
{
/// <summary>
/// 功能:数据库事务操作接口
/// 作者:王昊昇
/// 时间:2012.2.8
/// </summary>
public interface IDataRoutine : IDisposable
{
/// <summary>
/// 回滚事务
/// </summary>
void RollBack();
/// <summary>
/// 提交事务
/// </summary>
void Commit();
/// <summary>
/// 执行SQL语句,返回影响的记录数
/// </summary>
/// <param name="sql">SQL语句</param>
/// <param name="param">参数集</param>
/// <returns>影响的记录数</returns>
int ExecuteSql(string sql, params System.Data.IDataParameter[] param);
/// <summary>
/// 执行SQL语句,返回影响的记录数
/// </summary>
/// <param name="sql">SQL语句</param>
/// <returns>影响的记录数</returns>
int ExecuteSql(string sql);
/// <summary>
/// 执行一条计算查询结果语句,返回查询结果
/// </summary>
/// <param name="sql">计算查询结果语句</param>
/// <returns>查询结果</returns>
object GetSingle(string sql);
/// <summary>
/// 执行一条计算查询结果语句,返回查询结果
/// </summary>
/// <param name="sql">计算查询结果语句</param>
/// <param name="param">参数集</param>
/// <returns>查询结果</returns>
object GetSingle(string sql,
params System.Data.IDataParameter[] param);
/// <summary>
/// 执行多条SQL语句
/// </summary>
/// <param name="list">多条SQL更新语句</param>
void ExecuteSqlTran(System.Collections.Generic.List<string> list);
/// <summary>
/// 执行查询语句
/// </summary>
/// <param name="sql">查询语句</param>
/// <param name="param">参数集</param>
/// <returns>DataSet</returns>
System.Data.DataSet Query(string sql,
params System.Data.IDataParameter[] param);
/// <summary>
/// 执行查询语句
/// </summary>
/// <param name="sql">查询语句</param>
/// <returns>DataSet</returns>
System.Data.DataSet Query(string sql);
/// <summary>
/// 执行查询语句
/// </summary>
/// <param name="sql">查询语句</param>
/// <returns></returns>
System.Data.DataTable QueryReturnDataTable(string sql);
/// <summary>
/// 执行数据查询
/// </summary>
/// <param name="sql">查询语句</param>
/// <param name="param">参数</param>
/// <returns>数据表</returns>
System.Data.DataTable QueryReturnDataTable(string sql, params System.Data.IDataParameter[] param);
}
}