public ActionResult UpdateTransfer(int?productID, int?productCategoryID) { ProductDetail model = ProductDetailHelper.GetProductDetailsByID((int)productID, (int)productCategoryID); currentDetail = model; return(PartialView("Update", model)); }
public ActionResult Update(ProductDetail model) { if (ProductDetailHelper.DeleteProductDetail(currentDetail) && ProductDetailHelper.AddProductDetail(model)) { return(Content("success")); } return(Content("failure")); }
public ActionResult Delete(DeleteDetailViewModel model) { if (ProductDetailHelper.DeleteProductDetail(model.MainID, model.SubID)) { return(Content("success")); } return(Content("failure")); }
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))); }
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")); } }
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(); } }