Beispiel #1
0
 public ActionResult RectangleDelete(int?id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     try
     {
         _figuresService.DeleteRectangle(id.Value);
         return(RedirectToAction("Rectangles"));
     }
     catch (DataNotFoundException ex)
     {
         return(RedirectToAction("DataNotFound", "Error", new { message = ex.Message }));
     }
     catch (Exception ex)
     {
         return(HttpNotFound(ex.Message));
     }
 }