Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            intent = "";
            foreach (Control c in groupBox1.Controls)
            {
                if (c is CheckBox)
                {
                    CheckBox r = c as CheckBox;
                    if (r.Checked)
                    {
                        intent += r.Text + ",";
                    }
                }
            }
            mysql = "update user_info set desire='" + intent + "' where umail='" + 注册界面.user_email + "'";
            SqlCommand mycmd = new SqlCommand(mysql, myconn);

            myconn.Open();
            {
                try
                {
                    mycmd.ExecuteNonQuery();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }
            myconn.Close();
            Hide();
            登录界面 f_log = new 登录界面();

            f_log.Owner = this.Owner;
            f_log.ShowDialog();
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Hide();
            登录界面 f_log = new 登录界面();

            f_log.Owner = this;
            f_log.ShowDialog();
        }