Пример #1
0
 protected string GetProductLink(ProductItem item)
 {
     return UrlService.GetLinkDB(ParamType.Product, item.ProductId);
 }
Пример #2
0
        protected string RenderPictureTag(ProductItem item)
        {
            string strFormat = "";
            string strResult = "";

            if (string.IsNullOrEmpty(item.Photo))
            {
                strFormat =
                    "<div><div onclick=\"location='{0}'\" style=\"cursor:pointer;position:relative;height:90px;width:120px\" title=\"Фотография не доступна\"><img border=\"0\" src=\"images/nophoto_small.jpg\" alt=\"Фотография не доступна\" /></div></div><br/>";
                strResult = string.Format(strFormat, UrlService.GetLinkDB(ParamType.Product, item.ProductId));
            }
            else
            {
                strFormat =
                    "<div><div onclick=\"location='{4}'\" style=\"cursor:pointer;position:relative;height:90px;width:120px\" title=\"{0}\"><img class=\"imgPhoto\" border=\"0\" src=\"{1}\" alt=\"{0}\" /></div></div><br/>";
                strResult = string.Format(strFormat, Server.HtmlEncode(item.Name),
                                          FoldersHelper.GetImageProductPath(ProductImageType.Small, item.Photo, false),
                                          item.Photo, "", UrlService.GetLinkDB(ParamType.Product, item.ProductId));

            }
            return strResult;
        }