Beispiel #1
0
        protected override void OnInit(EventArgs e)
        {
            ServerPartitionSelector.UseNonResearchPartitions = true;
            ServerPartitionSelector.PartitionChanged        += delegate(ServerPartition partition)
            {
                SearchPanel.ServerPartition = partition;
                SearchPanel.Reset();
            };

            ServerPartitionSelector.SetUpdatePanel(PageContent);
            SearchPanel.EnclosingPage = this;

            ConfirmDialog.Confirmed += delegate(object data)
            {
                // delete the device and reload the affected partition.
                var key = data as ServerEntityKey;

                ServerRule rule = ServerRule.Load(key);

                _controller.DeleteServerRule(rule);

                SearchPanel.Refresh();
            };


            AddEditDataRuleControl.OKClicked += delegate(ServerRule rule)
            {
                if (AddEditDataRuleControl.Mode == AddEditDataRuleDialogMode.Edit)
                {
                    // Commit the change into database
                    if (!_controller.UpdateServerRule(rule))
                    {
                        // TODO: alert user
                    }
                }
                else
                {
                    // Create new device in the database
                    ServerRule newRule = _controller.AddServerRule(rule);
                    if (newRule == null)
                    {
                        //TODO: alert user
                    }
                }

                SearchPanel.Refresh();
            };


            SetPageTitle(Titles.DataRulesPageTitle);

            base.OnInit(e);
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            ServerPartitionSelector.PartitionChanged += delegate(ServerPartition partition)
            {
                SearchPanel.ServerPartition = partition;
                SearchPanel.Reset();
            };

            ServerPartitionSelector.SetUpdatePanel(PageContent);

            SetPageTitle(Titles.RestoreQueuePageTitle);
        }
Beispiel #3
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            SetupEventHandlers();

            ServerPartitionSelector.UseNonResearchPartitions = true;
            ServerPartitionSelector.PartitionChanged        += delegate(ServerPartition partition)
            {
                SearchPanel.ServerPartition = partition;
                SearchPanel.Reset();
            };

            ServerPartitionSelector.SetUpdatePanel(PageContent);
        }
Beispiel #4
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            DeleteStudyConfirmDialog.StudyDeleted += DeleteStudyConfirmDialogStudyDeleted;

            ServerPartitionSelector.PartitionChanged += delegate(ServerPartition partition)
            {
                SearchPanel.ServerPartition = partition;
                SearchPanel.Reset();
            };
            SetPageTitle(Titles.StudiesPageTitle);

            ServerPartitionSelector.SetUpdatePanel(PageContent);
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            ServerPartition activePartition = null;

            if (!IsPostBack && !Page.IsAsync)
            {
                string patientID    = Request["PatientID"];
                string patientName  = Request["PatientName"];
                string partitionKey = Request["PartitionKey"];
                string reason       = Request["Reason"];

                if (!string.IsNullOrEmpty(patientID) && !string.IsNullOrEmpty(patientName) &&
                    !string.IsNullOrEmpty(partitionKey))
                {
                    if (!string.IsNullOrEmpty(partitionKey))
                    {
                        var controller = new ServerPartitionConfigController();
                        activePartition = controller.GetPartition(new ServerEntityKey("ServerPartition", partitionKey));
                    }
                }
                if (string.IsNullOrEmpty(reason))
                {
                    if (!string.IsNullOrEmpty(partitionKey))
                    {
                        var controller = new ServerPartitionConfigController();
                        activePartition = controller.GetPartition(new ServerEntityKey("ServerPartition", partitionKey));
                    }
                }
            }

            ServerPartitionSelector.PartitionChanged += delegate(ServerPartition partition)
            {
                SearchPanel.ServerPartition = partition;
                SearchPanel.Reset();
            };

            ServerPartitionSelector.SetUpdatePanel(PageContent);

            if (activePartition != null)
            {
                ServerPartitionSelector.SelectedPartition = activePartition;
            }

            SetPageTitle(Titles.StudyIntegrityQueuePageTitle);
        }
Beispiel #6
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            SearchPanel.EnclosingPage = this;

            ServerPartitionSelector.UseNonResearchPartitions = true;
            ServerPartitionSelector.PartitionChanged        += delegate(ServerPartition partition)
            {
                SearchPanel.ServerPartition = partition;
                SearchPanel.Reset();
            };

            ServerPartitionSelector.SetUpdatePanel(PageContent);

            SetPageTitle(Titles.ArchiveQueuePageTitle);
        }
