public DataAccess(string guid, LibClientInfo clientInfo) : this() { this._clientInfo = clientInfo; _dbHelp = _dbFactory.GetDBHelp(guid); LibEventManager.SubscribeEvent(new LibSqlExceptionEventSource(this, _dbHelp), LibEventType.SqlException); }
public DataSet GetDataTables(string commandText) { DataSet result = this.CurrentDBOpreate.GetDataTables(commandText); if (result == null) { LibEventManager.TouchEvent(this, LibEventType.SqlException, this.CurrentDBOpreate.Exception); LibEventManager.LogOutListener(this); } return(result); }
object ILibDBHelp.ExecuteScalar(string commandText) { object result = this.CurrentDBOpreate.ExecuteScalar(commandText); if (result == null) { LibEventManager.TouchEvent(this, LibEventType.SqlException, this.CurrentDBOpreate.Exception); LibEventManager.LogOutListener(this); } return(result); //return DBOperate.ExecuteScalar(commandText); }
public int ExecuteNonQuery(List <string> commandtextlist) { int result = this.CurrentDBOpreate.ExecuteNonQuery(commandtextlist); if (result == -900) { LibEventManager.TouchEvent(this, LibEventType.SqlException, this.CurrentDBOpreate.Exception); LibEventManager.LogOutListener(this); } //return this.CurrentDBOpreate.ExecuteNonQuery(commandText); //return DBOperate.ExecuteNonQuery(commandText); return(result); }
DataRow ILibDBHelp.GetDataRow(string commandText) { int flag = 0; DataRow result = this.CurrentDBOpreate.GetDataRow(commandText, out flag); if (flag == -1) { LibEventManager.TouchEvent(this, LibEventType.SqlException, this.CurrentDBOpreate.Exception); LibEventManager.LogOutListener(this); } return(result); //return DBOperate.GetDataRow(commandText); }
void called_FormClosing(object sender, FormClosingEventArgs e) { LibEventManager.TouchEvent(_caller, LibEventType.FormCommunitation, _paramContain.RefTag, _paramContain.FormCommunitationAgrs); LibEventManager.LogOutListener(_caller); _paramContain.FormCommunitationAgrs.Clear(); }
void called_Load(object sender, EventArgs e) { LibEventManager.SubscribeEvent(_caller, LibEventType.FormCommunitation); }