public override void DataBind() { if (ArchiveQueueItemList != null) { ArchiveQueueAdaptor adaptor = new ArchiveQueueAdaptor(); } base.DataBind(); }
public int GetArchiveQueueCount(Study study) { Platform.CheckForNullReference(study, "Study"); ArchiveQueueAdaptor adaptor = new ArchiveQueueAdaptor(); ArchiveQueueSelectCriteria archiveQueueCriteria = new ArchiveQueueSelectCriteria(); archiveQueueCriteria.StudyStorageKey.EqualTo(study.StudyStorageKey); archiveQueueCriteria.ScheduledTime.SortDesc(0); return(adaptor.GetCount(archiveQueueCriteria)); }
/// <summary> /// Determine if the specified partition can be deleted. If studies are scheduled /// to be archived on that partition or studies are already archived on that partition, /// then the partition may not be deleted. /// /// </summary> /// <param name="partition"></param> /// <returns></returns> public bool CanDelete(PartitionArchive partition) { ArchiveQueueAdaptor archiveQueueAdaptor = new ArchiveQueueAdaptor(); ArchiveQueueSelectCriteria selectCriteria = new ArchiveQueueSelectCriteria(); selectCriteria.PartitionArchiveKey.EqualTo(partition.GetKey()); ArchiveStudyStorageAdaptor archiveStudyStorageAdaptor = new ArchiveStudyStorageAdaptor(); ArchiveStudyStorageSelectCriteria criteria = new ArchiveStudyStorageSelectCriteria(); criteria.PartitionArchiveKey.EqualTo(partition.GetKey()); int queueItems = archiveQueueAdaptor.GetCount(selectCriteria); int storageItems = 0; // only check if we need to. if (queueItems == 0) { storageItems = archiveStudyStorageAdaptor.GetCount(criteria); } return(!((queueItems > 0) || (storageItems > 0))); }
public int GetArchiveQueueCount(Study study) { Platform.CheckForNullReference(study, "Study"); ArchiveQueueAdaptor adaptor = new ArchiveQueueAdaptor(); ArchiveQueueSelectCriteria archiveQueueCriteria = new ArchiveQueueSelectCriteria(); archiveQueueCriteria.StudyStorageKey.EqualTo(study.StudyStorageKey); archiveQueueCriteria.ScheduledTime.SortDesc(0); return adaptor.GetCount(archiveQueueCriteria); }
/// <summary> /// Determine if the specified partition can be deleted. If studies are scheduled /// to be archived on that partition or studies are already archived on that partition, /// then the partition may not be deleted. /// /// </summary> /// <param name="partition"></param> /// <returns></returns> public bool CanDelete(PartitionArchive partition) { ArchiveQueueAdaptor archiveQueueAdaptor = new ArchiveQueueAdaptor(); ArchiveQueueSelectCriteria selectCriteria = new ArchiveQueueSelectCriteria(); selectCriteria.PartitionArchiveKey.EqualTo(partition.GetKey()); ArchiveStudyStorageAdaptor archiveStudyStorageAdaptor = new ArchiveStudyStorageAdaptor(); ArchiveStudyStorageSelectCriteria criteria = new ArchiveStudyStorageSelectCriteria(); criteria.PartitionArchiveKey.EqualTo(partition.GetKey()); int queueItems = archiveQueueAdaptor.GetCount(selectCriteria); int storageItems = 0; // only check if we need to. if (queueItems == 0) storageItems = archiveStudyStorageAdaptor.GetCount(criteria); return !((queueItems > 0) || (storageItems > 0)); }
public override void DataBind() { if (ArchiveQueueItemList != null) { ArchiveQueueAdaptor adaptor = new ArchiveQueueAdaptor(); } base.DataBind(); }