/// <summary> /// 图片 /// </summary> /// <param name="goodsID"></param> /// <returns></returns> public List <BD_GoodsCategory.Pic> GetPicList(string goodsID) { List <BD_GoodsCategory.Pic> picList = new List <BD_GoodsCategory.Pic>(); List <Hi.Model.BD_ImageList> imgList = new Hi.BLL.BD_ImageList().GetList("", " dr=0 and GoodsID='" + goodsID + "'", ""); if (imgList != null && imgList.Count > 0) { foreach (var img in imgList) { BD_GoodsCategory.Pic pic = new BD_GoodsCategory.Pic(); pic.ProductID = goodsID; pic.IsDeafult = "0"; pic.PicUrl = ConfigurationManager.AppSettings["ImgViewPath"].ToString().Trim() + "GoodsImg/" + img.Pic2; //pic.PicUrl = ConfigurationManager.AppSettings["AppCompImg"].ToString().Trim() + img.Pic3; picList.Add(pic); } } return(picList); }
protected void Page_Load(object sender, EventArgs e) { object obje = Request["action"]; if (obje != null) { if (obje.ToString() == "price") //获取价格 { string valuelist = Request["value"]; //属性值列表 Response.Write(GetProPrice(valuelist)); Response.End(); } if (obje.ToString() == "code") //商品编码 { string valuelist = Request["value"]; //属性值列表 Response.Write(GetGoodsCode(valuelist)); Response.End(); } } if (!IsPostBack) { object obj2 = Common.DesDecrypt(Request["goodsId"], Common.EncryptKey); if (obj2 != null) { goodsId = Convert.ToInt32(obj2); } object obj3 = Request.QueryString["goodsInfoId"]; if (obj3 != null) { goodsInfoId = Convert.ToInt32(obj3); } if (goodsId == 0)// || goodsInfoId == 0) { JScript.AlertMethod(this, "商品信息不存在!", JScript.IconOption.正确, "function (){ location.replace('" + ("GoodsInfoList.aspx") + "'); }"); return; } List <Hi.Model.BD_ImageList> Imgl = new Hi.BLL.BD_ImageList().GetList("", "isnull(dr,0)=0 and compid=" + this.CompID + " and goodsId=" + goodsId, ""); if (Imgl.Count > 0) { ImgShow.Visible = false; rptImg.DataSource = Imgl; rptImg.DataBind(); } else { ImgShow.Visible = true; } List <Hi.Model.BD_GoodsInfo> ll = new Hi.BLL.BD_GoodsInfo().GetList("", "isnull(dr,0)=0 and isenabled=1 and compid=" + this.CompID + " and goodsid=" + goodsId, ""); //Common.GetGoodsPrice(comPid, goodsId);//商品价格列表 if (ll.Count > 0) { Session["price"] = Common.FillDataTable(ll); } GetGoodsLabels(goodsId); //商品标签 Bind(goodsId); //, goodsInfoId); if (Request["rtype"] + "" == "1") { atitle.InnerText = "商品库存"; atitle.HRef = "GoodsInfoList.aspx"; } } DataBindLink(); }
protected void Page_Load(object sender, EventArgs e) { object obje = Request["action"]; if (obje != null) { if (obje.ToString() == "price") { string valuelist = Request["value"];//属性值列表 Response.Write(GetProPrice(valuelist)); Response.End(); } if (obje.ToString() == "code") //商品编码 { string valuelist = Request["value"]; //属性值列表 Response.Write(GetGoodsCode(valuelist)); Response.End(); } } if (!IsPostBack) { object obj2 = Request.QueryString["goodsId"]; if (obj2 != null) { goodsId = Convert.ToInt32(obj2); } object obj3 = Request.QueryString["goodsInfoId"]; if (obj3 != null) { goodsInfoId = Convert.ToInt32(obj3); } object obj4 = Request.QueryString["compId"]; if (obj4 != null) { compId = Convert.ToInt32(obj4); } if (goodsId == 0 || goodsInfoId == 0 || compId == 0) { JScript.AlertAndRedirect("商品信息不存在", "GoodsInfoList.aspx"); return; } List <Hi.Model.BD_ImageList> Imgl = new Hi.BLL.BD_ImageList().GetList("", "isnull(dr,0)=0 and compid=" + compId + " and goodsId=" + goodsId, ""); if (Imgl.Count > 0) { ImgShow.Visible = false; rptImg.DataSource = Imgl; rptImg.DataBind(); } else { ImgShow.Visible = true; } List <Hi.Model.BD_GoodsInfo> ll = new Hi.BLL.BD_GoodsInfo().GetList("", "isnull(dr,0)=0 and isenabled=1 and compid=" + compId + " and goodsid=" + goodsId, ""); //Common.GetGoodsPrice(comPid, goodsId);//商品价格列表 if (ll.Count > 0) { Session["price"] = Common.FillDataTable(ll); } GetGoodsLabels(goodsId, compId);//商品标签 Bind(goodsId, goodsInfoId, compId); } }
protected void Page_Load(object sender, EventArgs e) { LoginModel logUser = HttpContext.Current.Session["UserModel"] as LoginModel; if (logUser != null) { islogin = true; if (logUser.CompID == Request["Comid"].ToInt(0)) { type = logUser.TypeID; userCompId = logUser.CompID; } } else { type = 0; userCompId = 0; } object obje = Request["action"]; if (obje != null) { if (obje.ToString() == "price") { if (!string.IsNullOrWhiteSpace(Request["Comid"])) { string valuelist = Request["value"]; //属性值列表 string compId = Request["compId"]; //属性值列表 string goodsId = Request["goodsId"]; Response.Write(GetProPrice(valuelist.Trim(), compId.Trim(), goodsId.Trim())); Response.End(); } } else if (obje.ToString() == "price2") { string valuelist = Request["value"]; //属性值列表 string compId = Request["compId"]; //属性值列表 string goodsId = Request["goodsId2"]; Response.Write(GetProPrice2(valuelist.Trim(), compId.Trim(), goodsId.Trim())); Response.End(); } else if (obje.ToString() == "code") //商品编码 { string valuelist = ""; //属性值列表 if (Request["value"] != null) { valuelist = Request["value"]; } Response.Write(GetGoodsCodes(valuelist)); Response.End(); } else if (obje.ToString() == "applyCooperation") { string ycCompID = Request["ycCompID"] + ""; Response.Write(applyCooperation(ycCompID)); Response.End(); } } if (!IsPostBack) { List <Hi.Model.BD_ImageList> Imgl = new Hi.BLL.BD_ImageList().GetList("", "isnull(dr,0)=0 and compid=" + compId + " and goodsId=" + goodsId, ""); if (Imgl.Count > 0) { ImgShow.Visible = false; rptImg.DataSource = Imgl; rptImg.DataBind(); } else { ImgShow.Visible = true; Hi.Model.BD_Goods model = new Hi.BLL.BD_Goods().GetModel(goodsId); if (model != null && !string.IsNullOrEmpty(model.Pic)) { this.img1.Src = Common.GetPicURL(model.Pic, "resize400", compId.ToString()); this.img1.Attributes.Add("bimg", Common.GetPicURL(model.Pic, "", compId.ToString())); } } List <Hi.Model.BD_GoodsInfo> l = new Hi.BLL.BD_GoodsInfo().GetList("", "isnull(dr,0)=0 and isenabled=1 and compid=" + compId + " and goodsid=" + goodsId, ""); //Common.GetGoodsPrice(comPid, goodsId);//商品价格列表 if (l.Count > 0) { Session["price"] = Common.FillDataTable(l); hidGoodsInfoId.Value = l[0].ID.ToString(); if (goodsInfoId == 0) { goodsInfoId = Convert.ToInt32(l[0].ID.ToString()); } } else { JScript.AlertMethod(this, "商品不存在", JScript.IconOption.错误, "function(){location.href='index.aspx?Compid=" + compId + "'}"); return; } Bind(); GetGoodsLabels(); } }
protected void Page_Load(object sender, EventArgs e) { object obje = Request["action"]; if (obje != null) { if (obje.ToString() == "price") { string valuelist = Request["value"];//属性值列表 string goodsId = Request["goodsId"]; Response.Write(GetProPrice(valuelist.Trim(), goodsId.Trim())); Response.End(); } if (obje.ToString() == "code") //商品编码 { string valuelist = Request["value"]; //属性值列表 Response.Write(GetGoodsCode(valuelist)); Response.End(); } } if (!IsPostBack) { object obj2 = Request.QueryString["goodsId"]; if (obj2 != null) { goodsId = Convert.ToInt32(obj2); } if (Request["CompId"] + "" != "") { compID = (Request["CompId"] + "").ToInt(0); } object obj3 = Request.QueryString["goodsInfoId"]; if (obj3 != null) { goodsInfoId = Convert.ToInt32(obj3); } object obj4 = Request.QueryString["sc"]; if (obj4 != null) { this.A1.InnerText = "收藏商品"; this.A1.HRef = "GoodsList.aspx?sc=sc"; } List <Hi.Model.BD_ImageList> Imgl = new Hi.BLL.BD_ImageList().GetList("", "isnull(dr,0)=0 and compid=" + compID + " and goodsId=" + goodsId, ""); if (Imgl.Count > 0) { ImgShow.Visible = false; rptImg.DataSource = Imgl; rptImg.DataBind(); } else { ImgShow.Visible = true; Hi.Model.BD_Goods model = new Hi.BLL.BD_Goods().GetModel(goodsId); if (model != null && !string.IsNullOrEmpty(model.Pic)) { this.imgPic2.Src = Common.GetPicURL(model.Pic, "resize400"); this.imgPic2.Attributes.Add("bimg", Common.GetPicURL(model.Pic)); } } List <Hi.Model.BD_GoodsInfo> l = new Hi.BLL.BD_GoodsInfo().GetList("", "isnull(dr,0)=0 and isenabled=1 and compid=" + compID + " and goodsid=" + goodsId, ""); //Common.GetGoodsPrice(comPid, goodsId);//商品价格列表 if (l.Count > 0) { Session["price"] = Common.FillDataTable(l); hidGoodsInfoId.Value = l[0].ID.ToString(); if (goodsInfoId == 0) { goodsInfoId = Convert.ToInt32(l[0].ID.ToString()); } } else { JScript.AlertMethod(this, "商品不存在", JScript.IconOption.错误, "function(){location.href='index.aspx?Compid=" + compID + "'}"); return; } Bind(); } //DataBindLink(); }