public IActionResult Audit(int id, IFormCollection collection) { var dto = new AuditModel(); TryUpdateModelAsync(dto); if (ModelState.IsValid) { var result = _service.Audit(id, dto.AuditProfit, dto.ActualServiceAmount, CurrentUser.No, CurrentUser.Name); if (result > 0) { return(RedirectToAction(nameof(Index))); } ModelState.AddModelError(string.Empty, "审核失败"); } var entity = _db.Load <Approval>(id); ViewBag.Entity = entity; return(View(dto)); }