예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            viewDepartment vd = new viewDepartment();

            vd.ShowDialog();
            this.Show();
        }
        private void button5_Click(object sender, EventArgs e)
        {
            OracleCommand cmd = new OracleCommand();

            cmd.Connection  = conn;
            cmd.CommandText = "insert into department(dept_id,name,hod_name,office_no) values(" + textBox2.Text + ",'" + textBox1.Text + "','" + textBox3.Text + "'," + textBox4.Text + ")";
            cmd.CommandType = CommandType.Text;
            viewDepartment f = new viewDepartment();
            String         a = textBox1.Text;

            f.comboBox1.Items.Add(item: a);
            f.AddDept(a);
            cmd.ExecuteNonQuery();
            label2.Show();
        }