// GET: /Student/DeleteConfirm/{id} public ActionResult DeleteConfirm(int id) { StudentDataController controller = new StudentDataController(); Student NewStudent = controller.FindStudent(id); return(View(NewStudent)); }
/// <summary> /// Route to the view page based on the student id that is selected. /// </summary> /// <param name="id">Id of the Student</param> /// <returns>The information on the student base on the id.</returns> /// <example>GET: /Student/Update/1</example> public ActionResult Update(int id) { StudentDataController controller = new StudentDataController(); Student SelectedStudent = controller.FindStudent(id); return(View(SelectedStudent)); }
// GET: Student/Show{id} public ActionResult Show(int id) { // Call to StudentDataController method FindStudent(id), and pass information to the View(Show). StudentDataController controller = new StudentDataController(); Student NewStudent = controller.FindStudent(id); return(View(NewStudent)); }