Exemple #1
0
 /// <summary>
 /// 锁住
 /// </summary>
 /// <param name="appId"></param>
 /// <param name="order"></param>
 /// <returns></returns>
 public bool Lock(Guid appId, string order)
 {
     if (IsLockedByOther(appId, order))
     {
         return(false);
     }
     Locked = DataDefinition.LockValue.Create(appId, order);
     return(true);
 }
Exemple #2
0
 /// <summary>
 /// 解锁
 /// </summary>
 /// <param name="appId"></param>
 /// <param name="order"></param>
 /// <returns></returns>
 public bool Unlock(Guid appId, string order)
 {
     if (!IsLocked())
     {
         return(true);
     }
     if (!Locked.IsMime(appId, order))
     {
         return(false);
     }
     Locked = null;
     return(true);
 }