ActionLabel/Links.cs

(完整代码) 1KB

using System;
using System.Text;
using System.Data.SqlClient;using System.Data;
using Common;


namespace ActionLabel
{
    public class Links
    {
        /// <summary>
        /// 输出友情链接
        /// </summary>
        /// <param name="top">显示条数</param>
        /// <param name="strWhere">查询条件</param>
        /// <param name="orderby">排序条件</param>
        /// <returns></returns>
        public static string ViewImgList(int top, string strWhere, string orderby)
        {
            BLL.Links bll = new BLL.Links();
            StringBuilder strTxt = new StringBuilder();
           
            DataSet ds = bll.GetList(top, strWhere, orderby);
            //如果记录存在
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    DataRow dr = ds.Tables[0].Rows[i];
                    //if (Convert.ToInt32(dr["IsImage"]) == 1)
                    //{
                    //    strTxt.Append("<li>");
                    //    strTxt.Append("<a class='hover' href=\"" + dr["WebUrl"] + "\">");
                    //    strTxt.Append("</a>");
                    //    strTxt.Append("</li>\n");
                    //}
                    //else
                    //{
                       
                        strTxt.Append("<a target=\"_blank\" href=\"" + dr["WebUrl"] + "\">");
                        strTxt.Append(dr["Title"].ToString());
                        strTxt.Append("</a>" + "&nbsp;&nbsp;");
                       
                    //}
                }
            }
            return strTxt.ToString();
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。