Example #1
0
        public IActionResult Edit(string name, string group)
        {
            using (this.DbContext)
            {
                QuartzTriggersDataShape.Index(this.DbContext);
                var trigger = this.DbContext.QuartzTriggers.FirstOrDefault(o => o.TriggerName == name && o.TriggerGroup == group);

                var dialog = new EditScheduleDialog <EdieTaskScheduleModel, EdieTaskScheduleModel>(new EdieTaskScheduleModel(trigger));
                return(this.Dialog(dialog));
            }
        }
Example #2
0
 public IActionResult Index()
 {
     using (this.DbContext)
     {
         QuartzTriggersDataShape.Index(this.DbContext);
         var index = 1;
         var size  = 10;
         var list  = this.DbContext.QuartzTriggers.PageToList(index, size, out int total);
         List <TaskScheduleModel> models = list.Select(item => new TaskScheduleModel(item)).ToList();
         var page = new SchedualGridSearch <TaskScheduleModel, SchedulePostModel>(models, index, size, total);
         return(this.SearchGrid(page));
     }
 }
Example #3
0
        public IActionResult GridStateChange(int index, int size)
        {
            using (this.DbContext)
            {
                QuartzTriggersDataShape.Index(this.DbContext);
                var list = this.DbContext.QuartzTriggers.PageToList(index, size, out int total);

                List <TaskScheduleModel> models = list.Select(item => new TaskScheduleModel(item)).ToList();
                var grid = new SchedualGridConfiguration <TaskScheduleModel>();
                var html = grid.Render(index, size, models, total);

                return(this.HtmlResult(TagHelper.ToHtml(html)));
            }
        }