public JsonResult Delete(int ID) { try { var quo = _quotationService.GetById(ID); _quotationService.Delete(quo); return(Json(new { success = true, message = "Delete Successfully" }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { success = false, message = ex.ToString() }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here QuotationService.Delete(QuotationService.GetById(id)); QuotationService.Commit(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult DeleteConfirmed(Guid id) { quotationService.Delete(id); return(RedirectToAction("Index")); }