コード例 #1
0
ファイル: frmAdmin.cs プロジェクト: 1760005/Quan_Ly_Thi
 private void btnAdd_teacher_Click(object sender, EventArgs e)
 {
     if (ValidateChildren(ValidationConstraints.Enabled))
     {
         Giao_Vienn Teacher = new Giao_Vienn()
         {
             Ho_Ten    = txtFull_name_teacher.Text,
             Tai_Khoan = txtUserName_teacher.Text,
             Mat_Khau  = txtUserName_teacher.Text,
             CMND_TCC  = txtCMND_TCC_teacher.Text,
             Khoi      = listGrades[Grade_CBB.SelectedIndex].GradeID,
             Lop       = null,
             Email     = txtMail_teacher.Text,
             SDT       = txtSDT_teacher.Text,
             Ngay_Sinh = DateTime.Parse(dtTeacher_Picker.Value.ToString())
         };
         BUS_Admin.InsertTeacher(Teacher);
         MessageBox.Show("Add Teacher Success!");
     }
     MessageBox.Show("Add Teacher Failed!");
     return;
 }