Esempio n. 1
0
 public void Update(ListModel model)
 {
     ListId = model.ListId;
     Name = model.Name;
     //CreatedDate = model.CreatedDate;
     UserId = model.UserId;
 }
        //
        // GET: /wapgroupBuy/
        public ActionResult groupBuy()
        {
            string type = Request.QueryString["type"] == null ? "groupBuy" : Request.QueryString["type"].ToString();
            if (type == "groupBuy" || string.IsNullOrEmpty(type) || type == "undefined")
            {
                int pagerows = 2;
                string page = Request.QueryString["page"] == null ? "1" : Request.QueryString["page"].ToString();
                string ptype = Request.QueryString["ptype"] == null ? "" : Request.QueryString["ptype"].ToString();
                string price = Request.QueryString["price"] == null ? "" : Request.QueryString["price"].ToString();
                string brand = Request.QueryString["brand"] == null ? "" : Request.QueryString["brand"].ToString();
                string where = "";
                if (!string.IsNullOrEmpty(ptype) && ptype != "undefined")
                    where += " and pt_id=" + ptype;
                if (!string.IsNullOrEmpty(brand) && brand != "undefined")
                    where += " and b_id=" + brand;
                if (!string.IsNullOrEmpty(price) && price != "undefined")
                {
                    if (price == "5000以上")
                        where += "and gp_ppric>5000";
                    else
                    {
                        string[] prilist = price.Split('-');

                        where += " and gp_ppric>=" + prilist[0] + " and gp_ppric<=" + prilist[1];
                    }

                }
                var model = new ListModel();
                model.blist = new BLL.BrandBase().GetModelList(" b_isdel=0 and b_statuscode=0");
                model.ptlist = new BLL.ProductTypeBase().GetModelList(" pt_IsDel=0 and pt_StatusCode=0");
                DateTime thistime = DateTime.Now;
                model.vmgblist = new BLL.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 + "' " + where);
                model.vmgblistpage = new BLL.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 + "' " + where, int.Parse(page), pagerows);
                model.path = "团购";
                ViewData["count"] = model.vmgblist.Count;
                ViewData["pagerows"] = pagerows;
                ViewData["page"] = page;
                ViewData["pagecount"] = Math.Ceiling((double)model.vmgblist.Count / (double)pagerows);

                return View(model);
            }
            else
                return View();
        }
        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. 4
