private void teacherInfoSubmitBtn_Click(object sender, RoutedEventArgs e)
        {
            SmsData.TeacherInfo newTeacher = new SmsData.TeacherInfo();

            newTeacher.id = GenerateId();
            newTeacher.name = teacherNameTxtbox.Text;
            newTeacher.joinDate = teacherJoinDatePicker.SelectedDate.Value;
            newTeacher.tdob = teacherDobDatepicker.SelectedDate.Value;
            newTeacher.address = teacherAddressTxtbox.Text;
            newTeacher.phone = teacherPhoneNumberTxtbox.Text;
            newTeacher.email = teacherEmailTxtbox.Text;
            newTeacher.jobId = teacherjobIdTxtbox.Text;
            newTeacher.faculty = teacherFacultyTxtbox.Text;
            newTeacher.salary = teacherSalaryTxtbox.Text;

            SmsDb.DbInteraction.RegisterNewTeacher(newTeacher);
        }
Exemple #2
0
        private void teacherInfoSubmitBtn_Click(object sender, RoutedEventArgs e)
        {
            SmsData.TeacherInfo newTeacher = new SmsData.TeacherInfo();

            newTeacher.id       = GenerateId();
            newTeacher.name     = teacherNameTxtbox.Text;
            newTeacher.joinDate = teacherJoinDatePicker.SelectedDate.Value;
            newTeacher.tdob     = teacherDobDatepicker.SelectedDate.Value;
            newTeacher.address  = teacherAddressTxtbox.Text;
            newTeacher.phone    = teacherPhoneNumberTxtbox.Text;
            newTeacher.email    = teacherEmailTxtbox.Text;
            newTeacher.jobId    = teacherjobIdTxtbox.Text;
            newTeacher.faculty  = teacherFacultyTxtbox.Text;
            newTeacher.salary   = teacherSalaryTxtbox.Text;



            SmsDb.DbInteraction.RegisterNewTeacher(newTeacher);
        }