Beispiel #1
0
        private EmployeeScheduleStartDate new_instance(string title)
        {
            var day = new domain.Day(title, time.Dates.today(), new domain.DiaryEntry[0]);

            var new_entity = new EmployeeScheduleStartDate(day);

            return(new_entity);
        }
Beispiel #2
0
 public static IEnumerable <DataAttribute> create_memento
     (domain.Day day)
 {
     return(new DataAttribute[] {
         DataAttribute.create_value("summary", day.summary),
         DataAttribute.create_collection("date", time.serialisation.Date.create_attribute_memento(day.date)),
         DataAttribute.create_collection("diary", day.diary.Select((de, i) => DataAttribute.create_collection(i.ToString(), DiaryEntry.create_memento(de))))
     });
 }
Beispiel #3
0
 public EmployeeScheduleStartDate load()
 {
     //deserialise
     return
         (serialise
          .Day
          .create_day(repository.Entities.ToList().Select(i => i.ToDataAttribute()))
          .match(
              s => {
         return new EmployeeScheduleStartDate(s);
     },
              e => {
         var day = new domain.Day("A new day", time.Dates.today(), new domain.DiaryEntry[0]);
         return new EmployeeScheduleStartDate(day);
     }));
 }
Beispiel #4
0
 public EmployeeScheduleStartDate(domain.Day the_start_date)
 {
     this.start_date = the_start_date;
 }