コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            con.Open();

            MySqlCommand cmd = con.CreateCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "update  elev set Nume = '" + numeTextBox.Text + "' , Prenume =  '"
                              + prenumeTextBox.Text + "' , Varsta = '" + varstaTextBox.Text +
                              "' where Nume = '" + numeInitialTextBox.Text + "'";

            cmd.ExecuteNonQuery();
            //  MessageBox.Show("elev updated successfully");

            Form1 form = new Form1();

            form.DisplayElev();

            con.Close();

            Close();
        }