public StudentsListPageViewModel(ILibrusManager manager, string clazz, string subject)
 {
     this.manager = manager;
     this.Subject = this.manager.GetSubjectById(subject);
     this.Class = this.manager.GetClassById(clazz);
     this.Students = manager.GetStudentsByClass(this.Class.Id);
 }
 public StudentsListPageViewModel(ILibrusManager manager, string clazz, string subject)
 {
     this.manager  = manager;
     this.Subject  = this.manager.GetSubjectById(subject);
     this.Class    = this.manager.GetClassById(clazz);
     this.Students = manager.GetStudentsByClass(this.Class.Id);
 }
 public InformationAboutPresencesViewModel(ILibrusManager manager, int studentId, string subjectId)
 {
     this.manager   = manager;
     this.Subject   = this.manager.GetSubjectById(subjectId);
     this.Student   = this.manager.GetStudentById(studentId);
     this.Presences = this.manager.GetPresencesByStudentAndSubject(this.Student.StudentId, this.Subject.Id);
 }
Пример #4
0
        public static ILibrusManager CreateLibrusManager()
        {
            if(librusManager == null)
            {
                librusManager = GetManager();
            }

            return librusManager;
        }
Пример #5
0
        public static ILibrusManager CreateLibrusManager()
        {
            if (librusManager == null)
            {
                librusManager = GetManager();
            }

            return(librusManager);
        }
Пример #6
0
 public SelectionPageViewModel(ILibrusManager manager)
 {
     this.manager = manager;
     this.Classes = this.manager.GetAllClasses();
     this.SelectClass(this.Classes[0]);
     this.Subjects = new ObservableCollection <SubjectModel>();
     this.RefreshSubjects();
     this.ChangeClassSelection   = new ChangeClassSelectionCommand(this);
     this.ChangeSubjectSelection = new ChangeSubjectSelectionCommand(this);
 }
Пример #7
0
 public SelectionPageViewModel(ILibrusManager manager)
 {
     this.manager = manager;
     this.Classes = this.manager.GetAllClasses();
     this.SelectClass(this.Classes[0]);
     this.Subjects = new ObservableCollection<SubjectModel>();
     this.RefreshSubjects();
     this.ChangeClassSelection = new ChangeClassSelectionCommand(this);
     this.ChangeSubjectSelection = new ChangeSubjectSelectionCommand(this);
 }
Пример #8
0
 public PresencePageViewModel(ILibrusManager librusManager, string date, string clazz, string subject)
 {
     this.manager = librusManager;
     this.Date = DateTime.Parse(date);
     this.Class = this.manager.GetClassById(clazz);
     this.Subject = this.manager.GetSubjectById(subject);
     var students = this.manager.GetStudentsByClass(this.Class.Id);
     var timetable = this.manager.GetTimeTable(this.Class, this.Subject);
     this.Presences = this.manager.GetPresencesByStudentsSubjectDate(students, this.Subject, this.Date);
     this.ChangePresenceSelection = new ChangePresenceSelectionCommand(this);
 }
Пример #9
0
        public PresencePageViewModel(ILibrusManager librusManager, string date, string clazz, string subject)
        {
            this.manager = librusManager;
            this.Date    = DateTime.Parse(date);
            this.Class   = this.manager.GetClassById(clazz);
            this.Subject = this.manager.GetSubjectById(subject);
            var students  = this.manager.GetStudentsByClass(this.Class.Id);
            var timetable = this.manager.GetTimeTable(this.Class, this.Subject);

            this.Presences = this.manager.GetPresencesByStudentsSubjectDate(students, this.Subject, this.Date);
            this.ChangePresenceSelection = new ChangePresenceSelectionCommand(this);
        }
Пример #10
0
 public SelectionPage()
 {
     InitializeComponent();
     this.manager = LibrusFactory.CreateLibrusManager();
     this.DataContext = new SelectionPageViewModel(LibrusFactory.CreateLibrusManager());
 }
Пример #11
0
 public SelectionPage()
 {
     InitializeComponent();
     this.manager     = LibrusFactory.CreateLibrusManager();
     this.DataContext = new SelectionPageViewModel(LibrusFactory.CreateLibrusManager());
 }
Пример #12
0
 public AddNewSubjectPage()
 {
     InitializeComponent();
     manager = LibrusFactory.CreateLibrusManager();
 }