public async Task<ActionResult> TrainingCreated(ProjectModels form)
 {
     var result = await _commandService.Execute(new StartProjectFlow("hc105", "T1", DateTime.Now), CommandReturnType.EventHandled);
     if (result.Status == CommandStatus.Success)
     {
         var result2 = await _commandService.Execute(new StartTrainingProject(result.AggregateRootId, form.TrainingTarget, form.NumOfPerson, form.ReceivedTime, form.Days, form.ExpectTime,
         form.CourseTitle, form.ProjectContact, form.Decision, form.ProjectOrigin, form.Rival, form.Bid,
         form.ProjectPossi, form.CusProBudget, form.ProjectEmergency, form.CourseSubject, form.CourseDetail, form.CourseOther), CommandReturnType.EventHandled);
         if (result2.Status == CommandStatus.Success)
         {
             var result3 = await _commandService.Execute(new CreateSubProcess(result.AggregateRootId, "R01", 1, ""), CommandReturnType.EventHandled);
             if (result3.Status == CommandStatus.Success)
             {
                 MailMessageHelper.CreateMessage("*****@*****.**", "项目流程信使,项目编号" + result.AggregateRootId, "培训项目需求单已提交,请区域总监审核");
                 return Json(new { success = true, errorMsg = "创建培训项目成功", ProjectId = result.AggregateRootId });
             }
         }
     }
     return Json(new { success = false, errorMsg = "创建培训项目失败" });
 }
 public async Task<ActionResult> TrainingUpdated(ProjectModels form)
 {
     var result = await commandService.Execute(new UpdateTrainingProject(form.ProjectId, form.TrainingTarget, form.NumOfPerson, form.ReceivedTime, form.Days, form.ExpectTime,
         form.CourseTitle, form.ProjectContact, form.Decision, form.ProjectOrigin, form.Rival, form.Bid,
         form.ProjectPossi, form.CusProBudget, form.ProjectEmergency, form.CourseSubject, form.CourseDetail, form.CourseOther), CommandReturnType.EventHandled);
     if (result.Status == CommandStatus.Success)
     {
         return Json(new { success = true, errorMsg = "修改培训项目成功" });
     }
     else
     {
         return Json(new { success = false, errorMsg = "修改培训项目失败" });
     }
 }