Esempio n. 1
0
        protected override bool OnServerSideEvaluate()
        {
            String deviceAE = GetControlValidationValue(ControlToValidate);

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

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

            var controller = new DeviceConfigurationController();
            var criteria = new DeviceSelectCriteria();
            criteria.AeTitle.EqualTo(deviceAE);
            criteria.ServerPartitionKey.EqualTo(Partition);

            IList<Device> list = controller.GetDevices(criteria);
            foreach (var d in list)
            {
                if (string.Compare(d.AeTitle, deviceAE, false, CultureInfo.InvariantCulture) == 0)
                {
                    ErrorMessage = String.Format(ValidationErrors.AETitleIsInUse, deviceAE);
                    return false;
                }
            }

            return true;
        }
Esempio n. 2
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            // initialize the controller
            _theController = new DeviceConfigurationController();

            // setup child controls
            GridPagerTop.InitializeGridPager(SR.GridPagerDeviceSingleItem, SR.GridPagerDeviceMultipleItems, DeviceGridPanel.TheGrid, delegate { return DeviceGridPanel.Devices.Count; }, ImageServerConstants.GridViewPagerPosition.Top);
            DeviceGridPanel.Pager = GridPagerTop;

            MoveConfirmation.Confirmed += delegate(object data)
                                              {

                    IList<Device> devices = data as IList<Device>;

                    StudyController studyController = new StudyController();
                    foreach (Study study in StudyGridView.StudyList)
                    {
                        foreach (Device device in devices)
                            studyController.MoveStudy(study, device);
                    }


                                              };

        }
Esempio n. 3
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            // initialize the controller
            _theController = new DeviceConfigurationController();

            // setup child controls
            GridPagerTop.InitializeGridPager(SR.GridPagerDeviceSingleItem, SR.GridPagerDeviceMultipleItems, DeviceGridPanel.TheGrid, delegate { return DeviceGridPanel.Devices.Count; }, ImageServerConstants.GridViewPagerPosition.Top);
            DeviceGridPanel.Pager = GridPagerTop;

            MoveConfirmation.Confirmed += delegate(object data)
                                              {
                    MoveRequest moveData = MoveConfirmation.Data as MoveRequest;

                    StudyController studyController = new StudyController();

                    foreach(Device device in moveData.DestinationDevices)
                    {
                        studyController.MoveStudy(moveData.SelectedStudy, device, moveData.Series);                        
                    }

                                              };

        }
Esempio n. 4
0
        public void OnDeleteDevice(DeviceConfigurationController controller, ServerPartition serverPartition, Device dev)
        {
            if (controller.GetRelatedWorkQueueCount(dev) > 0)
            {
                DeleteConfirmation.Message = string.Format(ErrorMessages.AdminDevices_DeleteDevice_PendingWorkQueue,dev.AeTitle);
                DeleteConfirmation.MessageType = MessageBox.MessageTypeEnum.ERROR;             
            }
            else
            {
                DeleteConfirmation.Message = string.Format(SR.AdminDevices_DeleteDevice_AreYouSure, dev.AeTitle, serverPartition.AeTitle);
                DeleteConfirmation.MessageType = MessageBox.MessageTypeEnum.YESNO;
            }

            DeleteConfirmation.Data = dev;
            DeleteConfirmation.Show();
        }
Esempio n. 5
0
 public void OnEditDevice(DeviceConfigurationController controller, ServerPartition serverPartition, Device dev)
 {
     // Populate the edit device dialog and display it
     AddEditDeviceControl1.EditMode = true;
     AddEditDeviceControl1.Device = dev;
     AddEditDeviceControl1.Partitions = controller.GetServerPartitions();
     AddEditDeviceControl1.Show(true);
 }
Esempio n. 6
0
 public void OnAddDevice(DeviceConfigurationController controller, ServerPartition serverPartition)
 {
     // Populate the add device dialog and display it
     AddEditDeviceControl1.EditMode = false;
     AddEditDeviceControl1.Device = null;
     IList<ServerPartition> list = new List<ServerPartition>();
     list.Add(serverPartition);
     AddEditDeviceControl1.Partitions = list;
     AddEditDeviceControl1.Show(true);
 }
Esempio n. 7
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            // initialize the controller
            _theController = new DeviceConfigurationController();

            // setup child controls
            GridPagerTop.InitializeGridPager(SR.GridPagerDeviceSingleItem, SR.GridPagerDeviceMultipleItems,
                                             DeviceGridViewControl1.TheGrid,
                                             () => DeviceGridViewControl1.Devices.Count,
                                             ImageServerConstants.GridViewPagerPosition.Top);
            DeviceGridViewControl1.Pager = GridPagerTop;
            GridPagerTop.Reset();

            StatusFilter.Items.Add(new ListItem(SR.All));
            StatusFilter.Items.Add(new ListItem(SR.Enabled));
            StatusFilter.Items.Add(new ListItem(SR.Disabled));

            DHCPFilter.Items.Add(new ListItem(SR.All));
            DHCPFilter.Items.Add(new ListItem(SR.DHCP));
            DHCPFilter.Items.Add(new ListItem(SR.NoDHCP));
        }