Esempio n. 1
0
        private void TreeBind()
        {
            DataTable table = new Rain.BLL.channel().GetList(0, "", "sort_id asc,id desc").Tables[0];

            this.ddlChannel.Items.Clear();
            this.ddlChannel.Items.Add(new ListItem("所有频道", ""));
            foreach (DataRow row in (InternalDataCollectionBase)table.Rows)
            {
                this.ddlChannel.Items.Add(new ListItem(row["title"].ToString(), row["name"].ToString()));
            }
        }
Esempio n. 2
0
        protected void rptList_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            Rain.BLL.channel channel = new Rain.BLL.channel();
            if (e.Item.ItemType != ListItemType.AlternatingItem && e.Item.ItemType != ListItemType.Item)
            {
                return;
            }
            Repeater control = (Repeater)e.Item.FindControl("rptChannel");
            int      int32   = Convert.ToInt32(((DataRowView)e.Item.DataItem)["id"]);

            control.DataSource = (object)channel.GetList(0, "site_id=" + (object)int32, "sort_id asc,id desc");
            control.DataBind();
        }
Esempio n. 3
0
        public DataTable GetList(int parent_id, string channel_name)
        {
            int channelId = new channel().GetChannelId(channel_name);

            return(this.dal.GetList(parent_id, channelId));
        }