예제 #1
0
        //
        // GET: /Cost/Edit/5
        public ActionResult Edit(int id)
        {
            var costService = new CostService();
            var cost        = costService.GetCostById(id);

            return(View(cost));
        }
예제 #2
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());
     }
 }