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); }
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); } } }