public async Task <IActionResult> Approve(ApproveInputModel inputModel) { var trainer = await this.userManager.GetUserAsync(this.User); string trainerId = await this.userManager.GetUserIdAsync(trainer); await this.appointmentsService.ApproveAppointment(inputModel.AppointmentId, trainerId, inputModel.ClientId); return(this.Redirect("/Trainers/Appointments/")); }
public ActionResult Approve(ApproveInputModel approve) { SubjectBll bll = new SubjectBll(); var subjectEntity = bll.GetSubject(approve.SubjectId); Yw_SubjectProcess nextProcess = new Yw_SubjectProcess(); nextProcess.Ysp_Action = (int)SubjectActionEnum.审批; nextProcess.Ysp_CreateTime = DateTime.Now; nextProcess.Ysp_Id = 0; nextProcess.Ysp_Operator = CurrentUserID; nextProcess.Ysp_Remark = ""; nextProcess.Ysp_Status = (int)approve.NextStatus; nextProcess.Ysp_SubjectId = approve.SubjectId; subjectEntity.Ysj_Status = nextProcess.Ysp_Status; if (approve.Mark != null && approve.Mark.Count > 0) { string mark = string.Join(",", approve.Mark); nextProcess.Ysp_Mark = mark; } bll.Approve(subjectEntity, nextProcess); return(Json(new SuccessJsonResponse())); }