Example #1
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();
        }
Example #2
0
        /// <summary>
        /// 设置模版编号
        /// </summary>
        /// <returns></returns>
        public string SetNumId(string type)
        {
            DataSet ds = bll.GetList(0, "Num like '%" + type + "%'", "Num desc");

            if (ds.Tables[0].Rows.Count > 0)
            {
                int num = int.Parse(ds.Tables[0].Rows[0]["Num"].ToString().Replace(type, string.Empty));

                return(type + (num + 1).ToString().PadLeft(8, '0'));
            }
            else
            {
                return(type + 1.ToString().PadLeft(8, '0'));
            }
        }