protected void Page_Load(object sender, EventArgs e) { IList <ArchiveQueueStatusEnum> statusItems = ArchiveQueueStatusEnum.GetAll(); int prevSelectedIndex = StatusFilter.SelectedIndex; StatusFilter.Items.Clear(); StatusFilter.Items.Add(new ListItem(SR.All, "All")); foreach (ArchiveQueueStatusEnum s in statusItems) { StatusFilter.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(s), s.Lookup)); } StatusFilter.SelectedIndex = prevSelectedIndex; DeleteItemButton.Roles = AuthorityTokens.ArchiveQueue.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.Text = patientId; PatientName.Text = patientName; ArchiveQueueItemList.SetDataSource(); ArchiveQueueItemList.Refresh(); } } }
public UpdateArchiveQueueItemCommand(ServerEntityKey archiveQueueKey, ServerEntityKey studyStorageKey, ArchiveQueueStatusEnum status) : base("Update Archive Queue Item") { _archiveQueueKey = archiveQueueKey; _studyStorageKey = studyStorageKey; _status = status; }
protected override void OnInit(EventArgs e) { base.OnInit(e); ClearScheduleDateButton.OnClientClick = ScriptHelper.ClearDate(ScheduleDate.ClientID, ScheduleDateCalendarExtender.ClientID); // setup child controls GridPagerTop.InitializeGridPager(Labels.GridPagerQueueSingleItem, Labels.GridPagerQueueMultipleItems, ArchiveQueueItemList.ArchiveQueueGrid, () => ArchiveQueueItemList.ResultCount, ImageServerConstants.GridViewPagerPosition.Top); ArchiveQueueItemList.Pager = GridPagerTop; MessageBox.Confirmed += delegate(object data) { if (data is IList <Model.ArchiveQueue> ) { var items = data as IList <Model.ArchiveQueue>; foreach (Model.ArchiveQueue item in items) { _controller.DeleteArchiveQueueItem(item); } } else if (data is Model.ArchiveQueue) { var item = data as Model.ArchiveQueue; _controller.DeleteArchiveQueueItem(item); } ArchiveQueueItemList.RefreshCurrentPage(); SearchUpdatePanel.Update(); // force refresh }; ArchiveQueueItemList.DataSourceCreated += delegate(ArchiveQueueDataSource source) { source.Partition = ServerPartition; source.DateFormats = ScheduleDateCalendarExtender.Format; if (!String.IsNullOrEmpty(StatusFilter.SelectedValue) && StatusFilter.SelectedIndex > 0) { source.StatusEnum = ArchiveQueueStatusEnum.GetEnum(StatusFilter.SelectedValue); } if (!String.IsNullOrEmpty(PatientId.TrimText)) { source.PatientId = SearchHelper.TrailingWildCard(PatientId.TrimText); } if (!String.IsNullOrEmpty(PatientName.TrimText)) { source.PatientName = SearchHelper.NameWildCard(PatientName.TrimText); } if (!String.IsNullOrEmpty(ScheduleDate.Text)) { source.ScheduledDate = ScheduleDate.Text; } }; }
/// <summary> /// Update an <see cref="ArchiveQueue"/> entry. /// </summary> /// <param name="item">The item to update.</param> /// <param name="status">The status to set the entry to.</param> /// <param name="scheduledTime">The scheduled time to set the entry to.</param> public void UpdateArchiveQueue(ArchiveQueue item, ArchiveQueueStatusEnum status, DateTime scheduledTime) { using (IUpdateContext updateContext = PersistentStore.OpenUpdateContext(UpdateContextSyncMode.Flush)) { if (UpdateArchiveQueue(updateContext, item, status, scheduledTime)) { updateContext.Commit(); } } }
public void Insert(Guid Guid, short EnumX, string Lookup, string Description, string LongDescription) { var item = new ArchiveQueueStatusEnum(); item.Guid = Guid; item.EnumX = EnumX; item.Lookup = Lookup; item.Description = Description; item.LongDescription = LongDescription; item.Save(UserName); }
/// <summary> /// Update an <see cref="ArchiveQueue"/> entry. /// </summary> /// <param name="item">The item to update.</param> /// <param name="status">The status to set the entry to.</param> /// <param name="scheduledTime">The scheduled time to set the entry to.</param> /// <param name="updateContext">The update context</param> public bool UpdateArchiveQueue(IUpdateContext updateContext, ArchiveQueue item, ArchiveQueueStatusEnum status, DateTime scheduledTime) { UpdateArchiveQueueParameters parms = new UpdateArchiveQueueParameters(); parms.ArchiveQueueKey = item.GetKey(); parms.ArchiveQueueStatusEnum = status; parms.ScheduledTime = scheduledTime; parms.StudyStorageKey = item.StudyStorageKey; if (!String.IsNullOrEmpty(item.FailureDescription)) { parms.FailureDescription = item.FailureDescription; } IUpdateArchiveQueue broker = updateContext.GetBroker <IUpdateArchiveQueue>(); if (broker.Execute(parms)) { return(true); } Platform.Log(LogLevel.Error, "Unexpected failure updating ArchiveQueue entry {0}", item.GetKey()); return(false); }
public void Update(Guid Guid, short EnumX, string Lookup, string Description, string LongDescription) { var item = new ArchiveQueueStatusEnum(); item.MarkOld(); item.IsLoaded = true; item.Guid = Guid; item.EnumX = EnumX; item.Lookup = Lookup; item.Description = Description; item.LongDescription = LongDescription; item.Save(UserName); }