//二手房
SellBLL mySell = new SellBLL();
StringBuilder sb_sale = new StringBuilder();
IList<Sell> lists = mySell.GetSellShopRecommendList();
sb_sale.Append("<table align='left' border='0' cellpadding='0' cellspacing='0'>");
int count = lists.Count >= 10 ? 10 : lists.Count;
for (int i = 0; i < count; i++)
{
if (i % 2 == 0)
{
sb_sale.Append("<tr>");
}
sb_sale.Append("<td width='89'>");
sb_sale.Append("<div class='left-ersh'>");
if (lists[i].SImage2.Trim() != "")
{
sb_sale.Append(" <a title=/"点击进入 " + lists[i].SeTempt1 + "详情页/" href=../html/secondhand/" + lists[i].SPageUrl + " target=/"_blank/"><img src='../" + lists[i].SImage2 + "' width='74' height='58'></a></div>");
}
else
{
sb_sale.Append(" <a title=/"点击进入 " + lists[i].SeTempt1 + "详情页/" href=../html/secondhand/" + lists[i].SPageUrl + " target=/"_blank/"><img src='images/shiwaitu.gif' width='74' height='58'></a></div>");
}
sb_sale.Append("</td>");
sb_sale.Append("<td width='269'>");
sb_sale.Append("<table width='250' height='74' border='0' cellpadding='0' cellspacing='0'>");
sb_sale.Append("<tr>");
string lname = lists[i].SeTempt1.Length > 8 ? lname = lists[i].SeTempt1.Substring(0, 8) : lists[i].SeTempt1;
sb_sale.Append("<td style='color: #da5a44;' align='left' valign='bottom'> <a style='color: #da5a44;' title=/"点击进入 " + lists[i].SeTempt1 + "详情页/" href=../html/secondhand/" + lists[i].SPageUrl + " target=/"_blank/"> " + lname + "</a>");
sb_sale.Append("</td>");
sb_sale.Append("</tr>");
sb_sale.Append("<tr>");
sb_sale.Append("<td height='20' align='left'>");
sb_sale.Append("[" + lists[i].AName + "] " + lists[i].SCountRoom + "室" + lists[i].SHall.Split(',')[0] + "厅 " + lists[i].SGFA + "㎡<span class='style-price'> " + lists[i].SMoney.ToString("0") + "万</span>");
sb_sale.Append("</td>");
sb_sale.Append("</tr>");
sb_sale.Append("<tr>");
sb_sale.Append("<td style='color: #999999;' align='left' valign='top'> ");
string sremark = lists[i].SRemark.Length >= 17 ? lists[i].SRemark.Substring(0, 17) : lists[i].SRemark;
sb_sale.Append(sremark);//安静别致的小区,超值3房买少见少
sb_sale.Append("</td>");
sb_sale.Append("</tr>");
sb_sale.Append("</table>");
sb_sale.Append("</td>");
if (i % 2 == 2)
{
sb_sale.Append(" </tr>");
}
}
sb_sale.Append("</table>");
this.sale.InnerHtml = sb_sale.ToString();