public IList <ScheduleEntry> GetScheduleEntries(IManageSchedulesView inForm, IRepository <Schedule> scheduleRepository) { var name = inForm.NameOfSchedule; var schedule = scheduleRepository.FindBy(x => x.Name == name); return(schedule.ScheduleEntries); }
public void ShowAddAdToSchedule(IManageSchedulesView inForm) { var schedule = _scheduleController.GetScheduleByName(inForm, _scheduleRepository); IAddAdToScheduleView view = new AddAdToScheduleForm(this, schedule); _scheduleController.ShowAddAdToVideoWall(view); }
public void RemoveAdFromSchedule(IManageSchedulesView inForm, string nameOfAd, IRepository <Schedule> scheduleRepository) { var name = inForm.NameOfSchedule; var schedule = scheduleRepository.FindBy(x => x.Name == name); schedule.ScheduleEntries.RemoveAt(schedule.ScheduleEntries .IndexOf(schedule.ScheduleEntries.FirstOrDefault(x => x.Ad.Name == nameOfAd))); scheduleRepository.Update(schedule); }
public Schedule GetScheduleByName(IManageSchedulesView inForm, IRepository <Schedule> scheduleRepository) { var name = inForm.NameOfSchedule; return(scheduleRepository.FindBy(x => x.Name == name)); }
public void ManageSchedules(IManageSchedulesView view, IMainController controller, IRepository <Schedule> repository) { view.ShowModal(controller, repository.All().ToList()); }
public void RemoveAdFromSchedule(IManageSchedulesView inForm, string adName) { _scheduleController.RemoveAdFromSchedule(inForm, adName, _scheduleRepository); }
public Schedule GetSchedule(IManageSchedulesView inForm) { return(_scheduleController.GetScheduleByName(inForm, _scheduleRepository)); }