Ejemplo n.º 1
0
        //private void BindArea()
        //{
        //    BindProvince();
        //    BindCity();
        //    BindCounty();
        //}
        ////省
        //private void BindProvince()
        //{
        //    dpProvince.DataSource = memberservice.GetProveice();
        //    dpProvince.DataTextField = "provincename";
        //    dpProvince.DataValueField = "dictprovinceid";
        //    dpProvince.DataBind();
        //    dpProvince.Items.Insert(0, new ListItem("选择省份", "-1"));
        //}
        ////市
        //private void BindCity()
        //{
        //    string pro = dpProvince.SelectedValue;
        //    if (pro != "-1")
        //    {
        //        dpCity.DataSource = memberservice.GetCity(pro);
        //        dpCity.DataTextField = "cityname";
        //        dpCity.DataValueField = "dictcityid";
        //        dpCity.DataBind();
        //    }
        //    dpCity.Items.Insert(0, new ListItem("选择市", "-1"));
        //}
        ////县/区
        //private void BindCounty()
        //{
        //    string city = dpCity.SelectedValue;
        //    if (city != "-1")
        //    {
        //        dpCounty.DataSource = memberservice.GetCounty(city);
        //        dpCounty.DataTextField = "countyname";
        //        dpCounty.DataValueField = "dictcountyid";
        //        dpCounty.DataBind();
        //    }
        //    dpCounty.Items.Insert(0, new ListItem("选择县/区", "-1"));
        //}
        ////选择省份
        //protected void dpProvince_SelectedIndexChanged(object sender, EventArgs e)
        //{
        //    dpCity.Items.Clear();
        //    BindCity();

        //    dpCounty.Items.Clear();
        //    BindCounty();
        //}
        ////选择市
        //protected void dpCity_SelectedIndexChanged(object sender, EventArgs e)
        //{
        //    dpCounty.Items.Clear();
        //    BindCounty();
        //}
        #endregion
        /// <summary>
        ///  输入会员名查找会员
        /// </summary>
        private void SelectMember()
        {
            Dictmember m = new Dictmember();

            m.Realname = tbxmember.Text.Trim();
            List <Dictmember> memberlist = memberservice.GetDictmemberList(m);

            if (memberlist.Count == 0)
            {
                MessageBoxShow("没有搜索到匹配的会员!");
                tbxmember.Text = string.Empty;
                tbxmember.Focus();
                return;
            }
            else if (memberlist.Count == 1)
            {
                SetMemberInfo(memberlist[0]);
                GetAge();
                tbxmember.Text = string.Empty;
            }
            else
            {
                GridMember.DataSource = memberlist;
                GridMember.DataBind();
                winMemberSelect.Hidden = false;
            }
        }
Ejemplo n.º 2
0
 /// <summary>选择会员
 /// 选择会员
 /// </summary>
 private void SelectMember()
 {
     if (Request.Form["__EVENTTARGET"] == tbxmember.ClientID && Request.Form["__EVENTARGUMENT"] == "specialkey")
     {
         Dictmember m = new Dictmember();
         m.Realname = tbxmember.Text.Trim();
         List <Dictmember> memberlist = memberservice.GetDictmemberList(m);
         if (memberlist.Count == 0)
         {
             MessageBoxShow("没有搜索到匹配的会员!");
             tbxmember.Text = string.Empty;
             return;
         }
         else if (memberlist.Count == 1)
         {
             Dictmember member = memberlist[0];
             tbxmember.Text = member.Dictmemberid.ToString();
             tbxName.Text   = member.Realname;
         }
         else
         {
             GridMember.DataSource = memberlist;
             GridMember.DataBind();
             winMemberSelect.Hidden = false;
         }
     }
 }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GridMember.DataBind();
         CouncileName();
     }
 }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin"] != null && Session["user"] == null)
     {
         string query = @"SELECT [user_id]
                           ,[user_uName]
                           ,[user_fName]
                           ,[user_lName]
                           ,[user_Email]
                           ,[user_Phone]
                           ,[user_Password]
                           ,[user_type]
                       FROM [dbo].[User]";
         GridMember.DataSource = DB.GetData(query);
         GridMember.DataBind();
     }
     else
     {
         Response.Redirect("~/");
     }
 }