public bool DeleteStudent(string name) { var student = _studentDao.GetForName(name); _studentDao.Delete(student); return(true); }
private void removeStudentButton_Click(object sender, System.EventArgs e) { if (listView.SelectedItems.Count <= 0 || listView.Items.Count <= 0) { MessageBox.Show(ErrorMessages.ChooseStudentForDeleting, ErrorMessages.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); } else { var studentId = int.Parse(listView.SelectedItems[0].Text); studentDao.Delete(studentId); ShowData(studentDao.GetAll()); } }
public void Delete(int studentId) { _studentDao.Delete(studentId); }
public void Delete(long id) { Dao.Delete(id); }