コード例 #1
0
        public ActionResult UpdateTransfer(int?productID, int?productCategoryID)
        {
            ProductDetail model = ProductDetailHelper.GetProductDetailsByID((int)productID, (int)productCategoryID);

            currentDetail = model;
            return(PartialView("Update", model));
        }
コード例 #2
0
 public ActionResult Update(ProductDetail model)
 {
     if (ProductDetailHelper.DeleteProductDetail(currentDetail) && ProductDetailHelper.AddProductDetail(model))
     {
         return(Content("success"));
     }
     return(Content("failure"));
 }
コード例 #3
0
 public ActionResult Delete(DeleteDetailViewModel model)
 {
     if (ProductDetailHelper.DeleteProductDetail(model.MainID, model.SubID))
     {
         return(Content("success"));
     }
     return(Content("failure"));
 }
コード例 #4
0
        public ActionResult Index(string searchString, int page = 1, int pageSize = 10)
        {
            ViewBag.Active = "#ProductDetails";
            IEnumerable <ProductDetail> models;

            if (String.IsNullOrEmpty(searchString))
            {
                models = ProductDetailHelper.GetProductDetails();
            }
            else
            {
                models = ProductDetailHelper.GetProductDetails(searchString);
            }
            ViewBag.SearchString = searchString;
            return(View(models.OrderByDescending(x => x.ProductID).ToPagedList(page, pageSize)));
        }
コード例 #5
0
 public ActionResult Add(ProductDetail model)
 {
     if (ModelState.IsValid)
     {
         if (ProductDetailHelper.AddProductDetail(model))
         {
             return(Content("success"));
         }
         else
         {
             ModelState.AddModelError("", "Existing product detail!");
             return(PartialView("Add"));
         }
     }
     else
     {
         return(PartialView("Add"));
     }
 }
コード例 #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ((Site)this.Master).IsHomePage = false;
     if (!IsPostBack)
     {
         SubCategoryNavigation1.C1SysNo = C1SysNo;
         ProductDetailHelper helper = new ProductDetailHelper(ProductSysNo);
         ProductDetailImagesHTML        = helper.GetProductDetailImages();
         ProductNameInfoHTML            = helper.GetProductNameInfo();
         ProductBaiscInfoHTML           = helper.GetProductBaiscInfo();
         ProductLongDescriptionHTML     = helper.GetProductLongDescription();
         ProductPackageListHTML         = helper.GetProductPackageList();
         ProductAttrSummeryHTML         = helper.GetProductAttrSummery();
         ProductRelatedGuessYouLikeHTML = FrontProductsHelper.GetProductGuessYouLikeHTML(C1SysNo, C2SysNo, C3SysNo, ProductSysNo);
         ProductAlsoSeenHTML            = FrontProductsHelper.GetProductAlsoSeenHTML(C1SysNo, C2SysNo, C3SysNo, ProductSysNo);
         ProductAlsoBuyHTML             = FrontProductsHelper.GetProductAlsoBuyInCartCheck(C1SysNo, C2SysNo, C3SysNo, ProductSysNo);
         //添加最近浏览记录
         CustomerHelper.SetCustomerBrowserHistory(ProductSysNo);
         BrowserHistoryProductListHTML = CustomerHelper.GetProductDetailBrowserHistoryProductsHTML();
     }
 }