public ActionResult DeleteGroup(/*[Bind(Include = "GroupId,Name")]*/ GroupVM group) { GroupDTO groupDTO = new GroupDTO { Name = group.Name }; studentsService.DeleteGroup(group.GroupId); return(RedirectToAction("GroupsList")); }
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); }