private void inti() { try { nit.User u = new nit.User(Session["usercode"].ToString()); String[] temp = u._getInfo().Split(','); username.Text = temp[0]; email.Text = temp[2]; phonenumber.Text = temp[1]; if (temp[3].Equals("ali")) { inputPaymentMethod.SelectedIndex = 1; } if (temp[3].Equals("ten")) { inputPaymentMethod.SelectedIndex = 2; } if (temp[3].Equals("un")) { inputPaymentMethod.SelectedIndex = 0; } Confirm.Text = temp[4]; QQ.Text = temp[5]; } catch (Exception) { Response.Redirect("../HomePage.aspx"); throw; } }
protected void submit_Click(object sender, EventArgs e) { nit.User u = new nit.User(Session["usercode"].ToString()); if (u.confirm()) { Response.Write("<script>alert('用户已认证!');location.href='../Users/User.aspx'</script>"); } }
protected void Unnamed_Click(object sender, EventArgs e) { nit.User u = new nit.User(Session["usercode"].ToString()); if (u._userPay(Session["usercode"].ToString(), payin.Text)) { Response.Write("<script>alert('充值成功!');</script>"); } }
private void init() { nit.User u = new nit.User(Session["usercode"].ToString()); String[] temp = u._getInfo().Split(','); if (temp[4].Equals("是")) { Response.Write("<script>alert('用户已认证!');location.href='../Users/User.aspx'</script>"); //Response.Redirect("../Users/User.aspx"); } }
protected void confirm_Click(object sender, EventArgs e) { nit.User u = new nit.User(Session["usercode"].ToString()); String[] temp = new String[3]; temp[1] = Session["usercode"] + "," + username.Text + "," + phonenumber.Text + "," + email.Text + "," + "ali" + "," + Confirm.Text + "," + QQ.Text; temp[2] = Session["usercode"] + "," + username.Text + "," + phonenumber.Text + "," + email.Text + "," + "ten" + "," + Confirm.Text + "," + QQ.Text; temp[0] = Session["usercode"] + "," + username.Text + "," + phonenumber.Text + "," + email.Text + "," + "un" + "," + Confirm.Text + "," + QQ.Text; if (u.userInfoChange(temp[inputPaymentMethod.SelectedIndex])) { Response.Write("<script>alert('修改成功!');</script>"); Response.Redirect("../Users/User.aspx"); } }
protected void Unnamed_Click(object sender, EventArgs e) { nit.User u = new nit.User(Session["usercode"].ToString()); if (u._userPwd(oldpwd.Text, newpwd.Text)) { Response.Write("<script>alert('密码已修改!');location.href='../Users/User.aspx'</script>"); } else { Response.Write("<script>alert('密码修改失败,请检查原密码!')"); } }
private void init() { try { nit.User u = new nit.User(Session["usercode"].ToString()); money.Text = u._userPay() + " Yuan"; MyBike.Text = u._userBike(); MyCoin.Text = u._userCoin(); } catch (Exception) { Response.Redirect("../HomePage.aspx"); throw; } }