public ActionResult UpdateProductInfo(Product info)
        {
            var productInfo = _productService.LoadEntities(m => m.ID == info.ID).FirstOrDefault();
            if (productInfo == null)
            {
                return Content("错误信息,请您检查");
            }

            productInfo.PCid = info.PCid;
            productInfo.PContent = info.PContent;
            productInfo.PImg = info.PImg;
            productInfo.PName = info.PName;
            productInfo.IsRecommend = info.IsRecommend;

            _productService.UpdateEntity(productInfo);
            return Content("ok");
        }
        public ActionResult DeleteProduct(Product info)
        {
            var productInfo = _productService.LoadEntities(m => m.ID == info.ID).FirstOrDefault();
            if (productInfo == null)
            {
                return Content("错误信息,请您检查");
            }
            _productService.DeleteProduct(productInfo);
            return Content("ok");

        }
 public ActionResult AddProduct(Product info)
 {
     if (info == null)
     {
         return Content("错误信息,请您检查");
     }
     info.AddTime = DateTime.Now;
     _productService.AddEntity(info);
     return Content("ok");
 }