Пример #1
0
        private void btn_Update_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            UpdateForm dlgUpdate = new UpdateForm(this);

            dlgUpdate.ShowDialog();

            if (dlgUpdate.DialogResult == DialogResult.OK)
            {
                conn = new MySqlConnection(strConn);
                conn.Open();
                cmd = new MySqlCommand("", conn);

                string sql = "UPDATE user_info SET ";
                sql            += " upw='" + LoginForm.upw + "', ";
                sql            += " uadress='" + dlgUpdate.tb_Adress.Text + "', uphone1='" + dlgUpdate.tb_Phone1.Text + "', ";
                sql            += " uphone2='" + dlgUpdate.tb_Phone2.Text + "', uphone3='" + dlgUpdate.tb_Phone3.Text + "' ";
                sql            += " WHERE uid='" + dlgUpdate.tb_userID.Text + "'";
                cmd.CommandText = sql;
                cmd.ExecuteNonQuery();

                this.Visible = true;
                MessageBox.Show("회원정보수정이 완료되었습니다.\n다시 로그인해주세요.");
                btn_Logout.PerformClick();
            }
            else if (dlgUpdate.DialogResult == DialogResult.Cancel)
            {
                this.Visible = true;
            }
        }
Пример #2
0
 public ImageProcessing(UpdateForm form)
 {
     InitializeComponent();
     this.updateForm = form;
 }