Пример #1
0
    public void RaiseCallbackEvent(string eventArgument)
    {
        if (!string.IsNullOrEmpty(eventArgument))
           {
           if (eventArgument != "0")
           {

               B_Column column = new B_Column();
               int chid = int.Parse(eventArgument);
               DataTable dt = column.GetFormatListItemByChannelId(chid);
               foreach (DataRow row in dt.Rows)
               {
                   _result += row["ColName"].ToString();
                   _result += ",";
                   _result += row["ColId"].ToString();
                   _result += "|";
               }
               if (_result == "")
               {
                   _result = _result.Substring(0, _result.Length - 1);
               }
               //_result = _result.Substring(0, _result.Length - 1);
           }
           }
    }
Пример #2
0
    void BindData()
    {
        ddlParent.DataSource = Bll.GetChannelByType(modelId);
        ddlParent.DataTextField = "ChName";
        ddlParent.DataValueField = "ChId";
        ddlParent.DataBind();
        ddlParent.Items.Insert(0,new ListItem("当前频道","0"));

        int chId = int.Parse(ddlParent.SelectedValue);
        B_Column column = new B_Column();
        ddlChild.DataSource = column.GetFormatListItemByChannelId(chId);
        ddlChild.DataTextField = "ColName";
        ddlChild.DataValueField = "ColId";
        ddlChild.DataBind();
        ddlChild.Items.Insert(0, new ListItem("当前栏目", "0"));
        ddlChild.Items.Insert(1, new ListItem("所有栏目", "all"));
    }
Пример #3
0
    void BindData()
    {
        ddlParent.DataSource = bll.GetList(false);
        ddlParent.DataTextField = "ChName";
        ddlParent.DataValueField = "ChId";
        ddlParent.DataBind();

        #region 首页栏目导航频道
        ddlNavChannel.DataSource = bll.GetList(false);
        ddlNavChannel.DataTextField = "ChName";
        ddlNavChannel.DataValueField = "ChId";
        ddlNavChannel.DataBind();
        #endregion

        #region 文字头条频道与栏目
        ddlChHeader.DataSource = bll.GetChannelByType(1);
        ddlChHeader.DataTextField = "ChName";
        ddlChHeader.DataValueField = "ChId";
        ddlChHeader.DataBind();
        #endregion

        #region 图片头条
        ddlPicChHeader.DataSource = bll.GetChannelByType(1);
        ddlPicChHeader.DataTextField = "ChName";
        ddlPicChHeader.DataValueField = "ChId";
        ddlPicChHeader.DataBind();
        #endregion

        int chId = int.Parse(ddlParent.SelectedValue);

        B_Column column = new B_Column();
        ddlChild.DataSource = column.GetFormatListItemByChannelId(chId);
        ddlChild.DataTextField = "ColName";
        ddlChild.DataValueField = "ColId";
        ddlChild.DataBind();
        ddlChild.Items.Insert(0, new ListItem("当前栏目", "0"));
        ddlChild.Items.Insert(1, new ListItem("所有栏目", "all"));

        #region 文字头条频道与栏目
        ddlCoHeader.DataSource = column.GetFormatListItemByChannelId(chId);
        ddlCoHeader.DataTextField = "ColName";
        ddlCoHeader.DataValueField = "ColId";
        ddlCoHeader.DataBind();
        #endregion

        #region 文字头条
        ddlPicCoHeader.DataSource = column.GetFormatListItemByChannelId(chId);
        ddlPicCoHeader.DataTextField = "ColName";
        ddlPicCoHeader.DataValueField = "ColId";
        ddlPicCoHeader.DataBind();
        #endregion
    }
Пример #4
0
    void BindData()
    {
        ddlParent.DataSource = Bll.GetChannelByType(modelId);
        ddlParent.DataTextField = "ChName";
        ddlParent.DataValueField = "ChId";
        ddlParent.DataBind();

        ddlCh.DataSource = Bll.GetList(false);
        ddlCh.DataTextField = "ChName";
        ddlCh.DataValueField = "ChId";
        ddlCh.DataBind();
        if (ddlParent.Items.Count > 0)
        {
            int chId = int.Parse(ddlParent.SelectedValue);
            B_Column column = new B_Column();
            ColumnList.DataSource = column.GetFormatListItemByChannelId(chId);
            ColumnList.DataTextField = "ColName";
            ColumnList.DataValueField = "ColId";
            ColumnList.DataBind();

            lbColumn.DataSource = column.GetFormatListItemByChannelId(int.Parse(ddlCh.SelectedValue.ToString()));
            lbColumn.DataTextField = "ColName";
            lbColumn.DataValueField = "ColId";
            lbColumn.DataBind();
        }
    }
Пример #5
0
    void BindData()
    {
        ddlParent.DataSource = Bll.GetChannelByType(modelId);
        ddlParent.DataTextField = "ChName";
        ddlParent.DataValueField = "ChId";
        ddlParent.DataBind();

        if (ddlParent.SelectedValue == null || ddlParent.SelectedValue.Length == 0)
        {
            Response.Write("<script>alert('你所在的模型还没添加频道,不能指定子类标签')</script>");
        }
        else
        {
            int chId = int.Parse(ddlParent.SelectedValue);
            B_Column column = new B_Column();
            ddlChild.DataSource = column.GetFormatListItemByChannelId(chId);
            ddlChild.DataTextField = "ColName";
            ddlChild.DataValueField = "ColId";
            ddlChild.DataBind();
            ddlChild.Items.Insert(0, new ListItem("当前栏目", "0"));
        }
    }