예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IList <RestoreQueueStatusEnum> statusItems = RestoreQueueStatusEnum.GetAll();

            int prevSelectedIndex = StatusFilter.SelectedIndex;

            StatusFilter.Items.Clear();
            StatusFilter.Items.Add(new ListItem(SR.All, "All"));
            foreach (RestoreQueueStatusEnum s in statusItems)
            {
                StatusFilter.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(s), s.Lookup));
            }
            StatusFilter.SelectedIndex = prevSelectedIndex;

            DeleteItemButton.Roles       = AuthorityTokens.RestoreQueue.Delete;
            ViewStudyDetailsButton.Roles = AuthorityTokens.Study.View;

            if (!IsPostBack && !Page.IsAsync)
            {
                var patientId   = Server.UrlDecode(Request["PatientID"]);
                var patientName = Server.UrlDecode(Request["PatientName"]);
                if (patientId != null || patientName != null)
                {
                    PatientId.TrimText   = patientId;
                    PatientName.TrimText = patientName;

                    RestoreQueueItemList.SetDataSource();
                    RestoreQueueItemList.Refresh();
                }
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IList <RestoreQueueStatusEnum> statusItems = RestoreQueueStatusEnum.GetAll();

            int prevSelectedIndex = StatusFilter.SelectedIndex;

            StatusFilter.Items.Clear();
            StatusFilter.Items.Add(new ListItem(SR.All, "All"));
            foreach (RestoreQueueStatusEnum s in statusItems)
            {
                StatusFilter.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(s), s.Lookup));
            }
            StatusFilter.SelectedIndex = prevSelectedIndex;

            DeleteItemButton.Roles       = AuthorityTokens.RestoreQueue.Delete;
            ViewStudyDetailsButton.Roles = AuthorityTokens.Study.View;

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

                if (patientID != null && patientName != null && partitionKey != null)
                {
                    var controller = new ServerPartitionConfigController();
                    ServerPartition = controller.GetPartition(new ServerEntityKey("ServerPartition", partitionKey));

                    PatientId.Text   = patientID;
                    PatientName.Text = patientName;

                    RestoreQueueItemList.SetDataSource();
                    RestoreQueueItemList.Refresh();
                }
            }
        }