Exemplo n.º 1
0
        public void CreateSchedule(ScheduledProgrammeJson schedule, String programme)
        {
            ScheduledProgramme newSchedule = new ScheduledProgramme(this.programmeService.ReadProgramme(programme), schedule.Day.ToDay(), schedule.BeginTime);

            this.dbContext.Add(newSchedule);
            this.dbContext.SaveChanges();
        }
Exemplo n.º 2
0
        public void SwitchProgramme(string scheduleID, string programmeID)
        {
            ScheduledProgramme scheduleToEdit = this.GetScheduledProgramme(scheduleID);
            Programme          newProgramme   = this.programmeService.ReadProgramme(programmeID);

            scheduleToEdit.Programme = newProgramme;
            this.dbContext.SaveChanges();
        }
Exemplo n.º 3
0
        public void UpdateSchedule(string scheduleID, ScheduledProgrammeJson programme)
        {
            ScheduledProgramme scheduleToEdit = this.GetScheduledProgramme(scheduleID);

            scheduleToEdit.Day               = programme.Day.ToDay();
            scheduleToEdit.BeginTime.Hours   = programme.BeginTime.Hours;
            scheduleToEdit.BeginTime.Minutes = programme.BeginTime.Minutes;
            this.dbContext.SaveChanges();
        }