Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 public ActionResult Index(int id = 0)
 {
     //有货状态
     SelectLists sList = new SelectLists();
     ViewBag.isNormal = sList.GetGBISNormal();
     //可视分组
     GoodsGroupBll ggBll = new GoodsGroupBll();
     ViewBag.gGroup = ggBll.GetGGList(LoginUser.UserBasic.EnterpriseID);
     //商品类目(一级)
     GoodsClassBll gcbll = new GoodsClassBll();
     ViewBag.gClass = gcbll.GetGCList(0);
     ViewBag.gIsSales = id;
     return View();
 }
Exemplo n.º 3
0
        public ActionResult Index(int id = 0)
        {
            //有货状态
            SelectLists sList = new SelectLists();

            ViewBag.isNormal = sList.GetGBISNormal();
            //可视分组
            GoodsGroupBll ggBll = new GoodsGroupBll();

            ViewBag.gGroup = ggBll.GetGGList(LoginUser.UserBasic.EnterpriseID);
            //商品类目(一级)
            GoodsClassBll gcbll = new GoodsClassBll();

            ViewBag.gClass   = gcbll.GetGCList(0);
            ViewBag.gIsSales = id;
            return(View());
        }
Exemplo n.º 4
0
 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);
 }