public void AddToolReservationToSchedule(int instanceId, IActivity activity, ITool toolType, int startingOffsetInMinutes, int finishingOffsetInMinutes) { var schedule = new ActivitySchedulingEvent <ITool>(instanceId, activity, toolType, startingOffsetInMinutes, finishingOffsetInMinutes); // add the scheduling event to the activity schedule AddSchedulingEvent(schedule); // and add the same scheduling event to the tool schedule var toolSchedule = GetOrAddToolSchedule(toolType); toolSchedule.AddResourceReservation(schedule); }
public void AddLaborReservationToSchedule(int instanceId, IActivity activity, ILabor laborType, int startingOffsetInMinutes, int finishingOffsetInMinutes) { var schedule = new ActivitySchedulingEvent <ILabor>(instanceId, activity, laborType, startingOffsetInMinutes, finishingOffsetInMinutes); // add the scheduling event to the activity schedule AddSchedulingEvent(schedule); // and add the same scheduling event to the labor schedule var laborSchedule = GetOrAddLaborSchedule(laborType); laborSchedule.AddResourceReservation(schedule); }