// // GET: /Task/History/5 public ActionResult History(int taskId) { var task = ScheduledTaskService.GetScheduledTaskDetail(taskId); if (task == null) { Log.Error("找不到定时任务。"); throw new KeyNotFoundException("找不到定时任务。"); } ViewData["Task"] = task; return(View()); }