Пример #1
0
        protected override bool OnServerSideEvaluate()
        {
            String aeTitle = GetControlValidationValue(ControlToValidate);

            if (String.IsNullOrEmpty(aeTitle))
            {
                ErrorMessage = ValidationErrors.AETitleCannotBeEmpty;
                return false;
            }

            if (OriginalAeTitle.Equals(aeTitle))
                return true;

            var controller = new ServerPartitionConfigController();
            var criteria = new ServerPartitionSelectCriteria();
            criteria.AeTitle.EqualTo(aeTitle);

            IList<ServerPartition> list = controller.GetPartitions(criteria);

            if (list.Count > 0)
            {
                ErrorMessage = String.Format(ValidationErrors.AETitleIsInUse, aeTitle);
                return false;
            }

            return true;
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var criteria = new ServerPartitionSelectCriteria();
            criteria.AeTitle.SortAsc(0);
            if (!Thread.CurrentPrincipal.IsInRole(AuthorityTokens.Vfs.ViewPartitions))
                criteria.ServerPartitionTypeEnum.EqualTo(ServerPartitionTypeEnum.Standard);

            var partitionController = new ServerPartitionConfigController();
            IList<ServerPartition> partitions = partitionController.GetPartitions(criteria);

            long totalStudies = 0;
            foreach(ServerPartition partition in partitions)
            {
                totalStudies += partition.StudyCount;
            }
            TotalStudiesLabel.Text = totalStudies.ToString("N0");

            _partitions = partitions;
            StudiesDataList.DataSource = _partitions;
            DataBind();
        }
Пример #3
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            StudyController studyController = new StudyController();
            ServerPartitionConfigController partitionConfigController = new ServerPartitionConfigController();

            string serverae = Request.QueryString[QUERY_KEY_SERVER_AE];
            if (!String.IsNullOrEmpty(serverae))
            {
                // Load the Partition
                ServerPartitionSelectCriteria partitionCriteria = new ServerPartitionSelectCriteria();
                partitionCriteria.AeTitle.EqualTo(serverae);
                IList<ServerPartition> list = partitionConfigController.GetPartitions(partitionCriteria);
                this.Move.Partition = list[0];

                for (int i = 1;; i++)
                {
                    string studyuid = Request.QueryString[String.Format("{0}{1}", QUERY_KEY_STUDY_INSTANCE_UID, i)];

                    if (!String.IsNullOrEmpty(studyuid))
                    {
                        _uids.Add(studyuid, serverae);

                        StudySelectCriteria studyCriteria = new StudySelectCriteria();
                        studyCriteria.StudyInstanceUid.EqualTo(studyuid);
                        studyCriteria.ServerPartitionKey.EqualTo(list[0].GetKey());

                        IList<Study> studyList = studyController.GetStudies(studyCriteria);

                        this.Move.StudyGridView.StudyList.Add(studyList[0]);
                        this.Move.StudyGridView.Partition = this.Move.Partition;
                    }
                    else
                        break;
                }
            }

            SetPageTitle(Titles.MoveStudiesPageTitle);
        }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ServerPartitionConfigController partitionConfigController = new ServerPartitionConfigController();

            string serverae = Request.QueryString[ImageServerConstants.QueryStrings.ServerAE];

            if (!String.IsNullOrEmpty(serverae))
            {
                // Load the Partition
                ServerPartitionSelectCriteria partitionCriteria = new ServerPartitionSelectCriteria();
                partitionCriteria.AeTitle.EqualTo(serverae);
                IList<ServerPartition> list = partitionConfigController.GetPartitions(partitionCriteria);
                Partition = list[0];
                SeriesGridView.Partition = Partition;
            
                string studyuid = Request.QueryString[ImageServerConstants.QueryStrings.StudyUID];

                if (!String.IsNullOrEmpty(studyuid) || Partition != null)
                {
                    StudyController studyController = new StudyController();
                    StudySelectCriteria criteria = new StudySelectCriteria();
                    criteria.StudyInstanceUid.EqualTo(studyuid);
                    criteria.ServerPartitionKey.EqualTo(Partition.Key);

                    IList<Study> studyList = studyController.GetStudies(criteria);

                    SelectedStudy = studyList[0];
                    SeriesGridView.Study = studyList[0];
                    PatientSummary.PatientSummary = PatientSummaryAssembler.CreatePatientSummary(studyList[0]);
                    StudySummary.Study = studyList[0];
                }
            }

            if (DHCPFilter.Items.Count == 0)
            {
                DHCPFilter.Items.Add(new ListItem(SR.All));
                DHCPFilter.Items.Add(new ListItem(SR.DHCP));
                DHCPFilter.Items.Add(new ListItem(SR.NoDHCP));
            }

            IList<DeviceTypeEnum> deviceTypes = DeviceTypeEnum.GetAll();

            if (DeviceTypeFilter.Items.Count == 0)
            {
                foreach (DeviceTypeEnum t in deviceTypes)
                {
                    DeviceTypeFilter.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(t), t.Lookup));
                }
            }
            else
            {
                ListItem[] typeItems = new ListItem[DeviceTypeFilter.Items.Count];
                DeviceTypeFilter.Items.CopyTo(typeItems, 0);
                DeviceTypeFilter.Items.Clear();
                int count = 0;
                foreach (DeviceTypeEnum t in deviceTypes)
                {
                    DeviceTypeFilter.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(t), t.Lookup));
                    DeviceTypeFilter.Items[count].Selected = typeItems[count].Selected;
                    count++;
                }
            }

            LoadSeries();
            LoadDevices();

            DataBind();
        }