예제 #1
0
 public int CompareTo(IfTask other)
 {
     // A null value means that this object is greater.
     if (other == null)
     {
         return(1);
     }
     if (this.Priority >= 0)
     {
         if (other.Priority >= 0)
         {
             return(0 - this.Priority.CompareTo(other.Priority));
         }
         else
         {
             return(1);
         }
     }
     else
     {
         if (other.Priority >= 0)
         {
             return(-1);
         }
         else
         {
             return(0 - this.Priority.CompareTo(other.Priority));
         }
     }
 }
예제 #2
0
        private void GloriaCompleteButton_Click(object sender, RoutedEventArgs e)
        {
            if (GloriaListBox.SelectedIndex == -1)
            {
                return;
            }
            IfTask curTask = GloriaTasks[GloriaListBox.SelectedIndex];

            CompleteTask(curTask);
        }
예제 #3
0
        private void FrankCompleteButton_Click(object sender, RoutedEventArgs e)
        {
            if (FrankListBox.SelectedIndex == -1)
            {
                return;
            }
            IfTask curTask = FrankTasks[FrankListBox.SelectedIndex];

            CompleteTask(curTask);
        }
예제 #4
0
        private void EulerCompleteButton_Click(object sender, RoutedEventArgs e)
        {
            if (EulerListBox.SelectedIndex == -1)
            {
                return;
            }
            IfTask curTask = EulerTasks[EulerListBox.SelectedIndex];

            CompleteTask(curTask);
        }
예제 #5
0
        private void DouglasCompleteButton_Click(object sender, RoutedEventArgs e)
        {
            if (DouglasListBox.SelectedIndex == -1)
            {
                return;
            }
            IfTask curTask = DouglasTasks[DouglasListBox.SelectedIndex];

            CompleteTask(curTask);
        }
예제 #6
0
        private void ClareCompleteButton_Click(object sender, RoutedEventArgs e)
        {
            if (ClareListBox.SelectedIndex == -1)
            {
                return;
            }
            IfTask curTask = ClareTasks[ClareListBox.SelectedIndex];

            CompleteTask(curTask);
        }
예제 #7
0
        private void BobCompleteButton_Click(object sender, RoutedEventArgs e)
        {
            if (BobListBox.SelectedIndex == -1)
            {
                return;
            }
            IfTask curTask = BobTasks[BobListBox.SelectedIndex];

            CompleteTask(curTask);
        }
예제 #8
0
 public void ArchiveTask(IfTask curTask)
 {
     if (curTask == null)
     {
         return;
     }
     //Submitter解绑定
     curTask.Submitter.SubmitTasks.Remove(curTask);
     //Handler解绑定
     curTask.Handler.HandleTasks.Remove(curTask);
     //移出列表
     taskList.Remove(curTask);
     completedTasks.Add(new CompletedTask(curTask));
 }
예제 #9
0
 private void CompleteTask(IfTask curTask)
 {
     if (curTask.IsBindingProcedure == true)
     {
         //Procedure任务设置状态为Wait,等待调度器处理
         curTask.Status = "Wait";
         mainDataSet.UpdateRuntimeDataSet();
         return;
     }
     //Custom任务直接存入归档数据库
     mainDataSet.ArchiveTask(curTask);
     mainDataSet.UpdateRuntimeDataSet();
     mainDataSet.UpdateArchiveDataSet();
 }
예제 #10
0
 public CompletedTask(IfTask curTask)
 {
     this.strName      = curTask.Name;
     this.strType      = curTask.BusinessType.Name;
     this.strSubmitter = curTask.Submitter.Name;
     this.strHandler   = curTask.Handler.Name;
     if (curTask.IsBindingProcedure == true)
     {
         this.strHandler = ExtractHandlerName(curTask.Description);
     }
     this.datStartTime     = curTask.StartTime;
     this.datDeadLine      = curTask.DeadLine;
     this.datCompletedTime = DateTime.Now;
     this.strQlevel        = curTask.QLevel.Name;
     this.strDescription   = curTask.Description;
 }