0
 public List(ListModel model)
 {
     this.Update(model);
     CreatedDate = DateTime.Now;
 }
        public string insertintoCart()
        {
            int pid = 0;
            int count = 0;
            int result = 0;
            bool result2 = false;
            string mm = "";
            decimal pric=0;
            if (!string.IsNullOrEmpty(RequestBase.GetString("skuid")))
            {
                pid = int.Parse(RequestBase.GetString("skuid").ToString());
            }

            if (!string.IsNullOrEmpty(RequestBase.GetString("pric")))
            {
                pric = decimal.Parse(RequestBase.GetString("pric").ToString());
            }

            if (!string.IsNullOrEmpty(RequestBase.GetString("count")))
            {
                count = int.Parse(RequestBase.GetString("count").ToString());
            }
            if (Request.Cookies["UserInfo"] != null)
            {
                int mid = (CookieEncrypt.DeserializeObject(System.Web.HttpContext.Current.Request.Cookies["UserInfo"].Value) as Model.MemberBase).m_ID;
                Model.ShoppingCartBase scmodel = new ShoppingCartBase();

                var model = new ListModel();
                model.vmgblist = new BLL.vm_GBDetails().GetModelList(" gp_isdel=0 and gp_statuscode=0  and sku_id=" + pid + " and gp_pCount-gp_SaleCount>0");
                if (model.vmgblist.Count > 0)
                {
                    var sclist = new BLL.ShoppingCartBase().GetModelList(" m_ID=" + mid + " and sku_ID=" + model.vmgblist[0].sku_ID + " and sc_IsDel=0 and sc_IsGP=1");
                    if (sclist.Count > 0)
                    {
                        Model.ShoppingCartBase upmodel = new BLL.ShoppingCartBase().GetModel(sclist[0].sc_ID);
                        //改数量
                        upmodel.sc_pCount += count;
                        upmodel.sc_pPric = pric;
                        upmodel.sc_CreateOn = DateTime.Now;
                        upmodel.sc_IsGP = true;
                        result2 = new BLL.ShoppingCartBase().Update(upmodel);

                    }
                    else
                    {
                        //添加
                        scmodel.m_ID = mid;
                        scmodel.sc_pCount = count;
                        scmodel.sc_pPric = pric;
                        scmodel.sc_CreateOn = DateTime.Now;
                        scmodel.sku_ID = pid;
                        scmodel.sc_IsGP = true;
                        result = new BLL.ShoppingCartBase().Add(scmodel);
                    }
                    if (result > 0 || result2)
                    {
                        int? pcount = 0;
                        decimal? ppric;
                        decimal pricecount = 0;
                        int? allpcount = 0;
                        var scalllist = new BLL.ShoppingCartBase().GetModelList("  m_ID=" + mid + " and sc_IsDel=0");
                        //ViewData["pcount"] = sclist.Count;
                        foreach (var item in scalllist)
                        {
                            pcount = item.sc_pCount;
                            ppric = item.sc_pPric;
                            pricecount += decimal.Parse(((double)pcount * (double)ppric).ToString());
                            allpcount += pcount;
                        }
                        string html = "<div class=\"modal\" id=\"chart-modal\"><a class=\"close\"   id=\"close\" onclick=\"closeit()\">X</a><div class=\"yes-chart\"><div class=\"yes-icon alignleft\"></div><div class=\"chart-font alignright\"><dl><dt><strong>添加成功!</strong></dt><dd>购物车共有<span> " + allpcount + "</span>件商品,商品总价:<span>¥ " + pricecount + " </span></dd></dl><div class=\"clear\"></div><a class=\"total-chart\" href=\"/Chart/Chart\">去购物车结算 ></a><a class=\"go-shop\" href=\"javascript:void(0)\" id=\"keepshopping\" onclick=\"closeit()\">继续购物</a></div><!--chart-font end--></div>";
                        return html;
                    }
                    else
                    {
                        mm = "fail";
                        return mm;
                    }
                }
                else
                {
                    string html = "<div class=\"modal\" id=\"chart-modal\"><a class=\"close\"   id=\"close\" onclick=\"closeit()\">X</a><div class=\"yes-chart\"><div class=\"no-icon alignleft\"></div><div class=\"chart-font alignright\"><dl><dt><strong>该款团购已被抢光啦,下次记得早点来哦!</strong></dt></dl><div class=\"clear\"></div><a class=\"total-chart\" href=\"/Chart/Chart\">去购物车结算 ></a><a class=\"go-shop\" href=\"javascript:void(0)\" id=\"keepshopping\" onclick=\"closeit()\">继续购物</a></div><!--chart-font end--></div>";
                    return html;
                }
            }
            else
            {
                mm = "nologon";

                return mm;
            }
        }
        public ActionResult ProList()
        {
            string type = Request.QueryString["type"] == null ? "ProList" : Request.QueryString["type"].ToString();
            if (type == "ProList" || string.IsNullOrEmpty(type) || type == "undefined")
            {
                int pagerows = 12;
                string where = "";
                string sortby = "";
                string page = Request.QueryString["page"] == null ? "1" : Request.QueryString["page"].ToString();
                string ptype = Request.QueryString["ptype"] == null ? "" : Request.QueryString["ptype"].ToString();
                int typeid = int.Parse(ptype);//类别ID
                string tui = Request.QueryString["tui"] == null ? "" : Request.QueryString["tui"].ToString();
                string price = Request.QueryString["price"] == null ? "" : Request.QueryString["price"].ToString();
                string brand = Request.QueryString["brand"] == null ? "" : Request.QueryString["brand"].ToString();
                string sort = Request.QueryString["sort"] == null ? "" : Request.QueryString["sort"].ToString();
                string typeidd = ptype;//需进行类别判断
                Model.ProductTypeBase ptmodel = ptbll.GetModel(int.Parse(typeidd));
                if (ptmodel.pt_Layer == 1)//大类
                {
                    where += " and pt_ID in(select pt_ID  from ProductTypeBase where pt_ParentId =" + ptype + ")";
                }
                else if (ptmodel.pt_Layer == 2)
                {
                    where += " and pt_id=" + ptype;
                }
                //else if (ptmodel.pt_Layer == 3)
                //{
                //    where += " and pt_id=" + ptype;
                //}
                ////string ptype = " and pt_id=" + ptype;//需进行类别判断

                if (!string.IsNullOrEmpty(brand) && brand != "undefined")
                    where += " and b_id=" + brand;
                if (!string.IsNullOrEmpty(price) && price != "undefined")
                {

                    if (price == "5000以上")
                        where += "and sku_Price>=5000" + " and p_id not in(select p_id from skubase where sku_id in(select sku_id from GroupPurchaseBase where gp_pPric<5000 and sku_ID in(select  sku_ID from skubase where p_ID in( select p_ID from ProductRecommendDetail where prt_ID=1 and prd_Status=0 and prd_IsDelete=0))))";
                    else
                    {
                        string[] prilist = price.Split('-');
                        where += " and sku_Price>=" + prilist[0] + " and sku_Price<=" + prilist[1] + " and p_id not in(select p_id from skubase where sku_id in(select sku_id from GroupPurchaseBase where gp_pPric<" + prilist[0] + " or gp_pPric>" + prilist[1] + " and sku_ID in(select  sku_ID from skubase where p_ID in( select p_ID from ProductRecommendDetail where prt_ID=1 and prd_Status=0 and prd_IsDelete=0))))";
                    }
                }
                if (!string.IsNullOrEmpty(sort) && sort != "undefined")
                {
                    if (sort == "sku")
                        sortby = " order by sku_ID desc";
                    if (sort == "xliang")
                        sortby = " order by sku_SalesCount desc ";
                    if (sort == "spric")
                        sortby = " order by sku_Price desc";
                    if (sort == "pinglun")
                        sortby = " order by pinglun desc";
                    if (sort == "selltime")
                        sortby = " order by p_ModifyOn desc";
                }
                var model = new ListModel();
                model.blist = bbll.GetbrandByTypeId(typeid);
                model.ptlist = ptbll.GetModelList(" pt_parentId=" + typeid+" and pt_Isdel=0 and pt_statusCode=0");
                model.vmpinfolist = new BLL.vw_PInfo().GetModelList(" p_IsDel=0 " + where, int.Parse(page), pagerows, sortby);
                List<Model.vw_PInfo> list = new BLL.vw_PInfo().GetModelList(" p_IsDel=0" + where);
                model.proattr = new BLL.ProductAttributesBase().GetModelList("  pa_IsDel=0 and pa_StatusCode=0 and pa_Type=1 ");

                ViewData["count"] = list.Count;
                ViewData["pagerows"] = pagerows;
                ViewData["page"] = page;
                ViewData["pagecount"] = Math.Ceiling((double)list.Count / (double)pagerows);
                ViewData["typename"] = new BLL.ProductTypeBase().GetModel(int.Parse(typeidd)).pt_Name;
                var cpt = adertbll.GetModelList(" a_PID=28 and a_spare2=3 and a_Delete=0 ");
                ViewBag.GuangGao = cpt.ToList();
                return View(model);
            }
            else
                return View();
        }
        public ActionResult ProTuiList()
        {
            string type = Request.QueryString["type"] == null ? "ProTuiList" : Request.QueryString["type"].ToString();
            if (type == "ProTuiList" || string.IsNullOrEmpty(type) || type == "undefined")
            {
                int pagerows = 4;
                string where = "";
                string sortby = "";
                //页数
                string page = Request.QueryString["page"] == null ? "1" : Request.QueryString["page"].ToString();
                //推荐
                string tui = Request.QueryString["tui"] == null ? "" : Request.QueryString["tui"].ToString();
                //分类ID
                string ptid = Request.QueryString["ptype"] == null ? "" : Request.QueryString["ptype"].ToString();
                //查询条件
                string condition = Request.QueryString["condition"] == null ? "" : Request.QueryString["condition"].ToString();
                //价格
                string price = Request.QueryString["price"] == null ? "" : Request.QueryString["price"].ToString();
                //品牌
                string brand = Request.QueryString["brand"] == null ? "" : Request.QueryString["brand"].ToString();
                //排序
                string sort = Request.QueryString["sort"] == null ? "" : Request.QueryString["sort"].ToString();
                //存在推荐分类
                if (!string.IsNullOrEmpty(tui) && tui != "undefined")
                {
                    where += " and p_ID in (select p_ID from ProductRecommendDetail where prt_ID=" + tui + " and prd_Status=0 and prd_IsDelete=0)   ";
                }
                else
                {
                    string strptCon = "";
                    if (!string.IsNullOrWhiteSpace(ptid) && ptid != "undefined")
                    {
                        ptid = HttpUtility.UrlDecode(ptid);
                        var proType = new BLL.ProductTypeBase().GetModelList(" pt_IsDel = 0 and pt_StatusCode = 0 and pt_Name = '" + ptid +"'").FirstOrDefault();
                        if (proType != null)
                        {
                            strptCon = " and pt_ID=" + proType.pt_ID;
                        }
                    }
                    if (!string.IsNullOrWhiteSpace(condition) && condition != "undefined")
                    {
                        condition = HttpUtility.UrlDecode(condition);
                        where += " and p_ID in (select p_ID from ProductBase where p_Name like '%[" + condition + "]%' and p_SellStatus=1 and p_IsDel=0 and p_StatusCode=0 " + strptCon + ")    ";
                    }
                }
                //存在分类
                if (!string.IsNullOrEmpty(ptid) && ptid != "undefined")
                {
                    where += " and pt_ID=" + ptid;
                }
                //存在品牌
                if (!string.IsNullOrEmpty(brand) && brand != "undefined")
                {
                    where += " and b_id=" + brand;
                }
                //价格
                if (!string.IsNullOrEmpty(price) && price != "undefined")
                {
                    if (price == "5000以上")
                        where += "and sku_Price>=5000" + " and p_id not in(select p_id from skubase where sku_id in(select sku_id from GroupPurchaseBase where gp_pPric<5000 and sku_ID in(select  sku_ID from skubase where p_ID in( select p_ID from ProductRecommendDetail where prt_ID=1 and prd_Status=0 and prd_IsDelete=0))))";
                    else
                    {
                        string[] prilist = price.Split('-');
                        where += " and sku_Price>=" + prilist[0] + " and sku_Price<=" + prilist[1] + " and p_id not in(select p_id from skubase where sku_id in(select sku_id from GroupPurchaseBase where gp_pPric<" + prilist[0] + " or gp_pPric>"+prilist[1] +" and sku_ID in(select  sku_ID from skubase where p_ID in( select p_ID from ProductRecommendDetail where prt_ID=1 and prd_Status=0 and prd_IsDelete=0))))";
                    }
                }
                //排序
                if (!string.IsNullOrEmpty(sort) && sort != "undefined")
                {
                    if (sort == "sku")
                        sortby = " order by sku_ID desc";
                    if (sort == "xliang")
                        sortby = " order by sku_SalesCount desc ";
                    if (sort == "spric")
                        sortby = " order by sku_Price desc";
                    if (sort == "pinglun")
                        sortby = " order by pinglun desc";
                    if (sort == "selltime")
                        sortby = " order by p_ModifyOn desc";
                }
                var model = new ListModel();
                if (!string.IsNullOrWhiteSpace(tui) && tui != "undefined")
                {
                    model.blist = bbll.GetModelList("  b_IsDel=0 and b_StatusCode=0 and b_ID in(select b_ID from ProductTypeBrandBase where pt_ID in(select pt_ID from productbase where p_ID in(select p_ID from ProductRecommendDetail where prt_ID=" + tui + " and prd_IsDelete=0 and prd_Status=0)))");
                    model.ptlist = ptbll.GetModelList(" pt_IsDel=0 and pt_StatusCode=0 and pt_ID in(select pt_ID from productbase where p_ID in(select p_ID from ProductRecommendDetail where prt_ID=" + tui + "  and prd_IsDelete=0 and prd_Status=0))");
                    ViewData["typename"] = new BLL.ProductRecommendTypeBase().GetModel(int.Parse(tui)).prt_Name;
                }
                else
                {
                    model.blist = new List<BrandBase>();
                    model.ptlist = new List<ProductTypeBase>();
                    ViewData["typename"] = "";
                }
                model.vmpinfolist = new BLL.vw_PInfo().GetModelList(" p_IsDel=0 and p_StatusCode=0 and p_SellStatus=1   " + where, int.Parse(page), pagerows, sortby);
                List<Model.vw_PInfo> list = new BLL.vw_PInfo().GetModelList(" p_IsDel=0 and p_SellStatus=1 and p_StatusCode=0   " + where);

                ViewData["count"] = list.Count;
                ViewData["pagerows"] = pagerows;
                ViewData["page"] = page;
                ViewData["pagecount"] = Math.Ceiling((double)list.Count / (double)pagerows);
                return View(model);

            }
            else
                return View();
        }
 public ActionResult Index(ListModel model)
 {
     return this.View(model);
 }
