Exemplo n.º 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ExaminationEntities1 db = new ExaminationEntities1();
            Ins_Crs_Grid.ItemsSource = db.CoursesByInstructor(instructor_id);

            var insObj = db.selectFromInstructor(instructor_id).FirstOrDefault();
            this.instructorName.Text += $"{insObj.ins_FName} {insObj.ins_LName}";
        }
Exemplo n.º 2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            db = new ExaminationEntities1();
            combox_crs.ItemsSource = db.CoursesByInstructor(instructor_id);
            var    InsName  = db.selectFromInstructor(instructor_id).FirstOrDefault();
            string FullName = $"{InsName.ins_FName} {InsName.ins_LName}";

            this.insName.Text += FullName;
        }
Exemplo n.º 3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ex = new ExaminationEntities1();


            CoursesTopicsList.ItemsSource = ex.topicsPerCourse();

            if (_insIDl != 0)
            {
                Course_Topics.ItemsSource = ex.CoursesByInstructor(_insIDl).Select(p => new { p.crs_Id, crs_Name = p.crs_name });
                var    InsName  = ex.selectFromInstructor(_insIDl).FirstOrDefault();
                string instName = $"{InsName.ins_FName} {InsName.ins_LName}";
                this.fullName.Text += instName;
            }
            if (_studentId != 0)
            {
                Course_Topics.ItemsSource = ex.courseList(_studentId);
                var    stdName  = ex.selectStudents().Where(s => s.std_Id == _studentId).FirstOrDefault();
                string studName = $"{stdName.std_FName} {stdName.std_LName}";
                this.fullName.Text += studName;
            }
        }