示例#1
0
    public string loadImage(string branchType)
    {
        string result = ""; int i = 1;

        var m = db.sp_web_loadProductImage2(branchType);

        foreach (var item in m.ToList())
        {
            result += "<tr class='detail-rows' branchtype='" + branchType.Trim() + "' imageZoom=\"" + Convert.ToString(item.ImageZoom).Replace("/", "@") + "\" image=\"" + Convert.ToString(item.Image).Replace("/", "@") + "\" id='" + item.Id.ToString() + "' title='Click để xem chi tiết'>";
            result += "<td class='center childrows'></td>";
            result += "<td>" + item.ProductTypeCode + "</td>";
            result += "<td>" + (item.Image.Length > 50 ? (item.Image.Substring(0, 50) + "...") : item.Image) + "</td>";
            result += "<td>" + (item.ImageZoom.Length > 50 ? (item.ImageZoom.Substring(0, 50) + "...") : item.ImageZoom) + "</td>";
            result += "<td id='imageCount" + item.Id.ToString() + "'>" + item.ImageCount.ToString() + "</td>";
            result += "</tr>";
            i++;
        }
        return(result);
    }