the Purpose and use of the service locks

Service locks (ICSSoft.STORMNET.Business.LockService) is designed for convenient implement locking mechanism. For example, you want to protect certain data object from changes by other users at the time how it is edited by any user.

To put the lock you want to use one of the methods SetLock.

To check the lock, one should use the method GetLock, or try to rerun SetLock. Returned a nonblank value is the name of the user who has locked the object.

To open blockages, you must use the method ClearLock.

Автор автор = new Автор();
LockService ls = new LockService();
ls.SetLock(автор); //Blocking 
string sLockID = ls.SetLock(автор); //Attempt to lock the same object 
if (sLockID!=string.Empty)
{
	Console.WriteLine(string.Format("Locked by: {0}", sLockID));
}
ls.ClearLock(автор);//Cleanup the lock 
Console.ReadLine();

Service lock accesses the data store via service data specified in the service provider data (ICSSoft.STORMNET.Business.DataServiceProvider.DataService).

Vault locks must be a corresponding source.

For relational storage, it is defined as:

SQL
CREATE TABLE STORMNETLOCKDATA (
	LockKey char (300) NOT NULL ,
	UserName char (300) NOT NULL 
)