Esempio n. 1
0
        private void compbutton_Click(object sender, EventArgs e)
        {
            stumarksupdate ss = new stumarksupdate();

            ss.Show();
            this.Hide();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            string oradb = "Data Source=localhost;User Id=DBMS;Password=DBMS;";

            if (MessageBox.Show("DO YOU REALLY WANT TO DELETE THE MARKS ????", "CONFIRM", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                string cmdText = "DELETE from student_marks WHERE sid  = :ID";
                using (OracleConnection conn = new OracleConnection(oradb))
                    using (OracleCommand cmd = new OracleCommand(cmdText, conn))
                    {
                        conn.Open();
                        cmd.Parameters.Add("ID", SID1.Text);
                        cmd.ExecuteNonQuery();
                    }
                MessageBox.Show("DELETED MARKS");
                stumarksupdate su = new stumarksupdate();
                su.Show();
                this.Hide();
            }
        }