Beispiel #7
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            AddEditDeviceControl1.DevicePage = this;
            SearchPanel.EnclosingPage        = this;

            SetupEventHandlers();

            ServerPartitionSelector.PartitionChanged += delegate(ServerPartition partition)
            {
                SearchPanel.ServerPartition = partition;
                SearchPanel.Reset();
            };

            ServerPartitionSelector.SetUpdatePanel(PageContent);
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            SearchPanel.EnclosingPage = this;

            RefreshTimer.AutoDisabled                += RefreshTimer_AutoDisabled;
            ConfirmRescheduleDialog.Confirmed        += ConfirmationContinueDialog_Confirmed;
            ScheduleWorkQueueDialog.WorkQueueUpdated += ScheduleWorkQueueDialog_OnWorkQueueUpdated;
            ScheduleWorkQueueDialog.OnShow           += DisableRefresh;
            ScheduleWorkQueueDialog.OnHide           += () => RefreshTimer.Reset(AutoRefresh);

            ResetWorkQueueDialog.WorkQueueItemReseted += ResetWorkQueueDialog_WorkQueueItemReseted;
            ResetWorkQueueDialog.OnShow += DisableRefresh;
            ResetWorkQueueDialog.OnHide += () => RefreshTimer.Reset(AutoRefresh);
            DeleteWorkQueueDialog.WorkQueueItemDeleted += DeleteWorkQueueDialog_WorkQueueItemDeleted;
            DeleteWorkQueueDialog.OnShow += DisableRefresh;
            DeleteWorkQueueDialog.OnHide += () => RefreshTimer.Reset(AutoRefresh);
            InformationDialog.OnShow     += DisableRefresh;
            InformationDialog.OnHide     += () => RefreshTimer.Reset(AutoRefresh);

            if (!Page.IsPostBack)
            {
                AutoRefresh             = false;
                RefreshTimer.Enabled    = false;
                RefreshTimer.Interval   = (int)TimeSpan.FromSeconds(Math.Max(WorkQueueSettings.Default.NormalRefreshIntervalSeconds, 5)).TotalMilliseconds;// min refresh rate: every 5 sec
                RefreshRateTextBox.Text = TimeSpan.FromMilliseconds(RefreshTimer.Interval).TotalSeconds.ToString(CultureInfo.InvariantCulture);
            }

            ServerPartitionSelector.PartitionChanged += delegate(ServerPartition partition)
            {
                SearchPanel.ServerPartition = partition;
                SearchPanel.Reset();
            };

            ServerPartitionSelector.SetUpdatePanel(PageContent);

            SetPageTitle(Titles.WorkQueuePageTitle);
        }
Beispiel #9
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            SearchPanel.EnclosingPage = this;

            RefreshTimer.AutoDisabled                += RefreshTimer_AutoDisabled;
            ConfirmRescheduleDialog.Confirmed        += ConfirmationContinueDialog_Confirmed;
            ScheduleWorkQueueDialog.WorkQueueUpdated += ScheduleWorkQueueDialog_OnWorkQueueUpdated;
            ScheduleWorkQueueDialog.OnShow           += DisableRefresh;
            ScheduleWorkQueueDialog.OnHide           += () => RefreshTimer.Reset(AutoRefresh);

            ResetWorkQueueDialog.WorkQueueItemReseted += ResetWorkQueueDialog_WorkQueueItemReseted;
            ResetWorkQueueDialog.OnShow += DisableRefresh;
            ResetWorkQueueDialog.OnHide += () => RefreshTimer.Reset(AutoRefresh);
            DeleteWorkQueueDialog.WorkQueueItemDeleted += DeleteWorkQueueDialog_WorkQueueItemDeleted;
            DeleteWorkQueueDialog.OnShow += DisableRefresh;
            DeleteWorkQueueDialog.OnHide += () => RefreshTimer.Reset(AutoRefresh);
            InformationDialog.OnShow     += DisableRefresh;
            InformationDialog.OnHide     += () => RefreshTimer.Reset(AutoRefresh);

            if (!Page.IsPostBack)
            {
                AutoRefresh             = false;
                RefreshTimer.Enabled    = false;
                RefreshTimer.Interval   = (int)TimeSpan.FromSeconds(Math.Max(WorkQueueSettings.Default.NormalRefreshIntervalSeconds, 5)).TotalMilliseconds;// min refresh rate: every 5 sec
                RefreshRateTextBox.Text = TimeSpan.FromMilliseconds(RefreshTimer.Interval).TotalSeconds.ToString(CultureInfo.InvariantCulture);
            }

            string          patientID       = string.Empty;
            string          patientName     = string.Empty;
            string          processorID     = string.Empty;
            ServerPartition activePartition = null;

            if (!IsPostBack && !Page.IsAsync)
            {
                patientID   = Server.UrlDecode(Request["PatientID"]);
                patientName = Server.UrlDecode(Request["PatientName"]);
                string partitionKey = Request["PartitionKey"];
                processorID = Request["ProcessorID"];

                if (!string.IsNullOrEmpty(partitionKey))
                {
                    var controller = new ServerPartitionConfigController();
                    activePartition = controller.GetPartition(new ServerEntityKey("ServerPartition", partitionKey));
                }
            }

            ServerPartitionSelector.PartitionChanged += delegate(ServerPartition partition)
            {
                SearchPanel.ServerPartition = partition;
                SearchPanel.Reset();
            };

            ServerPartitionSelector.SetUpdatePanel(PageContent);

            SearchPanel.PatientNameFromUrl      = patientName;
            SearchPanel.PatientIDFromUrl        = patientID;
            SearchPanel.ProcessingServerFromUrl = processorID;


            if (activePartition != null)
            {
                ServerPartitionSelector.SelectedPartition = activePartition;
            }

            SetPageTitle(Titles.WorkQueuePageTitle);
        }