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)); } } }
private void GloriaCompleteButton_Click(object sender, RoutedEventArgs e) { if (GloriaListBox.SelectedIndex == -1) { return; } IfTask curTask = GloriaTasks[GloriaListBox.SelectedIndex]; CompleteTask(curTask); }
private void FrankCompleteButton_Click(object sender, RoutedEventArgs e) { if (FrankListBox.SelectedIndex == -1) { return; } IfTask curTask = FrankTasks[FrankListBox.SelectedIndex]; CompleteTask(curTask); }
private void EulerCompleteButton_Click(object sender, RoutedEventArgs e) { if (EulerListBox.SelectedIndex == -1) { return; } IfTask curTask = EulerTasks[EulerListBox.SelectedIndex]; CompleteTask(curTask); }
private void DouglasCompleteButton_Click(object sender, RoutedEventArgs e) { if (DouglasListBox.SelectedIndex == -1) { return; } IfTask curTask = DouglasTasks[DouglasListBox.SelectedIndex]; CompleteTask(curTask); }
private void ClareCompleteButton_Click(object sender, RoutedEventArgs e) { if (ClareListBox.SelectedIndex == -1) { return; } IfTask curTask = ClareTasks[ClareListBox.SelectedIndex]; CompleteTask(curTask); }
private void BobCompleteButton_Click(object sender, RoutedEventArgs e) { if (BobListBox.SelectedIndex == -1) { return; } IfTask curTask = BobTasks[BobListBox.SelectedIndex]; CompleteTask(curTask); }
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)); }
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(); }
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; }