/// <summary> /// 修改单个商品 /// </summary> /// <param name="gaid"></param> /// <param name="ptype"></param> /// <param name="price"></param> /// <param name="pMin"></param> /// <param name="pMax"></param> /// <returns></returns> public ActionResult EditGoodsAgent(long gaid) { GoodsAgentBll gabll = new GoodsAgentBll(); var ga = gabll.GetArray(w => w.ID == gaid, x => new { x.GoodsBasicID, x.Price, x.RType }); GoodsBasicBll bll = new GoodsBasicBll(); var gb = bll.GetArray(w => w.ID == ga[0].GoodsBasicID, x => new { x.MaxPrice, x.MinPrice }); GCSnapshotBll gcsbll = new GCSnapshotBll(); var ges = gcsbll.GetArray(w => w.GoodsAgentID == gaid && w.Status == 0, x => new { x.AContent }); ViewBag.gaid = gaid; ViewBag.ptype = ga[0].RType; ViewBag.price = ga[0].Price; ViewBag.pMin = gb[0].MinPrice; ViewBag.pMax = gb[0].MaxPrice; ViewBag.content = (ges.Count() < 1) ? "" : ges[0].AContent; return(View()); }
/// <summary> /// 修改单个商品 /// </summary> /// <param name="gaid"></param> /// <param name="ptype"></param> /// <param name="price"></param> /// <param name="pMin"></param> /// <param name="pMax"></param> /// <returns></returns> public ActionResult EditGoodsAgent(long gaid) { GoodsAgentBll gabll=new GoodsAgentBll(); var ga=gabll.GetArray(w=>w.ID==gaid,x=>new {x.GoodsBasicID,x.Price,x.RType}); GoodsBasicBll bll = new GoodsBasicBll(); var gb=bll.GetArray(w=>w.ID==ga[0].GoodsBasicID,x=>new {x.MaxPrice,x.MinPrice}); GCSnapshotBll gcsbll = new GCSnapshotBll(); var ges = gcsbll.GetArray(w => w.GoodsAgentID == gaid && w.Status == 0, x => new { x.AContent }); ViewBag.gaid = gaid; ViewBag.ptype = ga[0].RType; ViewBag.price =ga[0].Price; ViewBag.pMin = gb[0].MinPrice; ViewBag.pMax =gb[0].MaxPrice; ViewBag.content = (ges.Count()<1) ? "" : ges[0].AContent; return View(); }