private void btnAdd_student_Click(object sender, EventArgs e) { if (ValidateChildren(ValidationConstraints.Enabled)) { Hoc_Sinhh Student = new Hoc_Sinhh() { Ho_Ten = txtFull_name_student.Text, Tai_Khoan = txtUser_name_student.Text, Mat_Khau = txtUser_name_student.Text, CMND_TCC = txtCMND_TCC_student.Text, Lop = listClasses[Class_CBB.SelectedIndex].ClassID, Khoi = null, Email = txtMail_student.Text, SDT = txtSDT_student.Text, Ngay_Sinh = DateTime.Parse(dtStudent_Picker.Value.ToString()) }; BUS_Admin.InsertStudent(Student); MessageBox.Show("Add Student Success!"); } MessageBox.Show("Add Student Failed!"); return; }