private readonly List <ViewChangeClassTime> _viewChangeClassTimeDates;           //存储当前班级上课时间发生变化的数据


        /// <summary>
        /// 描述:实例化转班课次产生者
        /// <para>作    者:瞿琦</para>
        /// <para>创建时间:2018-11-7</para>
        /// </summary>
        /// <param name="entity">转班信息</param>
        /// <param name="enrollOrderItemId">报名订单课程明细Id</param>
        /// <param name="unitOfWork">工作单元事务</param>
        public ChangeClassLessonCreator(TblTimChangeClass entity, long enrollOrderItemId, UnitOfWork unitOfWork) : base(entity, unitOfWork)
        {
            _enrollOrderItemId = enrollOrderItemId;
            _viewClassTeacherDateRepository = unitOfWork.GetCustomRepository <ViewClassTeacherDateRepository, ViewClassTeacherDate>();
            _viewChangeClassTimeRepository  = unitOfWork.GetCustomRepository <ViewChangeClassTimeRepository, ViewChangeClassTime>();
            _viewClassTeacherDates          = _viewClassTeacherDateRepository.Get(entity.InClassId);
            _viewChangeClassTimeDates       = _viewChangeClassTimeRepository.Get(entity.InClassId);
        }
예제 #2
0
        /// <summary>
        /// 根据排课Id构建一个课次生产对象
        /// <para>作    者:zhiwei.Tang</para>
        /// <para>创建时间:2019-02-19</para>
        /// </summary>
        /// <param name="makeLessonId">排课Id</param>
        /// <param name="unitOfWork">工作单元</param>
        public MakeLessonCreator(long makeLessonId, UnitOfWork unitOfWork) : base(makeLessonId)
        {
            this._unitOfWork                = unitOfWork;
            _makeLessonRepository           = unitOfWork.GetCustomRepository <TblTimMakeLessonRepository, TblTimMakeLesson>();
            _enrollOrderRepository          = unitOfWork.GetCustomRepository <TblOdrEnrollOrderRepository, TblOdrEnrollOrder>();
            _enrollOrderItemRepository      = unitOfWork.GetCustomRepository <TblOdrEnrollOrderItemRepository, TblOdrEnrollOrderItem>();
            _viewClassTeacherDateRepository = unitOfWork.GetCustomRepository <ViewClassTeacherDateRepository, ViewClassTeacherDate>();
            _viewChangeClassTimeRepository  = unitOfWork.GetCustomRepository <ViewChangeClassTimeRepository, ViewChangeClassTime>();

            _makeLesson               = _makeLessonRepository.Load(makeLessonId);
            _classService             = new DefaultClassService(_makeLesson.ClassId);
            _viewClassTeacherDates    = _viewClassTeacherDateRepository.Get(_makeLesson.ClassId);
            _viewChangeClassTimeDates = _viewChangeClassTimeRepository.Get(_makeLesson.ClassId);
        }