public override void UpdateVersionItem(VersionItem item) { using (var transaction = new TransactionScope(_configuration)) { var vDTS = new VersionItemDataStore(transaction); vDTS.Update(item); transaction.Commit(); } }
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(); } }
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(); } }