示例#1
0
 public ActionResult Edit(int id, Course collection)                //Edit method to update in the student table.
 {
     try
     {
         Cobj.UpdateByID(collection);
         Cobj.save();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
 public ActionResult Edit(int id, Enrollment collection)
 {
     try
     {
         Eobj.UpdateByID(collection);
         Eobj.save();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
 public ActionResult Edit(int id, Student collection)             //Edit method to update in the student table.
 {
     try
     {
         // TODO: Add update logic here
         Sobj.UpdateByID(collection);
         Sobj.save();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }