Ejemplo n.º 1
0
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            tbName.Text    = "";
            tbSurname.Text = "";
            cbGroup.Text   = "";
            int stId = (dgStudent.Items[dgStudent.SelectedIndex] as StudentsDTO).Id;

            foreach (var item in Students)
            {
                if (item.Id == stId)
                {
                    service.DeleteStudent(item);
                    break;
                }
            }
            Update(service);
        }
Ejemplo n.º 2
0
 public IActionResult RemoveStudent(int id)
 {
     return(Ok(_service.DeleteStudent(id)));
 }