Agregar archivos de proyecto.
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
|
||||
Public Class dxwPoblaciones
|
||||
Friend CodigoMunicipio As String
|
||||
' Friend CodigoPostal As String
|
||||
' Private _CodigoPostal As String
|
||||
Friend _bd As tscGrupoSanchoToro
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
If gc.CurrentItem IsNot Nothing Then
|
||||
CodigoMunicipio = DirectCast(gc.CurrentItem, municipios).CodigoMunicipio
|
||||
Me.DialogResult = True
|
||||
Me.Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Me.DialogResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub dxwPoblaciones_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Try
|
||||
|
||||
Me.gc.ItemsSource = _bd.municipios.Include(Function(x) x.CodigoProvinciaNavigation).OrderBy(Function(x) x.Nombre).ToList
|
||||
Me.gc.View.SearchControl.Focus()
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Public Sub New(bd As m3academiaEntities, Existentes As List(Of Integer?))
|
||||
Public Sub New(bd As tscGrupoSanchoToro)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
Comun.EscalaVentana(Me, Me.grid.LayoutTransform)
|
||||
|
||||
_bd = bd
|
||||
' _existentes = Existentes
|
||||
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub dxw_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles Me.PreviewKeyDown
|
||||
If e.Key = Key.Enter Then
|
||||
btAceptar_Click(Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tv_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs) Handles tv.MouseDoubleClick
|
||||
btAceptar_Click(Nothing, Nothing)
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user