Esempio n. 1
0
        public ActionResult DeleteGroup(/*[Bind(Include = "GroupId,Name")]*/ GroupVM group)
        {
            GroupDTO groupDTO = new GroupDTO
            {
                Name = group.Name
            };

            studentsService.DeleteGroup(group.GroupId);

            return(RedirectToAction("GroupsList"));
        }
Esempio n. 2
0
 private void DeleteButton_Click(object sender, EventArgs e)
 {
     if (TableTabPage.SelectedIndex == 0 && StudentsListBox.SelectedIndex != -1)
     {
         _studentsService.DeleteStudent(StudentsListBox.SelectedIndex);
     }
     else if (GroupsListBox.SelectedIndex != -1)
     {
         _studentsService.DeleteGroup(GroupsListBox.SelectedIndex);
     }
     ResetButton_Click(null, null);
 }