private void LoadFromModel(DiaryEventTemplate model) { EventTypeId = model.EventTypeId; Minutes = model.Minutes; Hours = model.Hours; Days = model.Days; if (model.DiaryEventType != null) { DiaryEventType = new DiaryEventTypeModel(model.DiaryEventType); } }
private void LoadFromModel(DiaryEvent model) { EventTypeId = model.EventTypeId; RoomId = model.RoomId; Subject = model.Subject; Description = model.Description; Location = model.Location; StartTime = model.StartTime; EndTime = model.EndTime; IsPublic = model.IsPublic; if (model.EventType != null) { EventType = new DiaryEventTypeModel(model.EventType); } if (model.Room != null) { Room = new RoomModel(model.Room); } }