Web.UI/DownLoad.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using cosmos.Common;


namespace cosmos.Web.UI
{
   public  class DownLoad
    {
        /// <summary>
        /// 推荐下载
        /// </summary>
        /// <param name="top">显示条数</param>
        /// <param name="txtNum">标题字数</param>
        /// <param name="isTime">是否显示时间</param>
        /// <param name="chrico">标题前符号</param>
        /// <param name="strWhere">查询条件</param>
        /// <param name="orderby">排序条件</param>
        /// <returns></returns>
        public static string ViewTxtList2(int top, int txtNum, int isTime, string chrico, string strWhere, string orderby)
        {
            cosmos.BLL.Downloads bll = new cosmos.BLL.Downloads();
            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];
                    strTxt.Append("<li>");
                    if (isTime == 1)
                    {
                        strTxt.Append("<span>[" + string.Format("{0:MM-dd}", dr["AddTime"]) + "]</span>");
                    }
                    strTxt.Append(chrico);
                    strTxt.Append("<a target=\"_blank\" title=\"" + dr["Title"].ToString() + "\" href=\"DownLoadView.aspx?id=" + dr["Id"] + "\">" + Utils.CutString(dr["Title"].ToString(), txtNum) + "</a>");
                    strTxt.Append("</li>\n");
                }
            }
            else
            {
                strTxt.Append("<div>暂无数据显示...</div>");
            }
            return strTxt.ToString();
        }
    }
}

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

AI 解读 AI

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

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