Ejemplo n.º 1
0
        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"));
            }
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 商品列表
        /// </summary>
        /// <returns></returns>
        public List <TT_Transaction> Transaction()
        {
            var mql = TT_TransactionSet.SelectAll().Where(TT_TransactionSet.ShopId.Equal(TT_ShopSet.Select(TT_ShopSet.ShopId).Where(TT_ShopSet.UserId.Equal(userId))));
            List <TT_Transaction> list = OPTranBiz.GetOwnList(mql);

            return(list);
        }