コード例 #1
0
        public ActionResult GetAttributeValueInfos(int attrid)
        {
            SKU sku = RemotingHelp.GetModelObject <SKU>();

            return(Json(
                       sku.GetAttributeValueInfos(attrid),
                       JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        /// <summary>
        /// 添加编辑属性值
        /// </summary>
        /// <returns></returns>
        public ActionResult SkuAddValue(int attrid, string attributename, int valueid = 0, string value = "", string price = "-1", string stock = "-1")
        {
            SKU sku = RemotingHelp.GetModelObject <SKU>();

            ViewBag.attrid        = attrid;
            ViewBag.attributename = attributename;
            ViewBag.value         = value;
            ViewBag.price         = price;
            ViewBag.stock         = stock;
            ViewBag.valueid       = valueid;
            ViewBag.values        = sku.GetAttributeValueInfos(attrid);
            return(View());
        }