Esempio n. 1
0
        public string GetHtml_ProductPicture_List(string ID)
        {
            List<Product_Picture> list = new ProductPictureService().QueryByProductID(ID);
            if (list == null || list.Count == 0) return "";

            string src = string.Empty;
            StringBuilder sb = new StringBuilder();
            foreach (Product_Picture pic in list)
            {
                src = Utils.GetProductImage(pic.Path);
                sb.Append("<img alt=\"\" src=\"" + src + "\">");
            }
            return sb.ToString();
        }
Esempio n. 2
0
        public string GetHtml_ProductPicture(string ID)
        {
            List<Product_Picture> list = new ProductPictureService().QueryByProductID(ID);
            if (list == null || list.Count == 0) return "";

            int i = 0;
            string src = Utils.GetProductImage(list[0].Path, "3");
            string bimg = Utils.GetProductImage(list[0].Path, "3");
            string limg = Utils.GetProductImage(list[0].Path, "4");

            StringBuilder sb = new StringBuilder();
            sb.Append("<div class=\"magnifier_bimg\">");
            sb.Append("<img alt=\"\" src=\"" + src + "\" bimg=\"" + bimg + "\" limg=\"" + limg + "\" id=\"mBigImg\">");
            sb.Append("<div id=\"divShowFlash\" style=\"display:none\">");
            sb.Append("<a id=\"aShowPic\" class=\"detailShow\" target=\"_blank\" href=\"#\"></a>");
            sb.Append("</div></div>");
            sb.Append("<a href=\"javascript:\" class=\"magnifier_larrow\"></a>");
            sb.Append("<div class=\"magnifier_simgbox\">");
            sb.Append("<ul style=\"width: 248px;\" class=\"magnifier_simglist fix\">");
            foreach (Product_Picture pic in list)
            {
                src = Utils.GetProductImage(pic.Path, "0");
                bimg = Utils.GetProductImage(pic.Path, "3");
                limg = Utils.GetProductImage(pic.Path, "4");

                sb.Append("<li class=\"magnifier_simg\"><a href=\"javascript:\"><img src=\"" + src + "\" bimg=\"" + bimg + "\" limg=\"" + limg + "\" id=\"mSmallImg" + i.ToString() + "\"></a></li>");
                i++;
            }
            sb.Append("</ul></div><a href=\"javascript:\" class=\"magnifier_rarrow\"></a>");
            return sb.ToString();
        }