Ejemplo n.º 1
0
        public bool DeleteStudent(string name)
        {
            var student = _studentDao.GetForName(name);

            _studentDao.Delete(student);
            return(true);
        }
Ejemplo n.º 2
0
        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());
            }
        }
Ejemplo n.º 3
0
 public void Delete(int studentId)
 {
     _studentDao.Delete(studentId);
 }
Ejemplo n.º 4
0
 public void Delete(long id)
 {
     Dao.Delete(id);
 }