public TeacherStudentNote(Model.studenci student, Model.przedmioty subject, Model.prowadzacy teacher, SubjectPage subjectPage) { _subjectPage = subjectPage; _student = student; _teacher = teacher; _subject = subject; InitializeComponent(); }
public List <ThemeModel> GetAllThemes(string levelTag, int subjectId) { var subject = GetSubject(levelTag, subjectId); var subjectPage = new SubjectPage(Driver, subject.Url); var themeList = subjectPage.GetAllThemes().Select(o => new ThemeModel { ThemeId = o.ThemeId, Name = o.Name, Url = o.Url }).ToList(); return(themeList); }
public SubjectModel GetSubject(string levelTag, int subjectId) { var subjectList = GetAllSubjects(levelTag); var subject = subjectList.FirstOrDefault(o => o.SubjectId == subjectId); var subjectPage = new SubjectPage(Driver, subject.Url); subject.Themes = subjectPage.GetAllThemes().Select(o => new ThemeModel { ThemeId = o.ThemeId, Name = o.Name, Url = o.Url }).ToList(); subject.Categories = subjectPage.GetAllCategories().Select(o => new CategoryModel { Id = o.Id, Name = o.Name }).ToList(); return(subject); }
public SubjectViewModel(SubjectPage page) : base(page) { Title = "Przedmiot " + Subject.Name; }