Exemplo n.º 1
0
 private void ResetBt_Click(object sender, RoutedEventArgs e)
 {
     TeacherIDTB.Clear();
     TFirstNameTB.Clear();
     TLastNameTB.Clear();
     TeacherEmailTB.Clear();
 }
Exemplo n.º 2
0
 private void DeleteTeacherBt_Click(object sender, RoutedEventArgs e)
 {
     _crudManager.DeleteTeacher(int.Parse(TeacherIDTB.Text));
     TeacherIDTB.Clear();
     TFirstNameTB.Clear();
     TLastNameTB.Clear();
     TeacherEmailTB.Clear();
     PopulateTeacherListBox();
 }
Exemplo n.º 3
0
        private void AddTeacherBT_Click(object sender, RoutedEventArgs e)
        {
            if (TeacherListBox.SelectedItem == null)
            {
                var iD         = int.TryParse(TeacherIDTB.Text, out int tID);
                var tFirstName = TFirstNameTB.Text;
                var tLastName  = TLastNameTB.Text;
                var tEmail     = TeacherEmailTB.Text;

                _crudManager.AddTeacher(tID, tFirstName, tLastName, tEmail);
            }

            PopulateTeacherListBox();
            TeacherIDTB.Clear();
            TFirstNameTB.Clear();
            TLastNameTB.Clear();
            TeacherEmailTB.Clear();
        }