private void SetPrepod_Click(object sender, RoutedEventArgs e) { StudentStatisticsEDMContainer studentStatisticsEDMContainer = new StudentStatisticsEDMContainer(); var descipline = new DisciplineSet { Name = name.Text, Kafedra = kafedra.Text }; studentStatisticsEDMContainer.DisciplineSetSet.Add(descipline); studentStatisticsEDMContainer.SaveChanges(); }
private void CtnSet_Click(object sender, RoutedEventArgs e) { StudentStatisticsEDMContainer studentStatisticsEDMContainer = new StudentStatisticsEDMContainer(); var student = new Student { Name = Name.Text, Address = Address.Text, Phone = Phone.Text, Groupe = Groupe.SelectedItem.ToString(), Sername = Serame.Text }; studentStatisticsEDMContainer.StudentSet.Add(student); studentStatisticsEDMContainer.SaveChanges(); }
private void SetPrepod_Click(object sender, RoutedEventArgs e) { StudentStatisticsEDMContainer studentStatisticsEDMContainer = new StudentStatisticsEDMContainer(); var prepod = new Teacher { Address = adress.Text, Discipline = discipline.SelectedItem.ToString(), Name = name.Text, Phone = phone.Text, Sername = sename.Text }; studentStatisticsEDMContainer.TeacherSet.Add(prepod); studentStatisticsEDMContainer.SaveChanges(); }
private void Set_Click(object sender, RoutedEventArgs e) { StudentStatisticsEDMContainer studentStatisticsEDMContainer = new StudentStatisticsEDMContainer(); var studstat = new StudentStatistic { Data = date.Text, NameStudent = NameStudent.SelectedItem.ToString(), NameTeacher = NameTeacher.SelectedItem.ToString(), Point = Points.SelectedItem.ToString(), Type = Type.SelectedItem.ToString(), Comment = Comment.Text }; studentStatisticsEDMContainer.StudentStatisticSet.Add(studstat); studentStatisticsEDMContainer.SaveChanges(); }
public StudInfo() { InitializeComponent(); StudentStatisticsEDMContainer studentStatisticsEDMContainer = new StudentStatisticsEDMContainer(); List <Type> types; types = studentStatisticsEDMContainer.TypeSet.ToList(); Type.ItemsSource = types.Select(x => new { x.NameType }); List <Student> students; students = studentStatisticsEDMContainer.StudentSet.ToList(); NameStudent.ItemsSource = students.Select(x => new { x.Name }); List <Teacher> teachers; teachers = studentStatisticsEDMContainer.TeacherSet.ToList(); NameTeacher.ItemsSource = teachers.Select(x => new { x.Name }); List <Point> points; points = studentStatisticsEDMContainer.PointSet.ToList(); Points.ItemsSource = points.Select(x => new { x.Num }); }