private void button3_Click(object sender, EventArgs e) { admin2 a2 = new admin2(); a2.Show(); this.Hide(); }
private void button6_Click(object sender, EventArgs e) { if (textBox1.Text.Length == 0) { MessageBox.Show("PLEASE SELECT VIDEO TO DELETE"); } else { string connetionString = "Provider=OraOLEDB.Oracle;Data Source=orcl;User Id=bms;Password=bmscse;"; OleDbConnection connection = new OleDbConnection(connetionString); string sql2 = "delete from media where id='" + textBox1.Text + "'"; OleDbDataAdapter dataadapter = new OleDbDataAdapter(sql2, connection); connection.Open(); OleDbCommand cmd = new OleDbCommand(sql2, connection); cmd.ExecuteNonQuery(); MessageBox.Show("Record Deleted"); connection.Close(); admin2 gg = new admin2(); gg.Show(); this.Hide(); } }