Пример #1
0
 public ActionResult Delete(int id, FormCollection collection)
 {
     try
     {
         Court ToDelete = new Court();
         ToDelete = SqlCourt.GetCourt(id);
         SqlCourt.DeleteCourt(ToDelete);
         // TODO: Add delete logic here
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Пример #2
0
        // GET: Court/Delete/5
        public ActionResult Delete(int id)
        {
            Court court = SqlCourt.GetCourt(id);

            return(View(court));
        }