From 56975dd840d17fcd6d00b1dd5ff41cdcfc59a086 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 28 Jul 2025 19:02:34 +0200 Subject: [PATCH] - 2025-07-28 1.0.9 Correccion ObtenerValorDesdeNombre --- Utilidades.vb | 15 ++++++++------- tsUtilidades.vbproj | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Utilidades.vb b/Utilidades.vb index 7d54cc8..427c9c6 100644 --- a/Utilidades.vb +++ b/Utilidades.vb @@ -803,6 +803,14 @@ Public Class Utilidades Next Return sb.ToString() End Function + Public Shared Function ObtenerValorDesdeNombre(Of TEnum As Structure)(nombre As String) As Integer? + Dim resultado As TEnum + If [Enum].TryParse(nombre, True, resultado) Then + Return Convert.ToInt32(resultado) + End If + Return Nothing ' Devuelve Nothing si no hay coincidencia + End Function + End Class Public Class DescripcionValor Property Descripcion As String @@ -836,13 +844,6 @@ Public Class DescripcionValor Return lista End Function - Public Shared Function ObtenerValorDesdeNombre(Of TEnum As Structure)(nombre As String) As Integer? - Dim resultado As TEnum - If [Enum].TryParse(nombre, True, resultado) Then - Return Convert.ToInt32(resultado) - End If - Return Nothing ' Devuelve Nothing si no hay coincidencia - End Function End Class diff --git a/tsUtilidades.vbproj b/tsUtilidades.vbproj index 52f4c89..3d7edfa 100644 --- a/tsUtilidades.vbproj +++ b/tsUtilidades.vbproj @@ -16,11 +16,12 @@ net8.0 tsUtilidades net8.0, libreria - 1.0.8 + 1.0.9 Manuel Tecnosis S.A Utilidades varias Entity Framework compatibles con EF Core 8. + - 2025-07-28 1.0.9 Correccion ObtenerValorDesdeNombre - 2025-07-28 1.0.8 Correccion ObtenerValorDesdeNombre - 2025-07-28 1.0.7 Nueva función de ObtenerValorDesdeNombre - 2025-07-22 1.0.6 Nuevas funciones de encriptartexto y desencriptartexto