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); }
public static ILibrusManager CreateLibrusManager() { if(librusManager == null) { librusManager = GetManager(); } return librusManager; }
public static ILibrusManager CreateLibrusManager() { if (librusManager == null) { librusManager = GetManager(); } return(librusManager); }
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); }
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); }
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); }
public SelectionPage() { InitializeComponent(); this.manager = LibrusFactory.CreateLibrusManager(); this.DataContext = new SelectionPageViewModel(LibrusFactory.CreateLibrusManager()); }
public AddNewSubjectPage() { InitializeComponent(); manager = LibrusFactory.CreateLibrusManager(); }