public ScheduleSlots ToSlot() { ScheduleSlots tmpSlot = new ScheduleSlots { Date = DateTimeFrom.Date, TimeFrom = DateTimeFrom.TimeOfDay, TimeTo = DateTimeTo.TimeOfDay, Type = SlotType.Break }; //tmpSlot.RecordStateCode = "N"; return(tmpSlot); }
public ScheduleSlots ToSlot() { ScheduleSlots tmpSlot = new ScheduleSlots(); tmpSlot.Date = BreakTimeFrom.Date; tmpSlot.TimeFrom = BreakTimeFrom.TimeOfDay; tmpSlot.TimeTo = BreakTimeTo.TimeOfDay; tmpSlot.Type = SlotType.Break; tmpSlot.RecordState = RecordState.N; if (ResourceId.HasValue) { tmpSlot.ResourceId = ResourceId.Value; } return(tmpSlot); }
private ScheduleSlots CreateSlot(DateTime timeFrom, DateTime timeTo, long scheduleId, long resourceId, RecordState recordStateCode, SlotType sType, long timeTableId, TimeSpan?breakBetweenSpan) { if (breakBetweenSpan.HasValue) { timeFrom = timeFrom + breakBetweenSpan.Value; timeTo = timeTo + breakBetweenSpan.Value; } var ret = new ScheduleSlots(); ret.TimeFrom = timeFrom.TimeOfDay; ret.TimeTo = timeTo.TimeOfDay; ret.ScheduleTimetableId = timeTableId; ret.Date = timeFrom.Date; ret.ResourceId = resourceId; ret.RecordState = recordStateCode; ret.Type = sType; return(ret); }
public ScheduleSlots ToSlot() { ScheduleSlots tmpSlot = new ScheduleSlots { Date = BreakTimeFrom.Date, TimeFrom = BreakTimeFrom.TimeOfDay, TimeTo = BreakTimeTo.TimeOfDay, Type = SlotType.Vacation, RecordState = RecordState.N }; //tmpSlot.RecordStateCode = "N"; if (ResourceId.HasValue) { tmpSlot.ResourceId = ResourceId.Value; } return(tmpSlot); }