Ejemplo n.º 1
0
        static void addTest()
        {
            foreach (var item in studentId)
            {
                bl.AddStudent(
                    new Student
                {
                    StudentId     = item,
                    StudentName   = "user " + item,
                    StudentCampus = item % 2 == 0 ? Campus.Lev : Campus.Tal,
                    StudentGender = item % 2 == 0 ? Gender.male : Gender.female
                });
            }

            foreach (var item in courseId)
            {
                bl.AddCourse(
                    new Course
                {
                    CourseId   = item,
                    CourseName = "course " + item,
                });
            }


            bl.AddCourseToStudent(studentId[0], courseId[0], 5774, Semester.a);
            bl.AddCourseToStudent(studentId[0], courseId[2], 5774, Semester.a);
            bl.AddCourseToStudent(studentId[1], courseId[2], 5774, Semester.b);
        }
Ejemplo n.º 2
0
 private void addButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         bl.AddStudent(student);
         student          = new BE.Student();
         this.DataContext = student;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }