public TutorSubjectController(TutorsManager tutorsManager, SubjectsManager subjectsManager, IMapper mapper, TutorSubjectsManager tutorSubjectsManager) { _tutorsManager = tutorsManager; _subjectsManager = subjectsManager; _mapper = mapper; _tutorSubjectsManager = tutorSubjectsManager; }
private void Page_Loaded(object sender, RoutedEventArgs e) { TeachersManager teachersManagercs = new TeachersManager(); lstTeachers.ItemsSource = teachersManagercs.GetTeachers(); SubjectsManager subjectsManager = new SubjectsManager(); cbSubject.ItemsSource = subjectsManager.GetSubjects(); }
private void DeleteSubjec_Click(object sender, RoutedEventArgs e) { if (tbSubjectId.Text != "") { SubjectsManager subjectsManager = new SubjectsManager(); subjectsManager.Delete("Subjects", Convert.ToInt16(tbSubjectId.Text)); //обновить lstSubjects.ItemsSource = subjectsManager.GetSubjects(); } }
/// <summary> /// Matiere informations /// </summary> /// <param name="subject"></param> /// <param name="staffGuid"></param> public SubjectCard(Subject subject, Guid staffGuid) { SubjectGuid = subject.SubjectGuid; FullName = subject.Name + " (" + subject.Sigle + ")"; HourlyPay = subject.HourlyPay.ToString("0.##"); Coefficient = subject.Coefficient; Color = subject.Couleur; Module = subject.Module + " - " + subject.StudyLanguage; Description = "Coeff " + subject.Coefficient + " - TH " + subject.HourlyPay.ToString("0.##") + " dhs"; IsSpecialty = SubjectsManager.StaticIsSpecialty(staffGuid, subject.SubjectGuid); }
private void Page_Loaded(object sender, RoutedEventArgs e) { ExamManager examManager = new ExamManager(); lstExam.ItemsSource = examManager.GetExamModel(); SubjectsManager subjectsManager = new SubjectsManager(); cbSubject.ItemsSource = subjectsManager.GetSubjects(); StudentManager studentManager = new StudentManager(); cbStudents.ItemsSource = studentManager.GetStudents(); }
private void UpdateSubjec_Click(object sender, RoutedEventArgs e) { if (tbSubjectId.Text != "" && ValidationPages.CheckValue(tbSubject, txtError, "Введите название предмета")) { Subjects subjects = new Subjects(); subjects.Id = Convert.ToInt16(tbSubjectId.Text); subjects.SubjectName = tbSubject.Text; SubjectsManager subjectsManager = new SubjectsManager(); int newArticleID = subjectsManager.UpdateSubjects(subjects); Console.WriteLine(newArticleID); //обновить lstSubjects.ItemsSource = subjectsManager.GetSubjects(); } }
private void AddSubjec_Click(object sender, RoutedEventArgs e) { if (ValidationPages.CheckValue(tbSubject, txtError, "Введите название предмета")) { Subjects subjects = new Subjects(); subjects.SubjectName = tbSubject.Text; tbSubjectId.Text = ""; SubjectsManager subjectsManager = new SubjectsManager(); int newSubjectId = subjectsManager.InsertSubjects(subjects); Console.WriteLine(newSubjectId); //обновить lstSubjects.ItemsSource = subjectsManager.GetSubjects(); } }
public List <Subject> getSubjectsPerStudent(int studentID) { List <Subject> subjects = new List <Subject>(); try { SubjectsManager _subjectsManager = new SubjectsManager(); subjects = _subjectsManager._getSubjectsPerStudent(studentID: studentID); } catch (Exception ex) { throw new Exception(ex.Message); } return(subjects); }
private void Page_Loaded(object sender, RoutedEventArgs e) { StudentManager studentManager = new StudentManager(); lstStudent.ItemsSource = studentManager.GetStudents(); ClassManager classeManager = new ClassManager(); cbClass.ItemsSource = classeManager.GetClasse(); cbClassFilter.ItemsSource = classeManager.GetClasse(); //Учителя TeachersManager teachersManager = new TeachersManager(); cbTeachers.ItemsSource = teachersManager.GetTeachers(); //Предметы SubjectsManager subjectsManager = new SubjectsManager(); cbSubject.ItemsSource = subjectsManager.GetSubjects(); }
public bool addSubjectToStudent(int studentID, int subjectID) { bool done = true; try { SubjectsManager manager = new SubjectsManager(); done = manager._addSubjectToStudent(studentID: studentID, subjectID: subjectID); } catch (Exception ex) { throw new Exception(ex.Message); } return(done); }
public SubjectsController(SubjectsManager subjectsManager, IMapper mapper) { _subjectsManager = subjectsManager; _mapper = mapper; }
private void Grid_Loaded(object sender, RoutedEventArgs e) { SubjectsManager subjectsManager = new SubjectsManager(); lstSubjects.ItemsSource = subjectsManager.GetSubjects(); }