Exemple #1
0
 public ActionResult Delete(int id, FormCollection collection)
 {
     try
     {
         var costService = new CostService();
         var cost        = costService.GetCostById(id);
         costService.DeleteCost(cost);
         return(RedirectToAction("Index"));
     }
     catch (Exception exception)
     {
         return(View());
     }
 }