Esempio n. 1
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            string sex = "";

            if (radioButtonMan.Checked == true)
            {
                sex = "男";
            }
            if (radioButtonWoman.Checked == true)
            {
                sex = "女";
            }
            mysql = "update user_info set uname='" + textBoxName.Text + "', sex='" + sex + "' , desire='" + textBoxDesire.Text + "' , describe='" + textBoxDescribe.Text + "' where umail='" + 登录界面.mail + "'";
            SqlCommand mycmd = new SqlCommand(mysql, myconn);

            myconn.Open();
            try
            {
                mycmd.ExecuteNonQuery();
                MessageBox.Show("修改成功!", "提示");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            myconn.Close();

            EditGroupBox.SendToBack();
            NoticeBox.SendToBack();
            InfoGroupBox.BringToFront();
            fill_info(登录界面.mail);
        }
Esempio n. 2
0
        private void EditButton_Click(object sender, EventArgs e)
        {
            EditGroupBox.BringToFront();

            /*InfoGroupBox.Hide();
            *  CVGroupBox.Hide();
            *  RecordGroupBox.Hide();
            *  EditGroupBox.Show();*/
        }
Esempio n. 3
0
 private void EditButton_Click(object sender, EventArgs e)
 {
     InfoGroupBox.SendToBack();
     EditGroupBox.BringToFront();
     radioButtonMan.Checked = true;
     textBoxMail.Text       = 登录界面.mail;
     textBoxName.Text       = labelUname2.Text;
     textBoxDesire.Text     = labelDesire.Text;
     textBoxDescribe.Text   = labelDesc.Text;
     if (labelSex.Text == "男")
     {
         radioButtonMan.Checked = true;
     }
     if (labelSex.Text == "女")
     {
         radioButtonWoman.Checked = true;
     }
 }