Exemple #1
0
        public static CitizenContainer LoadCitizens()
        {
            var container = new CitizenContainer();

            var adrA = new Address("James Tobins Alle 24, 2. th,  9220 Aalborg Øst");

            adrA.StartDate = new DateTime(2016, 12, 1);
            var citizenA = new Citizen("1712920000", "Nicolai", "Gjøderum", adrA, new DateTime(2016, 12, 1));
            var taskA1   = new TaskDescription(15, "Bad", citizenA, new TimePeriod(TimeSpan.FromHours(14)), new DateTime(2016, 12, 1), "Personlig hygiejne");
            var taskA2   = new TaskDescription(20, "Indkøb", citizenA, new TimePeriod(TimeSpan.FromHours(7)), new DateTime(2016, 12, 1), "Andet");

            citizenA.AddTask(taskA1);
            citizenA.AddTask(taskA2);

            var adrB = new Address("Sigensvej 10, 9310 Vodskov");

            adrA.StartDate = new DateTime(2016, 12, 3);
            var citizenB = new Citizen("0202620000", "Leif", "Gjøderum", adrB, new DateTime(2016, 12, 3));
            var taskB1   = new TaskDescription(15, "Bad", citizenB, new TimePeriod(TimeSpan.FromHours(13)), new DateTime(2016, 12, 3), "Personlig hygiejne");
            var taskB2   = new TaskDescription(20, "Toilet", citizenB, new TimePeriod(TimeSpan.FromHours(8)), new DateTime(2016, 12, 3), "Personlig hygiejne");

            citizenB.AddTask(taskB1);
            citizenB.AddTask(taskB2);

            container.AddCitizen(citizenA);
            container.AddCitizen(citizenB);

            return(container);
        }
Exemple #2
0
        }                                               //Skal den være her?

        public TaskItem(TaskDescription taskDescription)
        {
            TaskDescription = taskDescription;
            State           = Status.Unplanned;
            Locked          = false;
            TimePeriod      = new TimePeriod(taskDescription.Duration);
        }
Exemple #3
0
 public TaskDescriptionstringChange(TaskDescription obj, string newValue, string desctription) : base(obj, newValue, desctription)
 {
 }
Exemple #4
0
 public TaskDurationChange(TaskDescription obj, TimeSpan newValue, string desctription) : base(obj, newValue, desctription)
 {
 }
Exemple #5
0
 public void RemoveTask(TaskDescription task)
 {
     Tasks.Remove(task);
 }
Exemple #6
0
 public void AddTask(TaskDescription task)
 {
     Tasks.Add(task);
 }