Beispiel #1
0
        private void GenerarID()
        {
            Controlador.Conexion conexion = new Controlador.Conexion();
            OracleConnection     conn     = new OracleConnection();

            conn = conexion.getConn();

            conn.Open();

            OracleCommand comando = new OracleCommand("SELECT COUNT(ID_DEPARTAMENTO) FROM DEPARTAMENTO", conn);


            int i = Convert.ToInt32(comando.ExecuteScalar());

            conn.Close();
            i++;

            TxtId.Text = i.ToString();
        }
        private void GenerarID()
        {
            Controlador.Conexion conexion = new Controlador.Conexion();
            OracleConnection     conn     = new OracleConnection();

            conn = conexion.getConn();

            conn.Open();

            OracleCommand comando = new OracleCommand("SELECT COUNT(ID_FLUJO_TAREA) FROM FLUJO_TAREA", conn);


            int i = Convert.ToInt32(comando.ExecuteScalar());

            conn.Close();
            i++;

            IDPiola.Text = i.ToString();
        }
Beispiel #3
0
        public DataSet consultar(string consultaSQL)
        {
            Controlador.Conexion conexion = new Controlador.Conexion();
            OracleConnection     conn     = new OracleConnection();

            conn = conexion.getConn();

            conn.Open();

            OracleCommand     comando = new OracleCommand(consultaSQL, conn);
            OracleDataAdapter da      = new OracleDataAdapter(comando);
            DataSet           ds      = new DataSet();

            da.Fill(ds);

            conn.Clone();

            return(ds);
        }
        public DataTable dtFuncionario()
        {
            DataTable dt = new DataTable();

            Controlador.Conexion conexion = new Controlador.Conexion();
            OracleConnection     conn     = new OracleConnection();

            conn = conexion.getConn();

            conn.Open();
            OracleCommand comando = new OracleCommand("ListarTareasAdministrador", conn);

            comando.CommandType = System.Data.CommandType.StoredProcedure;
            comando.Parameters.Add("ListarTarea", OracleDbType.RefCursor).Direction = System.Data.ParameterDirection.Output;
            OracleDataAdapter adaptador = new OracleDataAdapter(comando);

            adaptador.Fill(dt);
            adaptador.Dispose();

            return(dt);
        }