//[PersistenceConversation(ConversationEndMode = EndMode.CommitAndContinue)]
        //public void ManuallyUpdateSchedule()
        //{
        //    TermAlteringListener.Manually();
        //}

        public void Reload(ref IAgent agent)
        {
            _timeBoxRepository.Detach(agent.Schedule);
            var reloadAgent = _timeBoxRepository.GetAgent(agent.LaborRule, agent.GetType()).TransferPropertiesFrom(agent);

            agent = reloadAgent;
        }
Exemple #2
0
        protected internal void InitializeAttendance(Guid agent)
        {
            var attendance = _attendanceRepository.Where(o => o.Agent.Id == agent && o.Start <= SwapingDate.Start).OrderByDescending(o => o.Start).FirstOrDefault();

            Agent        = _timeBoxRepository.GetAgent(attendance, typeof(Agent));
            ScheduleDate = new DateRange(Agent.LaborRule.Start, Agent.LaborRule.End);
        }