diff --git a/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwAsientosModelo.xaml b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwAsientosModelo.xaml new file mode 100644 index 0000000..8e31ccb --- /dev/null +++ b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwAsientosModelo.xaml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwAsientosModelo.xaml.vb b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwAsientosModelo.xaml.vb new file mode 100644 index 0000000..6b3114c --- /dev/null +++ b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwAsientosModelo.xaml.vb @@ -0,0 +1,54 @@ + +Imports bdGrupoSanchoToro +Imports bdGrupoSanchoToro.db +Imports DevExpress.Xpf.Core +Imports System.Data.Entity +Public Class dxwAsientosModelo + Friend _bd As tscGrupoSanchoToro + Public idAsientoModelo As Integer + + Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs) + If gc.CurrentItem IsNot Nothing Then + idAsientoModelo = DirectCast(gc.CurrentItem, asientosmodelos).idAsientoModelo + 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 + If Not DXSplashScreen.IsActive Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)() + DXSplashScreen.SetState("Cargando Datos ...") + Me.gc.ItemsSource = _bd.asientosmodelos.OrderBy(Function(x) x.Descripcion).ToList + Catch ex As Exception + 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() + _bd = bd + + 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 diff --git a/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwConceptosPredefinidos.xaml b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwConceptosPredefinidos.xaml new file mode 100644 index 0000000..a2e3aed --- /dev/null +++ b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwConceptosPredefinidos.xaml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwConceptosPredefinidos.xaml.vb b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwConceptosPredefinidos.xaml.vb new file mode 100644 index 0000000..f07c067 --- /dev/null +++ b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwConceptosPredefinidos.xaml.vb @@ -0,0 +1,87 @@ + +Imports tsl5.Extensiones +Imports bdGrupoSanchoToro +Imports DevExpress.Xpf.Core +Imports System.Data.Entity +Imports bdGrupoSanchoToro.db +Public Class dxwConceptosPredefinidos + Friend _bd As tscGrupoSanchoToro + Public idConcepto As Integer + + Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs) + If gc.CurrentItem IsNot Nothing Then + idConcepto = DirectCast(gc.CurrentItem, conceptosapuntes).idConcepto + 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 dxw_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded + Try + teBusqueda.Focus() + Catch ex As Exception + 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() + _bd = bd + + 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) + Try + DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)() + DXSplashScreen.SetState("Cargando Datos ...") + Dim TextoBusqueda = Me.teBusqueda.Text.Trim + Dim ExpresionBusqueda As String = "" + If TextoBusqueda <> "" Then + Dim CamposBusquedaAlfabeticos() As String = {"Codigo", "Concepto"} + ExpresionBusqueda = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, Nothing, CamposBusquedaAlfabeticos, Nothing, Nothing) + End If + Dim ctos As List(Of conceptosapuntes) + If ExpresionBusqueda <> "" Then + Dim parametros(0) As Object + ctos = _bd.conceptosapuntes.Where(ExpresionBusqueda, parametros).OrderBy(Function(x) x.Concepto).ToList + Else + ctos = _bd.conceptosapuntes.Where(Function(X) X.Concepto <> "").OrderBy(Function(x) x.Concepto).ToList + End If + DXSplashScreen.Close() + Select Case ctos.Count + Case 0 + DXMessageBox.Show("No se han encontrado conceptos con los datos suministrados", "Atención") + Case 1 + idConcepto = ctos.First.idConcepto + Me.DialogResult = True + Me.Close() + Case Else + Me.gc.ItemsSource = ctos + Me.gc.Focus() + End Select + Catch ex As Exception + If DXSplashScreen.IsActive Then DXSplashScreen.Close() + End Try + End Sub +End Class diff --git a/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwCuentas.xaml b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwCuentas.xaml new file mode 100644 index 0000000..88ed660 --- /dev/null +++ b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwCuentas.xaml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwCuentas.xaml.vb b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwCuentas.xaml.vb new file mode 100644 index 0000000..b006509 --- /dev/null +++ b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/dxwCuentas.xaml.vb @@ -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 diff --git a/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/ucApuntes.xaml b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/ucApuntes.xaml new file mode 100644 index 0000000..cb465d1 --- /dev/null +++ b/GestionGrupoSanchoToro/Contabilidad/Aplicaciones/ucApuntes.xaml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + +