Exemple #1
0
        public static bool AddTask(Job model, string action)
        {
            var result = false;

            if (action == "edit")
            {
                result = task.Edit(model);
            }
            else
            {
                model.JobID = Guid.NewGuid();
                result      = task.Add(model);
            }

            if (result)
            {
                QuartzHelper.ScheduleJob(model, true);
            }
            return(result);
        }