string userId = "a3e8f66f-3552-4626-9ee2-f7ddd8b106d8"; //GetUData.User_Id; public ActionResult Index() { ViewBag.RuteUrl = RuteUrl(); VipShopModel vshopMode = new VipShopModel(); var mql = TT_ShopSet.SelectAll().Where(TT_ShopSet.UserId.Equal(userId)); TT_Shop item = OPBiz.GetEntity(mql); if (item != null) { item.UserId = new Guid();//不显示给前端 安全考虑 var mqlimg = TT_FilesTransactSet.SelectAll().Where(TT_FilesTransactSet.SourceTable.Equal("TT_Shop").And(TT_FilesTransactSet.ToId.Equal(item.ShopId.ToString()))); List <TT_FilesTransact> listImg = OPFileBiz.GetOwnList(mqlimg); //List<FileJson> img = OPFileBiz.GetFList(listImg); //vshopMode.ImgList = img; vshopMode.ShopItem = item; ViewBag.listImgJson = OPFileBiz.GetJson(listImg); vshopMode.TransactionList = Transaction(); //ViewData.Model = item; return(View(vshopMode)); } else { return(RedirectToAction("Index", "User")); } }
public JsonResult GetInfo(string ID) { var mql2 = TT_ShopSet.SelectAll().Where(TT_ShopSet.ShopId.Equal(ID)); TT_Shop Rmodel = OPBiz.GetEntity(mql2); // groupsBiz.Add(rol); return(Json(Rmodel, JsonRequestBehavior.AllowGet)); }