예제 #1
0
 public DataAccess(string guid, LibClientInfo clientInfo)
     : this()
 {
     this._clientInfo = clientInfo;
     _dbHelp          = _dbFactory.GetDBHelp(guid);
     LibEventManager.SubscribeEvent(new LibSqlExceptionEventSource(this, _dbHelp), LibEventType.SqlException);
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
 void called_FormClosing(object sender, FormClosingEventArgs e)
 {
     LibEventManager.TouchEvent(_caller, LibEventType.FormCommunitation, _paramContain.RefTag, _paramContain.FormCommunitationAgrs);
     LibEventManager.LogOutListener(_caller);
     _paramContain.FormCommunitationAgrs.Clear();
 }
예제 #7
0
 void called_Load(object sender, EventArgs e)
 {
     LibEventManager.SubscribeEvent(_caller, LibEventType.FormCommunitation);
 }