コード例 #1
0
        private void BtnForward_Click(object sender, EventArgs e)
        {
            IT_Support it = new IT_Support();

            connection.Open();
            OracleCommand cmd = new OracleCommand("redirect", connection);

            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.Parameters.Add("id_ticket", OracleDbType.Int32).Value          = textIDTicket.Text;
            cmd.Parameters.Add("angajat_adresat", OracleDbType.Varchar2).Value = textAsgnNameIT.Text;
            cmd.ExecuteNonQuery();
            connection.Close();
            this.Hide();
            it.Show();
        }
コード例 #2
0
ファイル: IT_Support.cs プロジェクト: CameliaMitran/CS-App
        private void BtnTickets_Click(object sender, EventArgs e)
        {
            /* connection.Open();
            *  OracleCommand cmd = new OracleCommand("afisare_tickete", connection);
            *  cmd.CommandType = System.Data.CommandType.StoredProcedure;
            *  cmd.Parameters.Add("registru", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
            *
            *  OracleDataAdapter adapter = new OracleDataAdapter();
            *  adapter.SelectCommand = cmd;
            *  DataTable dataTable = new DataTable();
            *  adapter.Fill(dataTable);
            *  dataGridViewTickets.DataSource = dataTable;
            *
            *  connection.Close();*/
            IT_Support it = new IT_Support();

            it.Show();
        }
コード例 #3
0
        private void BtnUpdate_Click(object sender, EventArgs e)
        {
            IT_Support it = new IT_Support();

            connection.Open();
            OracleCommand cmd = new OracleCommand("actualizare_suport_it", connection);

            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.Parameters.Add("id_ticket", OracleDbType.Int32).Value = textIDTicket.Text;
            cmd.Parameters.Add("stare", OracleDbType.Varchar2).Value  = comboStateIT.GetItemText(comboStateIT.SelectedItem);
            cmd.ExecuteNonQuery();
            OracleCommand cmd1 = new OracleCommand("actualizare_ticket", connection);

            cmd1.CommandType = System.Data.CommandType.StoredProcedure;
            cmd1.Parameters.Add("id_ticket", OracleDbType.Int32).Value  = textIDTicket.Text;
            cmd1.Parameters.Add("cost_aprox", OracleDbType.Int32).Value = textCostIT.Text;
            cmd1.ExecuteNonQuery();
            MessageBox.Show("The ticket was successfully updated :)");
            connection.Close();
            this.Hide();
            it.Show();
        }