/// <summary> /// 新增/编辑作业 /// </summary> /// <param name="jobQuartz">作业实体参数</param> /// <returns></returns> public JsonResult AddJobQuartz(JobQuartzOutPut jobQuartz) { OperateStatus statu = new OperateStatus(); jobQuartz.Addtime = DateTime.Now; jobQuartz.UserName = "******"; if (jobQuartz.Id == 0) { QuartzEnum type = (QuartzEnum)Enum.Parse(typeof(QuartzEnum), jobQuartz.TriggerType); StdSchedulerManager.AddScheduleJob(jobQuartz, type); DataBaseLogic.Insert(jobQuartz); statu.Message = "添加成功"; statu.ResultSign = ResultSign.Successful; } else { StdSchedulerManager.UpdateJobTime(jobQuartz); DataBaseLogic.Update(jobQuartz); statu.Message = "编辑成功"; statu.ResultSign = ResultSign.Successful; } return(Json(statu)); }