public ActionResult DeleteGroup(Group group) { ViewBag.Title = "Delete Group"; ViewBag.SubTitle = "Are you sure you want to delete this group?"; try { _groupActivityManager.DeleteGroupActivitiesByGroupID(group.GroupID); _personGroupManager.DeletePersonGroupsByGroupID(group.GroupID); _groupManager.DeleteGroup(group.GroupID); return(RedirectToAction("GroupsList", new { message = "Group deleted" })); } catch (Exception) { return(View(group)); } return(View(group)); }
public ActionResult DeleteConfirmed(int id) { groupManager.DeleteGroup(id); return(RedirectToAction("Index")); }
public Group DeleteGroup([FromBody] Group group) { return(_groupManager.DeleteGroup(group)); }
public Group DeleteStudents([FromBody] Group student) { return(_groupManager.DeleteGroup(student)); }