public void SetDataBase(DataBase inDB) { _defaultDB = inDB; }
public object InvokeProcedureResult(DataBase DB) { if (DB == null) { if (_defaultDB == null) _defaultDB = new DataBase(); DB = _defaultDB; } ProcedureResult result = new ProcedureResult(); try { if (BeforeInvoke != null) BeforeInvoke(this, DB); result.ObjectResult = DB.InvokeProcedureResult(this); if (AfterInvoke != null) AfterInvoke(result, this, DB); } catch (Exception ex) { if (OnError == null || OnError(ex, DB)) { throw ex; } } return result.ObjectResult; }
/// <summary> /// 执行存储过程,并返回存储过程返回的数值 /// </summary> /// <param name="Procedure">存储过程</param> /// <returns>存储过程返回的值</returns> public System.Data.DataTable InvokeProcedureFill() { if (_defaultDB == null) _defaultDB = new DataBase(); return InvokeProcedureFill(_defaultDB); }
/// <summary> /// 执行存储过程,并返回存储过程返回的数值 /// </summary> /// <param name="Procedure">存储过程</param> /// <returns>存储过程返回的值</returns> public object InvokeProcedureResult() { if (_defaultDB == null) _defaultDB = new DataBase(); return InvokeProcedureResult(_defaultDB); }
/// <summary> /// 执行存储过程,并返回受影响的行数 /// </summary> /// <param name="ConnectionName">连接字符串名</param> /// <param name="Procedure">存储过程</param> /// <returns>受影响的行数</returns> public int InvokeProcedure() { if (_defaultDB == null) _defaultDB = new DataBase(); return InvokeProcedure(_defaultDB); }