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