private void LoadFromModel(RoomClosure model) { RoomId = model.RoomId; ReasonId = model.ReasonId; StartDate = model.StartDate; EndDate = model.EndDate; Notes = model.Notes; if (model.Room != null) { Room = new RoomModel(model.Room); } if (model.Reason != null) { Reason = new RoomClosureReasonModel(model.Reason); } }
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); } }