Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            GetConnection();
            DataGridViewRow dr     = dataGridView1.SelectedRows[0];
            string          id     = dr.Cells[0].Value.ToString();
            string          passwd = dr.Cells[1].Value.ToString();
            string          sql    = "delete from user where id='" + id + "' and passwd='" + passwd + "'";
            MySqlCommand    cmd    = new MySqlCommand(sql, conn);

            conn.Open();
            cmd.ExecuteNonQuery();
            conn.Close();
            MessageBox.Show("회원이 삭제되었습니다.");
            Hide();
            UserAdmin user = new UserAdmin();

            user.ShowDialog();
            Close();
        }