153 lines
5.5 KiB
VB.net
153 lines
5.5 KiB
VB.net
Imports System.Data.Entity
|
|
Imports DevExpress.Xpf.Core.ServerMode
|
|
Imports bdGrupoSanchoToro
|
|
Imports DevExpress.Xpf.Core
|
|
Imports DevExpress.XtraReports.UserDesigner
|
|
Imports DevExpress.XtraReports.UI
|
|
Imports System.IO
|
|
Imports tsl5.Datos
|
|
Imports tsWPF
|
|
Imports tsWPF.Comun
|
|
Imports tsWPFCore.Comun
|
|
Imports tsWPFCore
|
|
Imports tsUtilidades
|
|
|
|
Imports bdGrupoSanchoToro.db
|
|
Imports bdGrupoSanchoToro.db.Utilidades
|
|
|
|
Public Class ucBancos
|
|
|
|
Private bd As tscGrupoSanchoToro
|
|
|
|
|
|
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
|
Get
|
|
Return "Bancos"
|
|
End Get
|
|
End Property
|
|
|
|
Public Overrides ReadOnly Property DescripcionRegistro As String
|
|
Get
|
|
Return "Bancos"
|
|
End Get
|
|
End Property
|
|
|
|
Public Overrides ReadOnly Property NombreTablaBase As String
|
|
Get
|
|
Return "bancos"
|
|
End Get
|
|
End Property
|
|
|
|
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
|
End Sub
|
|
|
|
Public Overrides Sub EstableceTitulo()
|
|
Me.docpanel.Caption = "Bancos"
|
|
End Sub
|
|
|
|
Public Overrides Sub Cargado()
|
|
ContenedorAplicacion.siEstado.IsVisible = False
|
|
ContenedorAplicacion.btNuevo.IsVisible = False
|
|
ContenedorAplicacion.btGuardar.IsVisible = True
|
|
End Sub
|
|
|
|
Public Overrides Function EstableceDCPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As EstadosAplicacion
|
|
Dim bancos = (From b In bd.bancos Select b)
|
|
Me.gc.ItemsSource = bancos
|
|
Return EstadosAplicacion.AplicacionSinIndice
|
|
End Function
|
|
|
|
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
|
bd = tscGrupoSanchoToro.NuevoContexto()
|
|
Return bd
|
|
End Function
|
|
|
|
'Public Overrides Function ObtieneConexionBD() As BBDD
|
|
' Return bdGrupoSanchoToro.gestionasegasaEntities.bdga
|
|
'End Function
|
|
|
|
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
|
Return Comun.ObtienePermisos(Me.bd, "AP.CONTABILIDAD", idUsuario)
|
|
End Function
|
|
|
|
Private Sub tvBancos_InitNewRow(sender As Object, e As DevExpress.Xpf.Grid.InitNewRowEventArgs)
|
|
gc.SetCellValue(e.RowHandle, "Codigo", "")
|
|
gc.SetCellValue(e.RowHandle, "Nombre", "")
|
|
gc.SetCellValue(e.RowHandle, "BIC", "")
|
|
gc.SetCellValue(e.RowHandle, "Obsoleto", False)
|
|
End Sub
|
|
'Private WithEvents apCL As tsWPF.ApCabLin
|
|
|
|
'Public ReadOnly Property CampoIndice As String Implements tsWPF.IApCabLin.CampoIndice
|
|
' Get
|
|
' Return ""
|
|
' End Get
|
|
'End Property
|
|
|
|
'Public Sub EstableceApCabLin(ApCabLin As tsWPF.ApCabLin) Implements tsWPF.IApCabLin.EstableceApCabLin
|
|
' Me.apCL = ApCabLin
|
|
'End Sub
|
|
|
|
''Public Sub EstableceDataContext(ByRef DataContext As Object, ByRef CampoIndice As String, ValorCampoIndice As Object) Implements tsWPF.IApCabLin.EstableceDataContext
|
|
'' Try
|
|
'' Dim bancos = (From b In bd.bancos Select b)
|
|
'' DataContext = bancos
|
|
'' Me.gc.ItemsSource = bancos
|
|
'' 'Dim gp = (From e In bd.enumeraciones Select e Where e.gruposenumeraciones.Grupo = "CA").ToList
|
|
'' 'Me.cbCentroAcademico.ItemsSource = gp
|
|
'' Me.apCL.Estado = tsWPF.EstadosCablin.SinDatos
|
|
'' Catch ex As Exception
|
|
'' MsgBox(ex.Message)
|
|
'' End Try
|
|
''End Sub
|
|
|
|
'Public ReadOnly Property NombreTablaBase As String Implements tsWPF.IApCabLin.NombreTablaBase
|
|
' Get
|
|
' Return "bancos"
|
|
' End Get
|
|
'End Property
|
|
|
|
'Public Function ObtieneContexto(dcn As tsl5.Datos.DatosConexionCliente) As System.Data.Objects.ObjectContext Implements tsWPF.IApCabLin.ObtieneContexto
|
|
' bd = bdGrupoSanchoToro.gestionasegasaEntities.NuevoContexto
|
|
' Return bd
|
|
'End Function
|
|
|
|
'Public Function ObtienePermisos() As tsWPF.Permisos Implements tsWPF.IApCabLin.ObtienePermisos
|
|
' Return bdGrupoSanchoToro.utilidades.ObtienePermisos(Me.bd, "AP.BANCOS", Me.apCL.dsc.idUsuario)
|
|
'End Function
|
|
|
|
'Public Function ObtieneTituloPestaña() As String Implements tsWPF.IApCabLin.ObtieneTituloPestaña
|
|
' Return "Bancos"
|
|
'End Function
|
|
|
|
'Public ReadOnly Property Titulo As String Implements tsWPF.IApCabLin.Titulo
|
|
' Get
|
|
' Return "Bancos"
|
|
' End Get
|
|
'End Property
|
|
|
|
'Private Sub apCL_Cargado() Handles apCL.Cargado
|
|
' Dim btNuevo = (From it In Me.apCL.ContenedorCL.BarraBotones.Bars(0).ItemLinks Where it.Name = "ilNuevo").First
|
|
' btNuevo.IsVisible = False
|
|
' Dim btEstado = (From it In Me.apCL.ContenedorCL.BarraBotones.Bars(0).ItemLinks Where it.Name = "ilEstado").First
|
|
' btEstado.IsVisible = False
|
|
'End Sub
|
|
'Private Sub tvBancos_InitNewRow(sender As Object, e As DevExpress.Xpf.Grid.InitNewRowEventArgs)
|
|
' gc.SetCellValue(e.RowHandle, "Codigo", "")
|
|
' gc.SetCellValue(e.RowHandle, "Nombre", "")
|
|
' gc.SetCellValue(e.RowHandle, "BIC", "")
|
|
' gc.SetCellValue(e.RowHandle, "Obsoleto", False)
|
|
'End Sub
|
|
|
|
'Public Sub EstableceOrigenDatosAuxiliares(Optional BackGround As Boolean = False) Implements tsWPF.IApCabLin.EstableceOrigenDatosAuxiliares
|
|
|
|
'End Sub
|
|
|
|
'Public Function ObtieneDataContext(ValorCampoIndice As Object, Optional BackGround As Boolean = False) As Object Implements tsWPF.IApCabLin.ObtieneDataContext
|
|
' Dim bancos = (From b In bd.bancos Select b)
|
|
' Me.gc.ItemsSource = bancos
|
|
' Me.apCL.Estado = tsWPF.EstadosCablin.SinDatos
|
|
' Return bancos
|
|
'End Function
|
|
End Class
|