public ActionResult Delete(long id) { var dao = new ProductCategoryDAO(); bool result = dao.Delete(id); return(RedirectToAction("Index")); }
public JsonResult Delete(long id) { var dao = new ProductCategoryDAO(); var res = dao.IsForeignKey(id); if (res) { return(Json(new { Status = false })); } else { dao.Delete(id); return(Json(new { Status = true })); } }
/// <summary> /// 删除 /// </summary> /// <param name="pEntity"></param> public void Delete(ProductCategoryEntity pEntity) { _currentDAO.Delete(pEntity); }
public JsonResult Delete(int id) { bool isSuccess = productCategoryDAO.Delete(id); return(Json(new { status = isSuccess ? 200 : 500 }, JsonRequestBehavior.AllowGet)); }