void loads(string Accounts) { PersonalSelectBLL usb = new PersonalSelectBLL(); this.Head_portrait.ImageUrl = "~/images/" + usb.PersonalSelectedBLL(Accounts)[0].Head_portrait; this.UserName.Text = usb.PersonalSelectedBLL(Accounts)[0].UserName; this.Registration_time.Text = usb.PersonalSelectedBLL(Accounts)[0].Registration_time.ToString(); this.Province_City.Text = usb.PersonalSelectedBLL(Accounts)[0].Province + " " + usb.PersonalSelectedBLL(Accounts)[0].City; this.Personal_note.Text = usb.PersonalSelectedBLL(Accounts)[0].Personal_note; }
//加载信息 void loads(string Accounts) { PersonalSelectBLL usb = new PersonalSelectBLL(); this.Phone.Text = usb.PersonalSelectedBLL(Accounts)[0].Phone; this.UserName.Text = usb.PersonalSelectedBLL(Accounts)[0].UserName; string sex = usb.PersonalSelectedBLL(Accounts)[0].Gender.ToString().Trim(); if (sex == "男") { this.RadioButton1.Checked = true; } else { this.RadioButton2.Checked = true; } this.URL.Text = usb.PersonalSelectedBLL(Accounts)[0].URL; this.Personal_note.Text = usb.PersonalSelectedBLL(Accounts)[0].Personal_note; //省市选择 this.DropDownList1.DataSource = usb.PersonalSelectedBLL(Accounts); this.DropDownList1.DataTextField = "Province"; this.DropDownList1.DataBind(); this.DropDownList2.DataSource = usb.PersonalSelectedBLL(Accounts); this.DropDownList2.DataTextField = "City"; this.DropDownList2.DataBind(); }
//修改密码 protected void Unnamed4_Click(object sender, EventArgs e) { Accounts = Request.Cookies["userName"].Value; PersonalSelectBLL usb = new PersonalSelectBLL(); if (this.rdPhone.Text == usb.PersonalSelectedBLL(Accounts)[0].Phone) { PersonalUpdateBLL usup = new PersonalUpdateBLL(); if (usup.UpdateUserspwd(this.rdPWD.Text, Accounts)) { ClientScript.RegisterStartupScript(this.GetType(), "zixunSucess", "<script>alert('修改成功!');</script> "); } else { ClientScript.RegisterStartupScript(this.GetType(), "zixunSucess", "<script>alert('修改失败!');</script> "); } } else { ClientScript.RegisterStartupScript(this.GetType(), "zixunSucess", "<script>alert('手机号码不正确!');</script> "); } loads(Accounts); }