Exemplo n.º 1
0
 private void OnClick_Show(object sender, RoutedEventArgs e)
 {
     try
     {
         string  facultyNumber = txtSearchByNumber.Text;
         Student student       = StudentData.GetStudentByFaculty(facultyNumber);
         txtName.Text          = student.Name;
         txtSurname.Text       = student.Surname;
         txtLastName.Text      = student.LastName;
         txtFaculty.Text       = student.Faculty;
         txtSpecialty.Text     = student.Specialty;
         txtDegree.Text        = student.Degree;
         txtFacultyNumber.Text = student.FacultyNumber;
         txtCourse.Text        = student.Course.ToString();
         txtFlow.Text          = student.Flow.ToString();
         txtGroup.Text         = student.Group.ToString();
         txtStatus.Text        = student.Status;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }