public System.Text.StringBuilder RequestPicTxtNewList(string PictureStoreGroupParentID) { DataHelper NewHelper = new DataHelper(); System.Text.StringBuilder Txt = new System.Text.StringBuilder(); DataSet ds = ReadDb("select PictureStoreIDs from PictureStoreGroup where datalength(pictureStoreIds)>0 and PictureStoreGroupParentID=" + PictureStoreGroupParentID); if (ds.Tables[0].Rows.Count > 0) { string IDS = ""; foreach (DataRow thisRow in ds.Tables[0].Rows) { if (IDS == "") { IDS = DelTxtLastStr(",", thisRow[0].ToString()); } else { IDS += "," + DelTxtLastStr(",", thisRow[0].ToString()); } } ds = ReadDb("select top 10 ID,PictureStoreId,'HairLastPage.aspx?id='+convert(varchar(50),PictureStoreId) as url,(select hairname from hairstyle where hairstyle.id=PictureStoreSet.PictureStoreid) as Title,(select HitNum from HairStyle where HairStyle.id=PictureStoreSet.PictureStoreID) as HitNum from PictureStoreSet where PictureStoreId in(" + IDS + ") and NOT EXISTS (select * from PictureStoreSet as temp where temp.PictureStoreId=PictureStoreSet.PictureStoreID AND PictureStoreSet.ID>temp.ID) order by hitnum desc"); if (ds.Tables[0].Rows.Count > 0) { Txt.AppendFormat("<table width=\"86%\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\">"); foreach (DataRow thisRow in ds.Tables[0].Rows) { Txt.AppendFormat(" <tr>"); Txt.AppendFormat(" <td width=\"6%\"> </td>"); Txt.AppendFormat(" <td width=\"94%\" class=\"gray14-line\">· <a title=\"" + thisRow["title"].ToString() + "\" href=\"" + thisRow["url"].ToString() + "\" target=\"_blank\">" + thisRow["title"].ToString() + "</a></td>"); Txt.AppendFormat(" </tr>"); } Txt.AppendFormat("</table>"); } } return Txt; }
public System.Text.StringBuilder RequestHtmlSmallPicList(string GroupID) { DataHelper NewHelper = new DataHelper(); System.Text.StringBuilder Txt = new System.Text.StringBuilder(); DataSet ds = RequestSmallPicList(GroupID, "10"); if (ds.Tables[0].Rows.Count > 0) { Txt.AppendFormat("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"); Txt.AppendFormat("<tr>"); Txt.AppendFormat(" <td width=\"592\" height=\"317\" valign=\"top\">"); foreach (DataRow thisRow in ds.Tables[0].Rows) { Txt.AppendFormat("<table width=\"154\" height=\"176\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\">"); Txt.AppendFormat("<tr>"); Txt.AppendFormat("<td width=\"123\" height=\"154\" align=\"center\" valign=\"top\"><a title=\"" + thisRow["Title"] + "\" href=\"" + thisRow["Url"] + "\"><img src=\"" + thisRow["SmallPictureUrl"] + "\" class=\"pic_padding_glay\" /></a></td>"); Txt.AppendFormat("<td width=\"31\" align=\"center\" valign=\"top\"> </td>"); Txt.AppendFormat("</tr>"); Txt.AppendFormat("<tr>"); Txt.AppendFormat("<td height=\"22\" align=\"center\" valign=\"middle\" class=\"gray12-d\"><a href=\"#\" class=\"gray12-c\">" + thisRow["Title"] + "</a></td>"); Txt.AppendFormat("<td align=\"center\" valign=\"middle\" class=\"gray12-d\"> </td>"); Txt.AppendFormat("</tr>"); Txt.AppendFormat("</table>"); } Txt.AppendFormat("</td>"); Txt.AppendFormat("</tr>"); Txt.AppendFormat("</table>"); } return Txt; }