public void SetData() { _bindingList.Clear(); var allSchedule = _setting.GetAllSchedule(); foreach (var schedule in allSchedule) { if (schedule.ScheduleQuartz.Length == 0) { schedule.ScheduleQuartz = "0 0 * * * ?"; } _bindingList.Add(schedule); } _scheduleGridControl.DataSource = _bindingList; }
private void _toolBtnDelLink_Click(object sender, EventArgs e) { if (_currentAction == null) { return; } var allSchedule = _scheduleSettings.GetAllSchedule(); foreach (var schedule in allSchedule) { schedule.Actions.Remove(_currentAction); _scheduleSettings.UpdateSchedule(schedule); } _settings.DeleteTrigger(_currentAction); SetData(); }