Пример #1
0
        /// <summary>
        /// 绑定预订类型
        /// </summary>
        private void bindCatalog()
        {
            Model.wx_userweixin           weixin   = GetWeiXinCode();
            BLL.wx_book_catalog           cataBll  = new wx_book_catalog();
            IList <Model.wx_book_catalog> cataList = cataBll.GetModelList("wid=" + weixin.id);

            ddlCatalog.DataTextField  = "cTitle";
            ddlCatalog.DataValueField = "id";
            ddlCatalog.DataSource     = cataList;
            ddlCatalog.DataBind();
            ddlCatalog.Items.Insert(0, new ListItem("请选择预订类型", "0"));
        }
Пример #2
0
        /// <summary>
        /// 绑定预订类型
        /// </summary>
        private void bindCatalog(string _action)
        {
            Model.wx_userweixin           weixin   = GetWeiXinCode();
            BLL.wx_book_catalog           cataBll  = new wx_book_catalog();
            IList <Model.wx_book_catalog> cataList = cataBll.GetModelList("wid=" + weixin.id);

            ddlCatalog.DataTextField  = "cTitle";
            ddlCatalog.DataValueField = "id";
            ddlCatalog.DataSource     = cataList;
            ddlCatalog.DataBind();
            if (string.IsNullOrEmpty(_action) || _action == MXEnums.ActionEnum.Add.ToString())
            {
                ddlCatalog.SelectedValue = catalogId.ToString();
            }
        }