Example #1
0
        private void popContext()
        {
            if (this._Thread != Thread.CurrentThread)
            {
                throw new MB.Util.APPException("在使用数据库范围时,返回出现线程不一致", Util.APPMessageType.SysErrInfo);
            }

            if (OperationDatabaseScope._CurrentScope != this)
            {
                throw new MB.Util.APPException("在使用数据库范围时,返回出现数据库范围不一致", Util.APPMessageType.SysErrInfo);
            }

            if (OperationDatabaseContext.Current != this._CurrentContext)
            {
                throw new MB.Util.APPException("在使用数据库范围时,返回出现数据库配置不一致", Util.APPMessageType.SysErrInfo);
            }

            OperationDatabaseScope._CurrentScope = _OriginalScope;
            OperationDatabaseContext.Current     = _OriginalContext;
        }
Example #2
0
 private void pushContext(OperationDatabaseContext context)
 {
     this._CurrentContext = context;
     OperationDatabaseScope._CurrentScope = this;
     OperationDatabaseContext.Current     = _CurrentContext;
 }