public UserComposeViewModel(IViewContainer container, ViewModelRelationship parent, string sessionId)
        {
            Parent = parent;
            Container = container;
            SessionId = sessionId;

            Provider = new UserManageProvider();
            Provider.ProfileEvent = ProfileLoadedEvent;
            Provider.ProfileEvent += (parent.ViewModel as UserManageViewModel).ProfileLoadedEvent;
        }
        public ApplyCourseViewModel(IViewContainer container, ViewModelRelationship parent,
            string sessionId)
        {
            Parent = parent;
            Container = container;
            SessionId = sessionId;

            Provider = new DispatchCourseProvider();
            Provider.AvailableCourseEvent += AvailableCourseLoadedEvent;
        }
        public MajorComposeViewModel(IViewContainer container, ViewModelRelationship parent,
            string sessionId)
        {
            Parent = parent;
            Container = container;
            SessionId = sessionId;

            majorProvider = new MajorProvider();
            majorProvider.MajorEvent = MajorLoadedEvent;
            majorProvider.MajorEvent += (parent.ViewModel as MajorViewModel).MajorLoadedEvent;
        }
        public CourseComposeViewModel(IViewContainer container, ViewModelRelationship parent,
            MajorViewModel majorViewModel,
            string sessionId)
        {
            Parent = parent;
            mMajorViewModel = majorViewModel;
            Container = container;
            SessionId = sessionId;

            Provider = new CourseProvider.Providers.Advance.CourseProvider();
            Provider.CourseEvent = CourseLoadedEvent;
            Provider.CourseEvent += (parent.ViewModel as CourseViewModel).CourseLoadedEvent;
        }
        public AttendanceComposeViewModel(IViewContainer container, ViewModelRelationship parent,
            string sessionId)
        {
            Parent = parent;
            Container = container;
            SessionId = sessionId;

            dispatchStudentProvider = new DispatchStudentProvider();
            dispatchStudentProvider.DispatchStudentEvent += DispatchStudentLoadedEvent;

            courseAttendanceProvider = new CourseAttendanceProvider();
            courseAttendanceProvider.CourseAbsenceEvent += CourseAttendancetLoadedEvent;
        }
        public AbsenceComposeViewModel(IViewContainer container, ViewModelRelationship parent,
            string sessionId)
        {
            Parent = parent;
            Container = container;
            SessionId = sessionId;

            absenceProvider = new AbsenceProvider();
            absenceProvider.AbsenceEvent += (parent.ViewModel as AbsenceViewModel).AbsenceLoadedEvent;
            // Local event
            absenceProvider.AbsenceEvent += AbsenceLoadedEvent;

            dispatchProvider = new DispatchCourseProvider();
            dispatchProvider.DispatchCouseEvent = DispatchLoadedEvent;
        }
        public DispatchComposeViewModel(IViewContainer container, ViewModelRelationship parent,
            ClassroomViewModel classroomViewModel,
            CourseViewModel courseViewModel,
            string sessionId)
        {
            Parent = parent;
            refClassroomViewModel = classroomViewModel;
            refCourseViewModel = courseViewModel;
            Container = container;
            SessionId = sessionId;

            Provider = new DispatchManageProvider();
            Provider.DispatchManageEvent = DispatchManageLoadedEvent;
            Provider.DispatchManageEvent += (parent.ViewModel as DispatchManageViewModel).DispatchManageLoadedEvent;

            userMgrProvider = new UserManageProvider();
            userMgrProvider.ProfileEvent = ProfileELoadedEvent;
        }
 public void AddChildView(string key, ViewModelRelationship relation)
 {
     ChildViewList.Add(key, relation);
 }