static public StudyDeleteRecord Load(IPersistenceContext read, ServerEntityKey key)
        {
            var broker = read.GetBroker <IStudyDeleteRecordEntityBroker>();
            StudyDeleteRecord theObject = broker.Load(key);

            return(theObject);
        }
 static public StudyDeleteRecord Insert(StudyDeleteRecord entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         StudyDeleteRecord newEntity = Insert(update, entity);
         update.Commit();
         return(newEntity);
     }
 }
        static public StudyDeleteRecord Insert(IUpdateContext update, StudyDeleteRecord entity)
        {
            var broker        = update.GetBroker <IStudyDeleteRecordEntityBroker>();
            var updateColumns = new StudyDeleteRecordUpdateColumns();

            updateColumns.StudyInstanceUid  = entity.StudyInstanceUid;
            updateColumns.Timestamp         = entity.Timestamp;
            updateColumns.ServerPartitionAE = entity.ServerPartitionAE;
            updateColumns.FilesystemKey     = entity.FilesystemKey;
            updateColumns.BackupPath        = entity.BackupPath;
            updateColumns.Reason            = entity.Reason;
            updateColumns.AccessionNumber   = entity.AccessionNumber;
            updateColumns.PatientId         = entity.PatientId;
            updateColumns.PatientsName      = entity.PatientsName;
            updateColumns.StudyId           = entity.StudyId;
            updateColumns.StudyDescription  = entity.StudyDescription;
            updateColumns.StudyDate         = entity.StudyDate;
            updateColumns.StudyTime         = entity.StudyTime;
            updateColumns.ArchiveInfo       = entity.ArchiveInfo;
            updateColumns.ExtendedInfo      = entity.ExtendedInfo;
            StudyDeleteRecord newEntity = broker.Insert(updateColumns);

            return(newEntity);
        }
Beispiel #4
0
 static public StudyDeleteRecord Insert(IUpdateContext update, StudyDeleteRecord entity)
 {
     var broker = update.GetBroker<IStudyDeleteRecordEntityBroker>();
     var updateColumns = new StudyDeleteRecordUpdateColumns();
     updateColumns.StudyInstanceUid = entity.StudyInstanceUid;
     updateColumns.Timestamp = entity.Timestamp;
     updateColumns.ServerPartitionAE = entity.ServerPartitionAE;
     updateColumns.FilesystemKey = entity.FilesystemKey;
     updateColumns.BackupPath = entity.BackupPath;
     updateColumns.Reason = entity.Reason;
     updateColumns.AccessionNumber = entity.AccessionNumber;
     updateColumns.PatientId = entity.PatientId;
     updateColumns.PatientsName = entity.PatientsName;
     updateColumns.StudyId = entity.StudyId;
     updateColumns.StudyDescription = entity.StudyDescription;
     updateColumns.StudyDate = entity.StudyDate;
     updateColumns.StudyTime = entity.StudyTime;
     updateColumns.ArchiveInfo = entity.ArchiveInfo;
     updateColumns.ExtendedInfo = entity.ExtendedInfo;
     StudyDeleteRecord newEntity = broker.Insert(updateColumns);
     return newEntity;
 }
Beispiel #5
0
 static public StudyDeleteRecord Insert(StudyDeleteRecord entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         StudyDeleteRecord newEntity = Insert(update, entity);
         update.Commit();
         return newEntity;
     }
 }
		public static DeletedStudyInfo CreateDeletedStudyInfo(StudyDeleteRecord record)
		{
			Filesystem fs = Filesystem.Load(record.FilesystemKey);

		    StudyDeleteExtendedInfo extendedInfo = XmlUtils.Deserialize<StudyDeleteExtendedInfo>(record.ExtendedInfo);
			DeletedStudyInfo info = new DeletedStudyInfo
			                        	{
			                        		DeleteStudyRecord = record.GetKey(),
			                        		RowKey = record.GetKey().Key,
			                        		StudyInstanceUid = record.StudyInstanceUid,
			                        		PatientsName = record.PatientsName,
			                        		AccessionNumber = record.AccessionNumber,
			                        		PatientId = record.PatientId,
			                        		StudyDate = record.StudyDate,
			                        		PartitionAE = record.ServerPartitionAE,
			                        		StudyDescription = record.StudyDescription,
			                        		BackupFolderPath = fs.GetAbsolutePath(record.BackupPath),
			                        		ReasonForDeletion = record.Reason,
			                        		DeleteTime = record.Timestamp,
			                        		UserName = extendedInfo.UserName,
			                        		UserId = extendedInfo.UserId
			                        	};
			if (record.ArchiveInfo!=null)
				info.Archives = XmlUtils.Deserialize<DeletedStudyArchiveInfoCollection>(record.ArchiveInfo);

            
			return info;
		}