예제 #1
0
        protected bool ExistDataLock(string tablenm, DataRow row)
        {
            List <DataLock> locks = LockHelp <DataLock> .GetLock(tablenm);

            if (locks != null)
            {
                if (locks.FirstOrDefault(i => i.ClientSessionId == this.LibClient.SessionId && i.Status == LibLockStatus.Lock && i.HasExist(row)) != null)
                {
                    return(true);
                }
            }
            return(false);
        }
예제 #2
0
        protected void RemoveDataLock(string tablenm, DataRow row)
        {
            List <DataLock> locks = LockHelp <DataLock> .GetLock(tablenm);

            if (locks != null)
            {
                DataLock l = locks.FirstOrDefault(i => i.ClientSessionId == this.LibClient.SessionId && i.Status == LibLockStatus.Lock && i.HasExist(row));
                if (l != null)
                {
                    LockHelp <DataLock> .RemoveLock(l);
                }
            }
        }