public static YellowstonePathology.Business.Domain.LockItemCollection GetLocks() { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "SELECT * FROM tblLock order by LockDate for xml path('LockItem'), root('LockItemCollection')"; cmd.CommandType = CommandType.Text; Business.Domain.LockItemCollection result = Domain.Persistence.SqlXmlPersistence.CrudOperations.ExecuteCollectionCommand <Business.Domain.LockItemCollection>(cmd, Domain.Persistence.DataLocationEnum.ProductionData); return(result); }
private void ReleaseLocksOnStartup() { Business.Domain.LockItemCollection lockItemCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetLockedAccessionOrders(); foreach (Business.Domain.LockItem lockItem in lockItemCollection) { if (lockItem.ComputerName == Environment.MachineName) { Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(lockItem.KeyString, this); } } Business.Persistence.DocumentGateway.Instance.Push(this); }