Esempio n. 9
0
        public void Update(ListModel model)
        {
            Name = model.Name;
            CreatedDate = DateTime.Now;

        }
Esempio n. 10
0
 public List(ListModel list)
 {
     this.Update(list);
     CreatedDate = DateTime.Now; //list.CreatedDate = DateTime.Now;
 }
        /// <summary>
        /// 详细商品页
        /// </summary>
        /// <returns></returns>
        public ActionResult CommodityDetails()
        {
            cuixiao();

             string pid=Request.QueryString["p_id"]==null?"0":Request.QueryString["p_id"].ToString();
             ViewData["p_id"] = pid;

             dataWork dw = new dataWork();//相似产品
             DataTable dtxssp = dw.GetTab(string.Format("select top(5) pi_Url,skubase.p_ID,p_Name from ProductImgBase,SKUBase,ProductBase where ProductBase.p_IsDel=0 and ProductBase.p_StatusCode=0 and ProductBase.p_ID=SKUBase.p_ID and  ProductImgBase.sku_ID=SKUBase.sku_ID and  pi_type=1 and pi_StatusCode=0 and pi_isDel=0 and ProductImgBase.sku_ID in(select sku_ID  from SKUBase where sku_IsDel=0 and sku_StatusCode=0 and p_ID in(select p_ID from ProductBase where p_isdel=0 and pt_id in(select pt_id from ProductTypeBase where pt_parentid in(select pt_parentid from ProductTypeBase where pt_id=( select pt_id from productbase where p_ID={0}))))) ", pid));

             ViewData["相似商品"] = dtxssp;

            if(pid=="0")
            {
                return View("~/ErrorPage/Error404");
            }else
            {
                ListModel model = new ListModel();

                List<Model.SKUBase> list = new BLL.SKUBase().GetModelList("  p_id=" + pid + " and sku_StatusCode=0 and sku_IsDel=0");

                //model.productinfo = new BLL.ProductInfoBase().GetModelList(" and pin_StatusCode=0 and pin_IsDel=0 and p_ID= "+pid);
                model.vmpinfolist = new BLL.vw_PInfo().GetModelList(" p_IsDel=0 and p_StatusCode=0 and p_SellStatus=1  and sku_ID= " + list[0].sku_ID);//商品信息

                if (model.vmpinfolist.Count > 0)
                {
                   ViewBag.Title=model.vmpinfolist[0].p_Name+"-书生网";
                }
                else
                {
                    ViewBag.Title = "商品详细信息-书生网";
                }

                ViewData["ifcmys"]="0";//尺码颜色0:不显示1:显示

                if (model.vmpinfolist.Count > 0)
                {
                    if (model.vmpinfolist[0].pt_ParentId == 488 || model.vmpinfolist[0].pt_ParentId == 489) //男鞋或女鞋的话显示尺码颜色
                    {
                        ViewData["ifcmys"] = "1";
                    }
                    else
                    {
                        ViewData["ifcmys"] = "0";
                    }
                }
                else {
                    ViewData["ifcmys"] = "0";
                }

                model.pimglist = new BLL.ProductImgBase().GetModelList(" sku_ID=" + list[0].sku_ID);//图片列表
                model.productinfotuijian = new BLL.ProductInfoBase().GetModelList(" p_ID=(select p_ID from SKUBase where sku_ID=" + list[0].sku_ID + ") and pin_StatusCode=0 and pin_IsDel=0 and pin_Type='推荐理由'");//推荐理由
                model.productinfo = new BLL.ProductInfoBase().GetModelList(" p_ID=(select p_ID from SKUBase where sku_ID=" + list[0].sku_ID + ") and pin_StatusCode=0 and pin_IsDel=0 and pin_Type='商品介绍'");//商品介绍

                model.proattr = new BLL.ProductAttributesBase().GetModelListByskuId("pa2.pa_Type=1 and pad.sku_ID= " + list[0].sku_ID);//属性
                model.proattr2 = new BLL.ProductAttributesBase().GetModelListByPid(" and pa.pa_Type=2 and pa.pa_ID in(select pa_ID from ProductAttributeDetails where  sku_ID in (select sku_ID from SKUBase where p_ID=(select p_ID from SKUBase where sku_ID=" + list[0].sku_ID + "))) and sku.sku_ID in (select sku_ID from SKUBase where p_ID=(select p_ID from SKUBase where sku_ID=" + list[0].sku_ID + "))");//规格

                model.proattr3 = new BLL.ProductAttributesBase().GetModelListByPid(" and pa.pa_Type=3 and pa.pa_ID in(select pa_ID from ProductAttributeDetails where  sku_ID in (select sku_ID from SKUBase where p_ID=(select p_ID from SKUBase where sku_ID=" + list[0].sku_ID + "))) and sku.sku_ID in (select sku_ID from SKUBase where p_ID=(select p_ID from SKUBase where sku_ID=" + list[0].sku_ID + "))");//颜色

                List<SelectListItem> pchima = new List<SelectListItem>();//商品尺码
                pchima = new List<SelectListItem> {new SelectListItem{Text="请选择",Value="0"} };
                for (int i = 0; i < model.proattr2.Count; i++)
                {
                    pchima.Add(new SelectListItem {
                        Text = model.proattr2[i].pa_Name.ToString(),
                        Value = model.proattr2[i].pa_ID.ToString()
                    });
                }
                ViewData["pchima"] = new SelectList(pchima,"Value","Text","请选择");

                List<SelectListItem> pyanse = new List<SelectListItem>();//商品颜色
                pyanse = new List<SelectListItem> { new SelectListItem { Text = "请选择", Value = "0" } };
                for (int i = 0; i < model.proattr3.Count; i++)
                {
                    pyanse.Add(new SelectListItem
                    {
                        Text = model.proattr3[i].pa_Name.ToString(),
                        Value = model.proattr3[i].pa_ID.ToString()
                    });
                }
                ViewData["pyanse"] = new SelectList(pyanse, "Value", "Text", "请选择");

                return View(model);
            }
        }
 public ActionResult SafeCenter()
 {
     Model.MemberBase model = null;
     if (LoginMember != null)
     {
         model = new BLL.MemberBase().GetModel((CookieEncrypt.DeserializeObject(System.Web.HttpContext.Current.Request.Cookies["UserInfo"].Value) as Model.MemberBase).m_ID);
         var models = new Models.ListModel();
         models.member = model;
         if (model.m_mailyanzheng)
         {
             ViewData["Isshenpi"] = true;
         }
         else
         {
             ViewData["Isshenpi"] = false;
         }
         ViewData["email"] = "http://www." + model.m_Email.Substring(model.m_Email.IndexOf('@') + 1, model.m_Email.Length - model.m_Email.IndexOf('@') - 1);
         ViewData["mid"] = model.m_ID;
         return View(model);
     }
     else
     {
         Response.Redirect("/Index/Index");
         return View();
     }
 }
        public ActionResult index()
        {
            Model.MemberInfo model = null;
            model = new BLL.MemberBase().getMemberInfo((CookieEncrypt.DeserializeObject(System.Web.HttpContext.Current.Request.Cookies["UserInfo"].Value) as Model.MemberBase).m_ID);
            var models = new Models.ListModel();
            models.Minfo = model;

            return View(model);
        }
