Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            try
            {
                if (_billManager.Delete(id))
                {
                    return(RedirectToAction("Index"));
                }

                // Send Bill back to Delete View if delete failed
                Bill bill = _billManager.GetBill(id);
                if (bill == null)
                {
                    return(HttpNotFound());
                }


                return(View(bill));
            }
            catch (Exception e)
            {
                Logger.Instance.Error(e);
                return(RedirectToAction("Index"));
            }
        }
Ejemplo n.º 2
0
 public JsonResult Delete(Int64 id)
 {
     if (billManager.Delete(id))
     {
         return(Json(new { info = "Done!", status = true }, JsonRequestBehavior.AllowGet));
     }
     else
     {
         return(Json(new { info = "Done!!", status = false }, JsonRequestBehavior.AllowGet));
     }
 }