Ejemplo n.º 1
0
 private void AddEditPartitionDialog_OKClicked(Model.PartitionArchive partition)
 {
     if (AddEditPartitionDialog.EditMode)
     {
         // Add partition into db and refresh the list
         if (_controller.UpdatePartition(partition))
         {
             UpdateUI();
         }
     }
     else
     {
         // Add partition into db and refresh the list
         if (_controller.AddPartition(partition))
         {
             UpdateUI();
         }
     }
 }
Ejemplo n.º 2
0
 public void DeletePartition(Model.PartitionArchive partitionArchive)
 {
     DeleteConfirmDialog.Message = String.Format(SR.AdminPartitionArchive_DeleteDialog_AreYouSure, partitionArchive.Description);
     DeleteConfirmDialog.MessageType = MessageBox.MessageTypeEnum.YESNO;
     DeleteConfirmDialog.Data = partitionArchive.GetKey();
     DeleteConfirmDialog.Show();
 }
Ejemplo n.º 3
0
 public void EditPartition(Model.PartitionArchive partitionArchive)
 {
     AddEditPartitionDialog.PartitionArchive = partitionArchive;
     AddEditPartitionDialog.EditMode = true;
     AddEditPartitionDialog.Show(true);
 	AddEditPartitionDialog.Partition = ServerPartition.Load(partitionArchive.ServerPartitionKey);
 }
Ejemplo n.º 4
0
 void DeleteWorkQueueDialog_WorkQueueItemDeleted(Model.WorkQueue item)
 {
     SearchPanel.Refresh();
 }
Ejemplo n.º 5
0
 void ResetWorkQueueDialog_WorkQueueItemReseted(Model.WorkQueue item)
 {
     SearchPanel.Refresh();
 }
Ejemplo n.º 6
0
 private void ReprocessWorkQueueItem(Model.WorkQueue item)
 {
     try
     {
         var controller = new WorkQueueController();
         if (controller.ReprocessWorkQueueItem(item))
         {
             MessageBox.Message = SR.ReprocessOK;
             MessageBox.MessageType = MessageBox.MessageTypeEnum.INFORMATION;
             MessageBox.Show();
         }
         else
         {
             ShowErrorMessage(SR.ReprocessFailed);
         }
     }
     catch(InvalidStudyStateOperationException  ex)
     {
         ShowErrorMessage(ex.Message);
     }
 }
Ejemplo n.º 7
0
        /// <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();
            }
        }
Ejemplo n.º 8
0
 private void ResetWorkQueueDialog_WorkQueueItemReseted(Model.WorkQueue item)
 {
     DataBind();
     WorkQueueItemDetailsPanel.Refresh();
 }
Ejemplo n.º 9
0
 private void DeleteWorkQueueDialog_WorkQueueItemDeleted(Model.WorkQueue item)
 {
     DataBind();
     Response.Redirect(ImageServerConstants.PageURLs.WorkQueueItemDeletedPage);
 }