public ActionResult Delete(int id)
 {
     try
     {
         StudentHandler iHandler = new StudentHandler();
         if (iHandler.DeleteStudent(id))
         {
             ViewBag.AlertMsg = "Item Deleted successfully";
         }
         return(RedirectToAction("Index"));
     }
     catch (Exception)
     {
         return(View());
     }
 }
예제 #2
0
 public void DeleteStudent(int sid)
 {
     studentHandler = new StudentHandler();
     studentHandler.DeleteStudent(sid);
 }