Beispiel #1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void info()
        {
            Spread.BLL.Goods bllGoods = new Spread.BLL.Goods();
            Spread.BLL.Article bllArticle = new Spread.BLL.Article();

            DataTable dt = bllGoods.GetList(6, "IsHot=1 ", "ID ASC").Tables[0];
            Article = bllArticle.GetList(6, " ", "a.AddTime DESC").Tables[0];
            Goods = dt;
        }
Beispiel #2
0
        private void Info()
        {
            Spread.BLL.Article bllArticle = new Spread.BLL.Article();
            if (Id > 0)
            {
                DataTable dt = bllArticle.GetList(1, "Id=" + Id + "", "ID ASC").Tables[0];
                if (dt.Rows.Count > 0)
                {
                    lbtitle.Text = dt.Rows[0]["Title"].ToString();
                    lbMenu.Text = " > <a class=\"col-01\" href=\"/Content.aspx?id=" + dt.Rows[0]["ID"].ToString() + "\">" + dt.Rows[0]["Title"].ToString() + "</a>";
                    this.Article = dt;
                }

            }
        }
Beispiel #3
0
        public string MenuInfo()
        {
            StringBuilder html = new StringBuilder();
            Spread.BLL.Article bllArticle = new Spread.BLL.Article();
            DataTable dt = bllArticle.GetList(10, "ClassId=31", "ID Desc").Tables[0];
            if (dt.Rows.Count > 0)
            {
                html.Append("<ul>");
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    html.Append("<li> <a href=\"/Content.aspx?id=" + dt.Rows[i]["ID"].ToString() + "\">" + dt.Rows[i]["Title"].ToString() + "</a>");
                   
                    html.Append("</li>");
                }
            }
            return html.ToString();

        }
Beispiel #4
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void info()
 {
     Spread.BLL.Article_type bllArticletype = new Spread.BLL.Article_type();
     Spread.BLL.Article bllArticle = new Spread.BLL.Article();
     Count = bllArticle.GetCount("ClassId=" + type + "");
     Article = bllArticle.GetList("ClassId=" + type + "").Tables[0];
     DataTable dt = bllArticletype.GetList(6, " ", "Id ASC").Tables[0];
     strMenu += "<ul class=\"cf\">";
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         if (dt.Rows[i]["Id"].ToString() == type)
         {
             strMenu += "<li class=\"cur\"><a href=\"Default.aspx?page=1&type=" + dt.Rows[i]["ID"] + "\" >" + dt.Rows[i]["Title"] + "</a></li>";
         }
         else
         {
             strMenu += "<li ><a href=\"Default.aspx?page=1&type=" + dt.Rows[i]["ID"] + "\" >" + dt.Rows[i]["Title"] + "</a></li>";
         }
     }
     strMenu += "</ul>";
 }