示例#1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            string studentID = txt_boxStudentID.Text;

            StudentDAO studentDAO = new StudentDAO();

            bool isDeleted = studentDAO.DeleteStudent(studentID);

            if (isDeleted)
            {
                MessageBox.Show("Deleted", "Succeed");
                loadDataGridView();
            }
            else
            {
                MessageBox.Show("Delete Failed", "Error");
            }
        }
 public ActionResult <int> DeleteStudent(int Id)
 {
     return(StudentDAO.DeleteStudent(Id));
 }
 public ActionResult <int> DeleteStudent(Student Student)
 {
     return(StudentDAO.DeleteStudent(Student));
 }