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);
 }
Exemplo n.º 4
0
        public static ILibrusManager CreateLibrusManager()
        {
            if(librusManager == null)
            {
                librusManager = GetManager();
            }

            return librusManager;
        }
Exemplo n.º 5
0
        public static ILibrusManager CreateLibrusManager()
        {
            if (librusManager == null)
            {
                librusManager = GetManager();
            }

            return(librusManager);
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 10
0
 public SelectionPage()
 {
     InitializeComponent();
     this.manager = LibrusFactory.CreateLibrusManager();
     this.DataContext = new SelectionPageViewModel(LibrusFactory.CreateLibrusManager());
 }
Exemplo n.º 11
0
 public SelectionPage()
 {
     InitializeComponent();
     this.manager     = LibrusFactory.CreateLibrusManager();
     this.DataContext = new SelectionPageViewModel(LibrusFactory.CreateLibrusManager());
 }
Exemplo n.º 12
0
 public AddNewSubjectPage()
 {
     InitializeComponent();
     manager = LibrusFactory.CreateLibrusManager();
 }