Example #1
0
        public bool DeleteStudent(string name)
        {
            var student = _studentDao.GetForName(name);

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