示例#1
0
        // GET: Product/Delete/5
        public JsonResult Delete(int id)
        {
            try
            {
                // TODO: Add delete logic here

                if (id > 0)
                {
                    crudFactory.DeleteProduct(id);
                    return(Json(id));
                }
                else
                {
                    return(Json(0));
                }
            }
            catch (Exception ex)
            {
                return(Json(ex.Message));
            }
        }
 // GET: Product/Delete/5
 public ActionResult Delete(int id)
 {
     crudFactory.DeleteProduct(id);
     return(View());
 }