Changeset 5633 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Convert.cs
- Timestamp:
- 03/08/11 12:39:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Convert.cs
r5526 r5633 64 64 target.StateLogs.Add(Convert.ToEntity(sl)); 65 65 } 66 66 67 67 //target.StateLogs.AddRange(source.StateLog.Select(x => Convert.ToEntity(x)).OrderBy(x => x.DateTime)); 68 68 target.IsParentJob = source.IsParentJob; … … 103 103 if ((source != null) && (target != null)) { 104 104 target.StateLogId = source.Id; target.DateTime = source.DateTime; target.Exception = source.Exception; target.JobId = source.JobId; target.SlaveId = source.SlaveId; target.State = source.State; target.UserId = source.UserId; 105 } 106 } 107 #endregion 108 109 #region Appointment 110 public static DT.Appointment ToDto(UptimeCalendar source) { 111 if (source == null) return null; 112 return new DT.Appointment { Id = source.UptimeCalendarId, AllDayEvent = source.AllDayEvent, EndDate = source.EndDate, Recurring = source.Recurring, RecurringId = source.RecurringId, ResourceId = source.ResourceId, StartDate = source.StartDate }; 113 } 114 public static UptimeCalendar ToEntity(DT.Appointment source) { 115 if (source == null) return null; 116 var entity = new UptimeCalendar(); ToEntity(source, entity); 117 return entity; 118 } 119 public static void ToEntity(DT.Appointment source, UptimeCalendar target) { 120 if ((source != null) && (target != null)) { 121 target.UptimeCalendarId = source.Id; target.AllDayEvent = source.AllDayEvent; target.EndDate = source.EndDate; target.Recurring = source.Recurring; target.RecurringId = source.RecurringId; target.ResourceId = source.ResourceId; target.StartDate = source.StartDate; 105 122 } 106 123 }
Note: See TracChangeset
for help on using the changeset viewer.