private void button3_Click(object sender, EventArgs e) { databaseConnection x = new databaseConnection(); x.open(); x.insert(int.Parse(label4.Text), textBox2.Text, textBox3.Text, comboBox2.Text, pictureBox2.Image); x.close(); }
private void button3_Click(object sender, EventArgs e) { databaseConnection x = new databaseConnection(); x.open(); try { x.insert(int.Parse(label4.Text), textBox2.Text, textBox3.Text, comboBox2.Text, pictureBox2.Image); } catch (Exception ex) { MessageBox.Show(ex.Message); } x.close(); }