Esempio n. 1
0
        /// <summary>
        /// 绑定门店城市
        /// </summary>
        void BindCity()
        {
            DataSet ds = bllcity.GetList(0, "ParentId=0 and StateInfo=1", "SortNum desc,Id desc");

            foreach (DataRow item in ds.Tables[0].Rows)
            {
                ddlCity.Items.Add(new ListItem(item["Title"].ToString(), item["Id"].ToString()));
            }

            DataSet dsSub = bllcity.GetList(0, "StateInfo=1 and ParentId=" + ds.Tables[0].Rows[0]["Id"].ToString(), "SortNum desc,Id desc");

            foreach (DataRow item in dsSub.Tables[0].Rows)
            {
                ddlSubCity.Items.Add(new ListItem(item["Title"].ToString(), item["Id"].ToString()));
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 绑定门店城市以及默认默认门店
        /// </summary>
        void BindStoreCity()
        {
            DataSet ds = bllStoreCity.GetList(0, "StateInfo=1 and ParentId!=0", "SortNum desc");

            repStoreCity.DataSource = ds;
            repStoreCity.DataBind();

            DataSet dsStore = bllStore.GetList(0, "StateInfo=1 and IsIndex=1 and City=" + ds.Tables[0].Rows[0]["Id"].ToString(), "SortNum desc,AddTime desc");

            repStore.DataSource = dsStore;
            repStore.DataBind();
        }
Esempio n. 3
0
        public static string SetChange(string cid)
        {
            Leadin.BLL.StoreCity bllcity1 = new Leadin.BLL.StoreCity();
            DataSet       ds      = bllcity1.GetList(0, "StateInfo=1 and ParentId=" + cid, "SortNum desc,Id desc");
            StringBuilder strHtml = new StringBuilder();

            foreach (DataRow item in ds.Tables[0].Rows)
            {
                strHtml.Append("<option value=\"" + item["Id"].ToString() + "\">" + item["Title"].ToString() + "</option>");
            }
            return(strHtml.ToString());
        }
Esempio n. 4
0
        /// <summary>
        /// 绑定顶级城市
        /// </summary>
        void BindType()
        {
            System.Data.DataSet ds = blltype.GetList(0, "ParentId=0", "SortNum desc");


            foreach (System.Data.DataRow item in ds.Tables[0].Rows)
            {
                ddlType.Items.Add(new ListItem(item["Title"].ToString(), item["Id"].ToString()));
            }


            if (!string.IsNullOrEmpty(Request.Params["typeid"]))
            {
                ddlType.SelectedValue = Request.Params["typeid"];
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 绑定类别列表
        /// </summary>
        void BindRepList()
        {
            System.Text.StringBuilder strWhere = new System.Text.StringBuilder();

            strWhere.Append("ParentId=0");

            if (!string.IsNullOrEmpty(Request.Params["key"]))
            {
                strWhere.Append(" and Title like '%" + Request.Params["key"] + "%'");
                txtKey.Text = Request.Params["key"];
            }



            repList.DataSource = bll.GetList(strWhere.ToString());
            repList.DataBind();
        }