Example #1
0
        public ActionResult Edit(long id = 0)
        {
            if (id == 0)
            {
                return(View(new Hotel.Model.Goods()
                {
                    HotelId = UserContext.CurrentUser.HotelId
                }));
            }
            var info = GoodsBll.GetById(id);

            return(View(info));
        }
Example #2
0
        public ActionResult Edit(int id)
        {
            ViewBag.goodtype   = new SelectList(GoodsTypeBll.GetAll(), "Type_ID", "Type_Name");
            ViewBag.goodborder = new SelectList(BorderBll.GetAll(), "Border_ID", "Border_Name");
            Goods      goods      = GoodsBll.GetById(id);
            GoodsModel goodsModel = new GoodsModel
            {
                Goods_ID      = goods.Goods_ID,
                Goods_Content = goods.Goods_Content,
                Goods_Img     = goods.Goods_Img,
                Goods_Price   = goods.Goods_Price,
                Goods_Name    = goods.Goods_Name,
                Type_ID       = goods.Type_ID,
                Border_ID     = goods.Border_ID,
            };

            return(View(goodsModel));
        }