Esempio n. 1
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);
            }

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

            ServerPartitionSelector.SetUpdatePanel(PageContent);

            SetPageTitle(Titles.WorkQueuePageTitle);
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
 protected void RefreshTimer_Tick(object sender, EventArgs e)
 {
     SearchPanel.Refresh();
 }
Esempio n. 4
0
 void DeleteWorkQueueDialog_WorkQueueItemDeleted(Model.WorkQueue item)
 {
     SearchPanel.Refresh();
 }
Esempio n. 5
0
 void ResetWorkQueueDialog_WorkQueueItemReseted(Model.WorkQueue item)
 {
     SearchPanel.Refresh();
 }
Esempio n. 6
0
 private void ScheduleWorkQueueDialog_OnWorkQueueUpdated(List <Model.WorkQueue> workqueueItems)
 {
     SearchPanel.Refresh();
 }