agregado procesos y bd clases
This commit is contained in:
54
guia/Extensiones/documentospolizassg.vb
Normal file
54
guia/Extensiones/documentospolizassg.vb
Normal file
@@ -0,0 +1,54 @@
|
||||
Partial Public Class documentospolizassg
|
||||
Public Property DocumentoComprobado As Boolean
|
||||
Get
|
||||
Return Me.FechaComprobacion.HasValue
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value Then
|
||||
Me.FechaComprobacion = Now
|
||||
Me.idUsuarioComprueba = Utilidades.dsc.idUsuario
|
||||
Else
|
||||
Me.FechaComprobacion = Nothing
|
||||
Me.idUsuarioComprueba = Nothing
|
||||
End If
|
||||
Me.OnPropertyChanged("idUsuarioComprueba")
|
||||
Me.OnPropertyChanged("FechaComprobacion")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared Sub GeneraDocumentosASolicitar(bd As gestionasegasaEntities, Poliza As polizassg, Optional idDocsASolicitar As List(Of Integer) = Nothing)
|
||||
Dim das As List(Of documentosasolicitar)
|
||||
If idDocsASolicitar IsNot Nothing Then
|
||||
das = bd.documentosasolicitar.Where(Function(x) idDocsASolicitar.Contains(x.idDocumento)).ToList
|
||||
Else
|
||||
das = bd.documentosasolicitar.Where(Function(x) x.idRamo = Poliza.idRamo).ToList
|
||||
End If
|
||||
|
||||
Dim idDomiciliacion = bd.enumeraciones.First(Function(x) x.Codigo = "TIPP.BA").idEnumeracion
|
||||
For Each d In das
|
||||
Dim dp = New documentospolizassg
|
||||
Poliza.documentospolizassg.Add(dp)
|
||||
dp.Descripcion = d.enumeraciones.Descripcion
|
||||
dp.idDocumentoASolicitar = d.idDocumento
|
||||
dp.Obligatorio = d.Obligatorio
|
||||
dp.Fecha = Date.Now
|
||||
If d.enumeraciones.Codigo = "DOCRAM.MDTO" And Poliza.idTipoPago <> idDomiciliacion Then
|
||||
dp.Obligatorio = False
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property DescripcionTipo
|
||||
Get
|
||||
Return DirectCast(Tipo, TipoDocumentoEnum).ToString.Replace("_", " ")
|
||||
End Get
|
||||
End Property
|
||||
Public Enum TipoDocumentoEnum As Integer
|
||||
DESCONOCIDO = 0
|
||||
PÓLIZA = 1
|
||||
CARTA_SUPLEMENTO = 2
|
||||
CERTIFICADO_SEGURO = 3
|
||||
RECIBO = 10
|
||||
OTROS = 100
|
||||
End Enum
|
||||
End Class
|
||||
Reference in New Issue
Block a user