public void HideRescheduleDialog() { ScheduleWorkQueueDialog.Hide(); var itemList = FindControl("WorkQueueItemList") as WorkQueueItemList; if (itemList != null) { itemList.Refresh(); } }
/// <summary> /// Pops up a dialog box to let user to reschedule a work queue item /// </summary> private void RescheduleWorkQueueItem(Model.WorkQueue item) { if (item == null) { MessageBox.BackgroundCSS = string.Empty; MessageBox.Message = SR.SelectedWorkQueueNoLongerOnTheList; MessageBox.MessageStyle = "color: red; font-weight: bold;"; MessageBox.MessageType = MessageBox.MessageTypeEnum.ERROR; MessageBox.Show(); return; } var keys = new List <ServerEntityKey>(); keys.Add(item.GetKey()); ScheduleWorkQueueDialog.WorkQueueKeys = keys; if (WorkQueueItemDetailsPanel.WorkQueue != null) { if (WorkQueueItemDetailsPanel.WorkQueue.WorkQueueStatusEnum == WorkQueueStatusEnum.Failed) { MessageBox.Message = SR.WorkQueueRescheduleFailed_ItemHasFailed; MessageBox.MessageType = MessageBox.MessageTypeEnum.ERROR; MessageBox.Show(); return; } if (WorkQueueItemDetailsPanel.WorkQueue.WorkQueueStatusEnum == WorkQueueStatusEnum.InProgress) { MessageBox.Message = SR.WorkQueueBeingProcessed; MessageBox.MessageType = MessageBox.MessageTypeEnum.ERROR; MessageBox.Show(); return; } ScheduleWorkQueueDialog.Show(); } }
protected override void OnPreRender(EventArgs e) { if (WorkQueueItemKey == null || _workQueue == null) { // make sure all dialogs are closed ScheduleWorkQueueDialog.Hide(); WorkQueueItemDetailsPanel.Visible = false; ResetWorkQueueDialog.Hide(); Message.Text = SR.WorkQueueNotAvailable; Message.Visible = true; UpdatePanel.Update(); } else { Message.Visible = false; } WorkQueueItemDetailsPanel.AutoRefresh = !DeleteWorkQueueDialog.IsShown; base.OnPreRender(e); }