Files
Asegasa.NET/guia/Extensiones/enumeraciones.vb
2026-04-28 11:52:16 +02:00

37 lines
1.2 KiB
VB.net

Partial Public Class enumeraciones
Public ReadOnly Property CodigoDescripcion As String
Get
Return Me.Codigo.Split(".")(1) & " - " & Me.Descripcion
End Get
End Property
Public Property ValorEntero1 As Integer?
Get
If Me.ValorNumerico1.HasValue Then
Return CInt(Me.ValorNumerico1.Value)
Else
Return Nothing
End If
End Get
Set(value As Integer?)
If Me.ValorNumerico1.HasValue Then
Me.ValorNumerico1 = CDbl(value)
Else
Me.ValorNumerico1 = Nothing
End If
End Set
End Property
Private Shared _LConfsi As List(Of enumeraciones)
Public Shared ReadOnly Property LConfsi As List(Of enumeraciones)
Get
If _LConfsi Is Nothing Then
Dim bd = bdGestionAsegasa.gestionasegasaEntities.NuevoContextoCN()
_LConfsi = bd.enumeraciones.Where(Function(x) x.Codigo.StartsWith("VF.SI-")).OrderByDescending(Function(x) x.Fecha1).ToList
End If
Return _LConfsi
End Get
End Property
End Class