Exemplo n.º 1
0
 public override void UpdateVersionItem(VersionItem item)
 {
     using (var transaction = new TransactionScope(_configuration))
     {
         var vDTS = new VersionItemDataStore(transaction);
         vDTS.Update(item);
         transaction.Commit();
     }
 }
Exemplo n.º 2
0
 public override void CheckOutVersion(string versionId, string userName)
 {
     using (var transaction = new TransactionScope(_configuration))
     {
         var         vDTS    = new VersionItemDataStore(transaction);
         VersionItem version = vDTS.FindGroupIdByVersionId(versionId);
         version.UserName = userName;
         vDTS.Update(version);
         transaction.Commit();
     }
 }
Exemplo n.º 3
0
        public override void CheckInVersion(string versionId)
        {
            if (string.IsNullOrEmpty(versionId))
            {
                throw new ArgumentNullException("versionId");
            }

            using (var transaction = new TransactionScope(_configuration))
            {
                var                 vDTS     = new VersionItemDataStore(transaction);
                VersionItem         version  = vDTS.FindGroupIdByVersionId(versionId);
                IList <VersionItem> versions = vDTS.FindAllByGroupId(version.GroupId);
                foreach (VersionItem vers in versions)
                {
                    vers.UserName = null;
                    vDTS.Update(vers);
                }
                transaction.Commit();
            }
        }