Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["UserName"] == null)
         {
             this.Response.Redirect("../UserRegister/Login.aspx");
         }
         else
         {
             btnSubmit.Enabled = false;
             PerInf_information  Infomation = new PerInf_information();
             StoreUser           Userinfo   = new StoreUser();
             StoreUserController Getinfo    = new StoreUserController();
             Userinfo.UserName = Session["UserName"].ToString();
             string[] lTemp = Getinfo.GetInfo(Userinfo);
             if (lTemp[11] != null)
             {
                 tbxTrueName.Text    = lTemp[11];
                 tbxTrueName.Enabled = false;
             }
             if (lTemp[4] != null)
             {
                 if (lTemp[4] == "0")
                 {
                     rbtnMen.Checked = true;
                 }
                 else
                 {
                     rbtnWoman.Checked = true;
                 }
             }
             if (lTemp[8] == "1")
             {
                 rbtnAddress1.Checked = true;
             }
             else
             {
                 if (lTemp[9] == "1")
                 {
                     rbtnAddress2.Checked = true;
                 }
                 else
                 {
                     if (lTemp[10] == "1")
                     {
                         rbtnAddress3.Checked = true;
                     }
                 }
             }
             tbxAddress1.Text = lTemp[0];
             tbxAddress2.Text = lTemp[1];
             tbxAddress3.Text = lTemp[2];
             tbxNickName.Text = lTemp[3];
             tbxAge.Text      = lTemp[5];
             tbxPhone.Text    = lTemp[6];
             tbxQQ.Text       = lTemp[7];
         }
     }
 }