private void button1_Click_1(object sender, EventArgs e) { string sql = "delete from Student where ID = " + Convert.ToInt16(comboBox1.Text.ToString()) + ""; SQLConn db = new SQLConn(); bool verify = db.manipulateData(sql); if (verify == false) { MessageBox.Show("Some ERROR occured!"); } else { MessageBox.Show("Record has sucessfully updated!"); } this.Close(); }
private void button1_Click_1(object sender, EventArgs e) { string sql = "insert into Student values('" + textBox1.Text + "','" + textBox2.Text + "')"; SQLConn db = new SQLConn(); bool verify = db.manipulateData(sql); if (verify == false) { MessageBox.Show("Some ERROR occured!"); } else { MessageBox.Show("Record has sucessfully added!"); } this.Close(); }