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