public ActionResult Details(int goodsId = 0) { GoodsBasicBll bll = new GoodsBasicBll(); int gcPid = 0; var goods = bll.GetModelByGBid(goodsId, out gcPid); AttributesBll objAttributesBll = new AttributesBll(); ViewBag.AttrValue = objAttributesBll.GetListByGBid(goodsId, goods.EnterpriseID); return View(goods); }
public ActionResult Operate(int id = 0) { ViewBag.gbId = id; //价格区间 ViewBag.isPrice = LoginUser.UserBasic.Enterprise.ISPrice; ViewBag.priceLower = LoginUser.UserBasic.Enterprise.PriceLower; ViewBag.priceUpper = LoginUser.UserBasic.Enterprise.PriceUpper; GoodsBasicBll bll = new GoodsBasicBll(); GoodsGroupBll ggBll = new GoodsGroupBll(); GoodsBasic list = new GoodsBasic(); ViewBag.gAttr = new List <Hashtable>(); ViewBag.pClass = 0; int gclassP; if (id != 0) { list = bll.GetModelByGBid(id, out gclassP, LoginUser.UserBasic.EnterpriseID); ViewBag.pClass = gclassP; if (list != null) { //商品属性 AttributesBll gavBll = new AttributesBll(); ViewBag.gAttr = gavBll.GetListByGBid(id); ////商品销售卖点 //SellPointBll spBll = new SellPointBll(); //list.SellPointList = spBll.GetListByGBid(id); //商品可视分组 list.GoodsGroupList = ggBll.GetListByGBid(id); } else { Response.Redirect("/Login/Index"); return(Content("此商品不存在")); } } //有货状态 SelectLists sList = new SelectLists(); ViewBag.ISNormal = new SelectList(sList.GetGBISNormal(), "value", "text", list.ISNormal); //价格模式 ViewBag.RType = new SelectList(sList.GetGBRType(), "value", "text", list.RType); //可视分组 ViewBag.gGroupList = ggBll.GetGGList(LoginUser.UserBasic.EnterpriseID); //所属品牌 BrandBll bBll = new BrandBll(); ViewBag.BrandID = new SelectList(bBll.GetEBList(LoginUser.UserBasic.EnterpriseID), "ID", "BName", list.BrandID); return(View(list)); }
public ActionResult Operate(int id = 0) { ViewBag.gbId = id; //价格区间 ViewBag.isPrice = LoginUser.UserBasic.Enterprise.ISPrice; ViewBag.priceLower = LoginUser.UserBasic.Enterprise.PriceLower; ViewBag.priceUpper = LoginUser.UserBasic.Enterprise.PriceUpper; GoodsBasicBll bll = new GoodsBasicBll(); GoodsGroupBll ggBll = new GoodsGroupBll(); GoodsBasic list = new GoodsBasic(); ViewBag.gAttr = new List<Hashtable>(); ViewBag.pClass = 0; int gclassP; if (id != 0) { list = bll.GetModelByGBid(id, out gclassP, LoginUser.UserBasic.EnterpriseID); ViewBag.pClass = gclassP; if (list != null) { //商品属性 AttributesBll gavBll = new AttributesBll(); ViewBag.gAttr = gavBll.GetListByGBid(id); ////商品销售卖点 //SellPointBll spBll = new SellPointBll(); //list.SellPointList = spBll.GetListByGBid(id); //商品可视分组 list.GoodsGroupList = ggBll.GetListByGBid(id); } else { Response.Redirect("/Login/Index"); return Content("此商品不存在"); } } //有货状态 SelectLists sList = new SelectLists(); ViewBag.ISNormal = new SelectList(sList.GetGBISNormal(), "value", "text", list.ISNormal); //价格模式 ViewBag.RType = new SelectList(sList.GetGBRType(), "value", "text", list.RType); //可视分组 ViewBag.gGroupList = ggBll.GetGGList(LoginUser.UserBasic.EnterpriseID); //所属品牌 BrandBll bBll = new BrandBll(); ViewBag.BrandID = new SelectList(bBll.GetEBList(LoginUser.UserBasic.EnterpriseID), "ID", "BName", list.BrandID); return View(list); }