public ActionResult groupBuyDetails()
        {
            string gpid = Request.QueryString["gpid"] == null ? "" : Request.QueryString["gpid"].ToString();
            Model.vm_GBDetails model = new BLL.vm_GBDetails().GetModel(int.Parse(gpid));
            List<Model.ProductInfoBase> list = new BLL.ProductInfoBase().GetModelList(" pin_isdel=0 and pin_statuscode=0 and p_ID="+model.p_ID);
            List<Model.Adert> adlist = new BLL.Adert().GetModelList(string.Format(" a_PID=27 and a_Delete=0 and  a_spare2=(select pt_parentid from ProductTypeBase where pt_ID = (select pt_ParentId from ProductTypeBase where pt_ID={0})) ", model.pt_ID));
            var modellist = new ListModel();
            //System.Web.HttpContext.Current.Application.Lock();
            //System.Web.HttpContext.Current.Application["UserCount"] = Int32.Parse(System.Web.HttpContext.Current.Application["UserCount"].ToString()) + 1;
            //System.Web.HttpContext.Current.Application.UnLock();
            modellist.path = "<a href=\"/groupBuy/index\"><strong>团购列表</strong></a> > "+model.p_Name;
            modellist.pinfoList = list;
            modellist.gbmodel = model;
            modellist.adlist = adlist;

            List<Model.vw_PInfo> pinfo = new BLL.vw_PInfo().getguanzhu(" sku_ID in(select distinct sku_ID  from VipCollectionBase)", 1, 5);
            ViewBag.pinfo = pinfo.ToList();
            List<Model.vw_PInfo> pinfo2 = new BLL.vw_PInfo().getguanzhu(" sku_ID in(select distinct sku_ID  from VipCollectionBase)", 2, 5);
            ViewBag.pinfo2 = pinfo2.ToList();
            return View(modellist);
        }
Esempio n. 2
0
 /// <summary>
 /// 团购
 /// </summary>
 /// <returns></returns>
 public object GetGroupPurchase()
 {
     BLL.GroupPurchaseBase groupPurchase = new BLL.GroupPurchaseBase();
     BLL.vm_GBDetails vm_GBDetails = new BLL.vm_GBDetails();
         DateTime thistime = DateTime.Now;
         var list = vm_GBDetails.GetModelList("p_IsDel=0 and p_StatusCode=0 and gp_IsDel=0 and gp_pCount-gp_SaleCount>0 and gp_StatusCode=0 and p_SellStatus=1 and gp_endtime>'" + thistime + "' order by gp_EndTime");
     ViewData["GroupPurchase"] = list;
     return ViewData["GroupPurchase"];
 }