Esempio n. 14
0
 public void Update(ListModel model)
 {
     Name = model.Name;
 }
        //会员中心首页
        public ActionResult VipCenterIndex()
        {
            int mid = 0;
            Model.MemberInfo model = null;
            if (LoginMember != null)
            {
                mid = (CookieEncrypt.DeserializeObject(System.Web.HttpContext.Current.Request.Cookies["UserInfo"].Value) as Model.MemberBase).m_ID;
                ViewData["isLogin"] = true;
                model = new BLL.MemberBase().getMemberInfo(mid);
                var tjlist = _productRecommendDetail.GetTop4List(" order by prt_id desc");
                var models = new Models.ListModel();
                models.dt = tjlist;
                models.Minfo = model;

                return View(models);

            }
            else
            {
                ViewData["isLogin"] = false ;
            }
            return View();
        }
Esempio n. 16
0
 public List(ListModel model)
 {
     Name = model.Name;
     CreatedDate = DateTime.Now;
 }
        //我的收藏
        public ActionResult VipMycollect()
        {
            var model = new ListModel();
            string where2 = "";
            int page = 1;
            string skulist = "";
            int mid = 0;
            if (LoginMember != null)
            {
                mid = (CookieEncrypt.DeserializeObject(System.Web.HttpContext.Current.Request.Cookies["UserInfo"].Value) as Model.MemberBase).m_ID;

                ViewData["mid"] =mid;
                Model.VipCollectionBase cmodel = new Model.VipCollectionBase();
                var clist = new BLL.VipCollectionBase().GetModelList(" m_Id=" + mid + " and vc_IsDel=0");
                if (clist.Count > 0)
                {
                    ViewData["collect"] = true;
                    foreach (var item in clist)
                    {
                        skulist += item.sku_ID + ",";
                    }
                    skulist = skulist.Substring(0, skulist.Length - 1);
                    where2 = " and  sku_ID in(" + skulist + ")";

                    List<Model.vw_PInfo> list = new BLL.vw_PInfo().GetModelList(" p_IsDel=0 and p_SellStatus=1 and p_StatusCode=0   " + where2);

                    return View(list.ToList());
                }
                else
                {
                    ViewData["collect"] = false;
                    return View();
                }
            }
            else
            {
                Response.Redirect("/wapLogin/Login");
                return View();
            }
        }
        /// <summary>
        /// 账户管理-商品评价页面
        /// </summary>
        /// <returns></returns>
        public ActionResult vipMyEvaluation()
        {
            // Model.MemberBase model = null;

            var model = new ListModel();
            string where = "";
            string where2 = "";
            string sortby = " order by pa.pa_Id";
            int page = 1;
            int pagerows = 2;
            string skulist = "";
            int mid = 0;
            if (LoginMember != null)
            {
                mid = (CookieEncrypt.DeserializeObject(System.Web.HttpContext.Current.Request.Cookies["UserInfo"].Value) as Model.MemberBase).m_ID;

                Model.ProductAppraiseBase cmodel = new Model.ProductAppraiseBase();
                var clist = new BLL.ProductAppraiseBase().GetModelList(" m_Id=" + mid + " and pa_IsDel=0 and pa_StatusCode=0");
                if (clist.Count > 0)
                {
                    ViewData["Appraise"] = true;
                    foreach (var item in clist)
                    {
                        skulist += item.sku_ID + ",";
                    }
                    skulist = skulist.Substring(0, skulist.Length - 1);
                    where = " and  vw.sku_ID in(" + skulist + ")";
                    where2 = " and  sku_ID in(" + skulist + ")";

                    model.vmpinfolist = new BLL.vw_PInfo().GetModelListPA(" pa.m_ID=" + mid + " and p_IsDel=0 and p_StatusCode=0 and p_SellStatus=1   and pa.pa_IsDel=0 " + where, page, pagerows, sortby);

                    ViewData["count"] = clist.Count;
                    ViewData["pagerows"] = pagerows;
                    ViewData["page"] = page;

                    return View(model.vmpinfolist);
                }
                else
                {
                    ViewData["Appraise"] = false;
                    return View();
                }
            }
            else
            {
                Response.Redirect("/Index/Index");
                return View();
            }
        }
 public ActionResult Hidden(ListModel model)
 {
     return this.View(model);
 }