/// <summary> /// /// </summary> /// <param name="dto"></param> /// <returns></returns> public PublicResult <ScheduleTaskDetailApo> GetScheduleTaskDetail(GetScheduleTaskDetailDto dto) { using (var client = DbFactory.CreateClient()) { var scheduleTask = client.Queryable <ScheduleTask>().InSingle(dto.Id); if (scheduleTask == null) { return(Error("找不到该数据")); } var resp = new ScheduleTaskDetailApo { Id = scheduleTask.Id, Name = scheduleTask.Name, Status = scheduleTask.Status, StatusDesc = scheduleTask.StatusDesc, JobKey = scheduleTask.JobKey, JobGroup = scheduleTask.JobGroup, TriggerKey = scheduleTask.TriggerKey, TriggerGroup = scheduleTask.TriggerGroup, IsEnable = scheduleTask.IsEnable, Type = scheduleTask.Type, Cron = scheduleTask.Cron, Interval = scheduleTask.Interval, LastStartTime = scheduleTask.LastStartTime, LastEndTime = scheduleTask.LastEndTime, LastSuccessTime = scheduleTask.LastSuccessTime }; return(resp); } }
public IActionResult Update(GetScheduleTaskDetailDto dto) { var result = _scheduleTaskService.GetScheduleTaskDetail(dto); if (result.Code > 0) { return(Json(result)); } var model = new UpdateModel() { ScheduleTask = result.Data }; return(View("~/Administration/Views/ScheduleTask/Update.cshtml", model)); }