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
                }));
            }
        }
예제 #3
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="pEntity"></param>
 public void Delete(ProductCategoryEntity pEntity)
 {
     _currentDAO.Delete(pEntity);
 }
예제 #4
0
        public JsonResult Delete(int id)
        {
            bool isSuccess = productCategoryDAO.Delete(id);

            return(Json(new { status = isSuccess ? 200 : 500 }, JsonRequestBehavior.AllowGet));
        }