Exemplo n.º 1
0
        //Opening Non Teaching Staff page when click on Non teaching staff button
        private void button3_Click(object sender, EventArgs e)
        {
            Non_Teaching_Admission nad = new Non_Teaching_Admission();

            this.Hide();
            nad.ShowDialog();
        }
Exemplo n.º 2
0
        //Creating Next sequence value
        void sequencenextval()
        {
            //Creating Next sequence value
            string           str    = "DATA SOURCE=localhost:1521/xe; USER ID=IMS;password=enteryourchoice";
            OracleConnection con    = new OracleConnection(str);
            string           query  = "Select NONTEACHERSEQ.nextval from DUAL";
            string           query1 = "select PERSONSEQ.nextval from DUAL";

            OracleCommand    cmd = new OracleCommand(query, con);
            OracleCommand    cmd1 = new OracleCommand(query1, con);
            OracleDataReader rdr, rdr1;

            try
            {
                con.Open();
                rdr  = cmd.ExecuteReader();
                rdr1 = cmd1.ExecuteReader();
                rdr.Read();
                rdr1.Read();
                MessageBox.Show("Record Inserted Successfully");
                Non_Teaching_Admission tsa = new Non_Teaching_Admission();
                this.Hide();
                tsa.ShowDialog();
                con.Close();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                del();
            }
        }