2026-01-30-v2
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Data.Entity
|
||||
Public Class dxwCuentas
|
||||
Friend _bd As tscGrupoSanchoToro
|
||||
Private _idEjercicio As Integer
|
||||
Public idCuenta As Integer
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
If gc.CurrentItem IsNot Nothing Then
|
||||
idCuenta = DirectCast(gc.CurrentItem, bdGrupoSanchoToro.db.vf_cuentas).idCuenta
|
||||
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 dxwEntidades_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Try
|
||||
teBusqueda.Focus()
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Public Sub New(bd As m3academiaEntities, Existentes As List(Of Integer?))
|
||||
Public Sub New(bd As tscGrupoSanchoToro, idEjercicio As Integer)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
_bd = bd
|
||||
_idEjercicio = idEjercicio
|
||||
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
|
||||
|
||||
|
||||
|
||||
Private Sub btBuscar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Dim ctas As List(Of bdGrupoSanchoToro.db.vf_cuentas)
|
||||
Try
|
||||
If Not DXSplashScreen.IsActive Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Cargando Datos ...")
|
||||
Dim TextoBusqueda = Me.teBusqueda.Text.Trim
|
||||
Dim ExpresionBusqueda As String = ""
|
||||
If TextoBusqueda <> "" Then
|
||||
'Dim CamposBusquedaNumericos() As String = {"TotalDebe", "TotalHaber"}
|
||||
Dim CamposBusquedaAlfabeticos() As String = {"Denominacion", "Mote"}
|
||||
Dim CamposBusquedaAlfabeticosPorComienzo() As String = {"NumeroCuenta"}
|
||||
ExpresionBusqueda = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, Nothing, CamposBusquedaAlfabeticos, Nothing, CamposBusquedaAlfabeticosPorComienzo)
|
||||
End If
|
||||
ctas = bdGrupoSanchoToro.db.vf_cuentas.Obtiene_vf_cuentas(_bd, {_idEjercicio}, 8, ExpresionBusqueda)
|
||||
DXSplashScreen.Close()
|
||||
Select Case ctas.Count
|
||||
Case 0
|
||||
DXMessageBox.Show("No se han encontrado cuentas con los datos suministrados", "Atención")
|
||||
Case 1
|
||||
idCuenta = ctas.First.idCuenta
|
||||
Me.DialogResult = True
|
||||
Me.Close()
|
||||
Case Else
|
||||
Me.gc.ItemsSource = ctas
|
||||
Me.gc.Focus()
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
' If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user