Esempio n. 1
0
        public ActionResult AddGoods(GoodsInfoView model)
        {
            if (!Authority())
            {
                return(_authorityResult);
            }

            // edit model
            var good = new MarketService.GoodsInfo()
            {
                Seller   = Request.Cookies.Get(DefaultAuthenticationTypes.ApplicationCookie).Value,
                AddDate  = DateTime.Now,
                Buyer    = string.Empty,
                Comments = string.Empty,
                Desp     = model.Desp,
                Money    = model.Money,
                Name     = model.Name,
                PicUrl   = model.PicUrl,
                Status   = @"待审核",
                Type     = model.Type
            };

            if (string.IsNullOrEmpty(good.PicUrl))
            {
                good.PicUrl = "00.jpg"; //default.
            }

            marketClient.UserAddGoods(good);

            // ret
            return(RedirectToAction("MyCenter"));
        }
Esempio n. 2
0
        public ActionResult ShoppingRecordsDetails(int id)
        {
            if (!Authority())
            {
                return(_authorityResult);
            }

            var model = new GoodsInfoView(marketClient.GetGoodsInfoById(id));

            return(View(model));
        }
Esempio n. 3
0
        public ActionResult Details(int id = -1)
        {
            if (id == -1)
            {
                return(RedirectToAction("Index"));
            }

            var model = new GoodsInfoView(marketClient.GetGoodsInfoById(id));

            ViewBag.LeaveMsgs = marketClient.GetLeaveMsgListByGid(id);
            return(View(model));
        }