Пример #1
0
 /// <summary>
 /// 栏目列表
 public bool ChildChannel(string strwhere)
 {
     bool result = false;
     DataTable dt = new BLL.channels.category().GetList(0, strwhere, "sort_id asc,id desc ").Tables[0];//一级
     if (dt.Rows.Count > 0 && dt.Rows != null)
     {
         result = true;
     }
     return result;
 }
Пример #2
0
        /// <summary>
        /// 栏目列表
        public bool ChildChannel(string strwhere)
        {
            bool      result = false;
            DataTable dt     = new BLL.channels.category().GetList(0, strwhere, "sort_id asc,id desc ").Tables[0];//一级

            if (dt.Rows.Count > 0 && dt.Rows != null)
            {
                result = true;
            }
            return(result);
        }
Пример #3
0
 /// <summary>
 /// 重写虚方法,此方法将在Init事件前执行
 /// </summary>
 protected override void ShowPage()
 {
     Model.contents.article_category model = new BLL.channels.category().GetModel(this.category_id);
     if (model != null)
     {
         string            _name       = model.call_index;
         string            _class_list = model.class_list;
         string            _key        = BasePage.pageUrl(model.model_id);
         string            _where      = "status=0 and  category_id=" + this.category_id;
         DataRowCollection list        = new BasePage().get_article_list(_name, page, _where, out totalcount, out pagelist, _key, this.category_id, "__id__").Rows;
         vh.Put("channel_id", category_id);
         vh.Put("list", list);
         vh.Put("page", pagelist);
         vh.Display("../Template/newList.html");
     }
 }
Пример #4
0
 /// <summary>
 /// 文章分页列表
 public DataTable get_article_list(string channel_name, int page_index, string strwhere, out int totalcount, out string pagelist, string _key, params object[] _params)
 {
     DataTable dt = new DataTable();
     if (!string.IsNullOrEmpty(channel_name))
     {
         int pagesize = new BLL.channels.category().GetPageSize(channel_name); //自动获得频道分页数量
         dt = new BLL.channels.article().GetList(pagesize, page_index, strwhere, "sort_id asc,add_time desc", out totalcount).Tables[0];
         pagelist = Utils.OutPageList(pagesize, page_index, totalcount, linkurl(_key, _params), 8);
     }
     else
     {
         totalcount = 0;
         pagelist = "";
     }
     return dt;
 }
Пример #5
0
 /// <summary>
 /// 重写虚方法,此方法将在Init事件前执行
 /// </summary>
 protected override void ShowPage()
 {
     Model.contents.article_category model = new BLL.channels.category().GetModel(this.category_id);
     if (model != null)
     {
         string _name = model.call_index;
         string _class_list = model.class_list;
         string _key = BasePage.pageUrl(model.model_id);
         string _where = "status=0 and  category_id=" + this.category_id;
         DataRowCollection list = new BasePage().get_article_list(_name, page, _where, out totalcount, out pagelist, _key, this.category_id, "__id__").Rows;
         vh.Put("channel_id", category_id);
         vh.Put("list", list);
         vh.Put("page", pagelist);
         vh.Display("../Template/newList.html");
     }
 }
Пример #6
0
        /// <summary>
        /// 文章分页列表
        public DataTable get_article_list(string channel_name, int page_index, string strwhere, out int totalcount, out string pagelist, string _key, params object[] _params)
        {
            DataTable dt = new DataTable();

            if (!string.IsNullOrEmpty(channel_name))
            {
                int pagesize = new BLL.channels.category().GetPageSize(channel_name); //自动获得频道分页数量
                dt       = new BLL.channels.article().GetList(pagesize, page_index, strwhere, "sort_id asc,add_time desc", out totalcount).Tables[0];
                pagelist = Utils.OutPageList(pagesize, page_index, totalcount, linkurl(_key, _params), 8);
            }
            else
            {
                totalcount = 0;
                pagelist   = "";
            }
            return(dt);
        }
Пример #7
0
 /// <summary>
 /// 栏目列表
 public DataTable GetChannel(string strwhere)
 {
     DataTable  dt = new BLL.channels.category().GetList(0, strwhere, "sort_id asc,id desc ").Tables[0];//一级
     return dt;
 }
Пример #8
0
        /// <summary>
        /// 栏目列表
        public DataTable GetChannel(string strwhere)
        {
            DataTable dt = new BLL.channels.category().GetList(0, strwhere, "sort_id asc,id desc ").Tables[0]; //一级

            return(dt);
        }