From c3ebe0bc90fdca9d9466a3698a16667e89904f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A5=E6=AF=93=E6=B3=BD?= <13204402429@stu.ecnu.edu.cn> Date: Sun, 17 Jan 2021 21:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20'CommandInfo.cs'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CommandInfo.cs | 73 ---------------------------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 CommandInfo.cs diff --git a/CommandInfo.cs b/CommandInfo.cs deleted file mode 100644 index ae39d3f..0000000 --- a/CommandInfo.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Data.SqlClient; - -namespace Basic -{ - public enum EffentNextType - { - /// - /// 对其他语句无任何影响 - /// - None, - /// - /// 当前语句必须为"select count(1) from .."格式,如果存在则继续执行,不存在回滚事务 - /// - WhenHaveContine, - /// - /// 当前语句必须为"select count(1) from .."格式,如果不存在则继续执行,存在回滚事务 - /// - WhenNoHaveContine, - /// - /// 当前语句影响到的行数必须大于0,否则回滚事务 - /// - ExcuteEffectRows, - /// - /// 引发事件-当前语句必须为"select count(1) from .."格式,如果不存在则继续执行,存在回滚事务 - /// - SolicitationEvent - } - public class CommandInfo - { - public object ShareObject = null; - public object OriginalData = null; - event EventHandler _solicitationEvent; - public event EventHandler SolicitationEvent - { - add - { - _solicitationEvent += value; - } - remove - { - _solicitationEvent -= value; - } - } - public void OnSolicitationEvent() - { - if (_solicitationEvent != null) - { - _solicitationEvent(this, new EventArgs()); - } - } - public string CommandText; - public System.Data.Common.DbParameter[] Parameters; - public EffentNextType EffentNextType = EffentNextType.None; - public CommandInfo() - { - - } - public CommandInfo(string sqlText, SqlParameter[] para) - { - this.CommandText = sqlText; - this.Parameters = para; - } - public CommandInfo(string sqlText, SqlParameter[] para, EffentNextType type) - { - this.CommandText = sqlText; - this.Parameters = para; - this.EffentNextType = type; - } - } -} \ No newline at end of file