コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }