public object pasarListaDetalleCapacitacion(DetalleCapacitacion detalle, int presente)
        {
            dynamic result = null;

            try
            {
                var dyParam = new OracleDynamicParameters();

                dyParam.Add("cd_id", OracleDbType.Int32, ParameterDirection.Input, presente);
                dyParam.Add("cd_asiste", OracleDbType.Int32, ParameterDirection.Input, detalle.capacitacionAsiste);



                var conn = this.GetConnection();
                if (conn.State == ConnectionState.Closed)
                {
                    conn.Open();
                }

                if (conn.State == ConnectionState.Open)
                {
                    var query = "SP_PASA_LISTA_CD";
                    result = SqlMapper.Query(conn, query, param: dyParam, commandType: CommandType.StoredProcedure);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
        public object insertDetalleCapacitacion(DetalleCapacitacion detalle)
        {
            dynamic result = null;

            try
            {
                var dyParam = new OracleDynamicParameters();

                dyParam.Add("cd_participante", OracleDbType.Varchar2, ParameterDirection.Input, detalle.capacitacionParticipante);
                dyParam.Add("cd_correo", OracleDbType.Varchar2, ParameterDirection.Input, detalle.capacitacionCorreo);
                dyParam.Add("c_capacitacion_id", OracleDbType.Varchar2, ParameterDirection.Input, detalle.capacitacionId);



                var conn = this.GetConnection();
                if (conn.State == ConnectionState.Closed)
                {
                    conn.Open();
                }

                if (conn.State == ConnectionState.Open)
                {
                    var query = "SP_INSERT_DET_CAP";

                    result = SqlMapper.Query(conn, query, param: dyParam, commandType: CommandType.StoredProcedure);
                    enviarMail(detalle.capacitacionParticipante, detalle.capacitacionCorreo, detalle.capacitacionId);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
        public ActionResult PasarLista([FromBody] DetalleCapacitacion capacitacion, int id)
        {
            var result = capacitacionDetalle.pasarListaDetalleCapacitacion(capacitacion, id);

            if (result == null)
            {
                return(NotFound());
            }

            return(Ok(result));
        }
        public ActionResult InsertCapacitacion([FromBody] DetalleCapacitacion capacitacion)
        {
            var result = capacitacionDetalle.insertDetalleCapacitacion(capacitacion);

            if (result == null)
            {
                return(NotFound());
            }

            return(Ok(result));
        }