2026-01-30 03
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
Imports tsl5.Extensiones
|
||||
Imports tsUtilidades.Extensiones
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Data.Entity
|
||||
|
||||
@@ -7,7 +7,7 @@ Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Linq.Dynamic
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPF
|
||||
Imports tsWPF.Comun
|
||||
Imports tsWPFCore.Comun
|
||||
@@ -220,7 +220,7 @@ Public Class ApunteExtracto
|
||||
Property idAsiento As Integer
|
||||
Property NumeroAsiento As String
|
||||
Property Concepto As String
|
||||
Property Fecha As Date?
|
||||
Property Fecha As DateOnly?
|
||||
Property Debe As Double
|
||||
Property Haber As Double
|
||||
Property Saldo As Double
|
||||
|
||||
@@ -11,9 +11,9 @@ Imports tsWPF.modExtensiones
|
||||
Imports System.Data.Common
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports tsl5.Extensiones
|
||||
Imports tsUtilidades.Extensiones
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPF.Comun
|
||||
Imports bdGrupoSanchoToro.db
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Imports bdGrupoSanchoToro
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Linq.Dynamic
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPFCore
|
||||
Imports tsWPFCore.Comun
|
||||
Imports bdGrupoSanchoToro.db
|
||||
|
||||
@@ -7,7 +7,7 @@ Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Linq.Dynamic
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPF
|
||||
Imports DevExpress.Data
|
||||
Imports tsWPF.Comun
|
||||
|
||||
@@ -7,7 +7,7 @@ Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Linq.Dynamic
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPF
|
||||
Imports DevExpress.Data
|
||||
Imports tsWPF.Comun
|
||||
@@ -53,7 +53,7 @@ Public Class ucBalanceSumasYSaldos
|
||||
End Sub
|
||||
Private _Nivel As Integer
|
||||
Public Overrides Sub Cargado()
|
||||
_Nivel = CInt(Rutinas.Ttagi(Me.OtrosParametros, "OPAR"))
|
||||
_Nivel = CInt(tsUtilidades.Utilidades.Ttagi(Me.OtrosParametros, "OPAR"))
|
||||
Dim Ejercicios = bd.ejercicioscontables.OrderByDescending(Function(x) x.FechaInicio).ToList
|
||||
Dim ejab = Ejercicios.Where(Function(x) x.FechaCierre Is Nothing)
|
||||
deFechaInicio.EditValue = ejab.OrderBy(Function(x) x.FechaInicio).First.FechaInicio
|
||||
|
||||
@@ -5,7 +5,7 @@ Imports DevExpress.Xpf.Core
|
||||
Imports DevExpress.XtraReports.UserDesigner
|
||||
Imports DevExpress.XtraReports.UI
|
||||
Imports System.IO
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPF
|
||||
Imports tsWPF.Comun
|
||||
Imports tsWPFCore.Comun
|
||||
@@ -107,7 +107,7 @@ Public Class ucBancos
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public Function ObtieneContexto(dcn As tsl5.Datos.DatosConexionCliente) As System.Data.Objects.ObjectContext Implements tsWPF.IApCabLin.ObtieneContexto
|
||||
'Public Function ObtieneContexto(dcn As tsUtilidades.Datos.DatosConexionCliente) As System.Data.Objects.ObjectContext Implements tsWPF.IApCabLin.ObtieneContexto
|
||||
' bd = bdGrupoSanchoToro.gestionasegasaEntities.NuevoContexto
|
||||
' Return bd
|
||||
'End Function
|
||||
|
||||
@@ -7,11 +7,11 @@ Imports DevExpress.Xpf.Editors.Helpers
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Data.Common
|
||||
Imports System.Data.Entity
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports System.Collections
|
||||
Imports tsl5.Extensiones
|
||||
Imports tsUtilidades.Extensiones
|
||||
Imports System.Data.Objects.DataClasses
|
||||
Imports tsWPFCore.Comun
|
||||
Imports tsWPFCore
|
||||
|
||||
@@ -128,7 +128,7 @@ Public Class ucConceptosApuntes
|
||||
Public Async Sub ObtieneConceptosApuntesAsync(Background As Boolean)
|
||||
Try
|
||||
Dim rs As New List(Of conceptosapuntes)
|
||||
Dim Busqueda = tsl5.Extensiones.ObjetoNothingAVacio(Me.teBusqueda.EditValue)
|
||||
Dim Busqueda As String = Me.teBusqueda.EditValue.ToString
|
||||
If Background Then
|
||||
Me.ContenedorAplicacion.IsEnabled = False
|
||||
Await Task.Run(Sub()
|
||||
|
||||
@@ -11,8 +11,8 @@ Imports System.Data.Entity
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports tsl5.Datos
|
||||
Imports tsl5.Extensiones.StringExtensions
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsUtilidades.Extensiones.StringExtensions
|
||||
Imports tsWPFCore.Comun
|
||||
Imports tsUtilidades
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Linq.Dynamic
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPF
|
||||
Imports tsWPF.Comun
|
||||
Imports tsWPFCore.Comun
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPF;component/Plantillas.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
|
||||
@@ -1,25 +1,19 @@
|
||||
Option Strict Off
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports DevExpress.Xpf.LayoutControl
|
||||
Imports tsWPF
|
||||
Imports tsWPFCore
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data
|
||||
Imports DevExpress.Xpf.Editors.Validation
|
||||
Imports DevExpress.Xpf.Editors.Helpers
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPF.modExtensiones
|
||||
Imports tsWPFCore.modExtensiones
|
||||
Imports System.Data.Common
|
||||
Imports System.Data.Entity
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports tsl5.Extensiones
|
||||
Imports bdGrupoSanchoToro.apuntes
|
||||
Imports tsUtilidades.Extensiones
|
||||
Imports bdGrupoSanchoToro.db.apuntes
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports tsl5.Datos
|
||||
Imports System.Windows.Media.Animation
|
||||
Imports tsWPF.Comun
|
||||
Imports tsWPFCore.Comun
|
||||
Imports tsWPFCore
|
||||
Imports tsUtilidades
|
||||
|
||||
Imports bdGrupoSanchoToro.db
|
||||
@@ -105,8 +99,8 @@ Public Class ucDiario
|
||||
If FuerzaNuevo OrElse _idAsiento Is Nothing Then
|
||||
|
||||
ra = New asientos
|
||||
ra.Fecha = Today ' If(uEc.FechaFin > Now.Date, Now.Date, uEc.FechaFin)
|
||||
ra.FechaIntroduccion = Now
|
||||
ra.Fecha = DateOnly.FromDateTime(Today) ' If(uEc.FechaFin > Now.Date, Now.Date, uEc.FechaFin)
|
||||
ra.FechaIntroduccion = DateOnly.FromDateTime(Now)
|
||||
Dim uEc = bd.ejercicioscontables.FirstOrDefault(Function(x) x.FechaInicio <= ra.Fecha And x.FechaFin >= ra.Fecha And x.FechaCierre Is Nothing)
|
||||
If uEc Is Nothing Then
|
||||
uEc = bd.ejercicioscontables.Where(Function(x) x.FechaCierre Is Nothing).OrderByDescending(Function(x) x.FechaInicio).First
|
||||
@@ -117,7 +111,7 @@ Public Class ucDiario
|
||||
ra.Tipo = bdGrupoSanchoToro.db.asientos.TipoAsiento.NORMAL
|
||||
ra.Punteado = False
|
||||
NuevoEstado = EstadosAplicacion.Nuevo
|
||||
ra.usuarios = bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.Utilidades.dsc.idUsuario)
|
||||
ra.idUsuarioNavigation = bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario)
|
||||
Else
|
||||
ra = bd.asientos.First(Function(x) x.idAsiento = _idAsiento)
|
||||
NuevoEstado = EstadosAplicacion.ModificandoRegistro
|
||||
@@ -156,13 +150,12 @@ Public Class ucDiario
|
||||
If ra.apuntes.Any(Function(x) x.TipoDocumento.HasValue AndAlso (x.TipoDocumento = TiposDocumentos.FACTURA And x.NumeroDocumento.NothingAVacio = "")) Then
|
||||
hte.Add("Almacenar-FaltaNumeroDocumento", "Es obligatorio meter el nº de documento en los apuntes de tipo factura")
|
||||
End If
|
||||
ra.Fecha = ra.Fecha.Date
|
||||
Dim ej = bd.ejercicioscontables.FirstOrDefault(Function(x) x.FechaInicio <= ra.Fecha And x.FechaFin >= ra.Fecha And x.FechaCierre.HasValue = False)
|
||||
If ej Is Nothing Then
|
||||
hte.Add("Almacenar-EjercicioNoAbiertooCerrado", "El ejercicio según la fecha del asiento no se ha abierto o ya se cerró")
|
||||
End If
|
||||
If Estado = EstadosAplicacion.Nuevo Then
|
||||
ra.FechaIntroduccion = tsl5.bbdd.AhoraSqlServer(bd)
|
||||
ra.FechaIntroduccion = DateOnly.FromDateTime(Now)
|
||||
ra.idUsuario = idUsuario
|
||||
End If
|
||||
If hte.Count > 0 Then
|
||||
@@ -190,8 +183,7 @@ Public Class ucDiario
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "fecha"
|
||||
|
||||
Dim NuevaFecha As DateOnly = e.Value
|
||||
NuevaFecha = NuevaFecha.Date
|
||||
Dim NuevaFecha As DateOnly = DateOnly.FromDateTime(e.Value)
|
||||
If NuevaFecha <> ra.Fecha Then
|
||||
Dim Ejercicios = bd.ejercicioscontables.ToList
|
||||
Dim EjercicioNuevo = Ejercicios.FirstOrDefault(Function(x) x.FechaInicio <= NuevaFecha And x.FechaFin >= NuevaFecha And x.FechaCierre Is Nothing)
|
||||
@@ -426,13 +418,13 @@ Public Class ucDiario
|
||||
Case TiposDocumentos.RECIBO
|
||||
Dim rec = bd.movimientoscaja.FirstOrDefault(Function(x) x.idMovimiento = ap.idAplicacion)
|
||||
If rec IsNot Nothing Then
|
||||
Dim uc As New ucMovimientoCaja(rec.idRecibo)
|
||||
FuncionesDinamicas.AbrirAP(uc)
|
||||
Dim uc As New ucMovimientoCaja(rec.idMovimiento)
|
||||
FuncionesDinamicas.AbrirAP(uc, "")
|
||||
Else
|
||||
DXMessageBox.Show("El recibo no se encuentra", "Atención")
|
||||
DXMessageBox.Show("El Movimiento no se encuentra", "Atención")
|
||||
End If
|
||||
Case Else
|
||||
DXMessageBox.Show("Tipo de documento no disponible", "Atención")
|
||||
DXMessageBox.Show("Tipo Movimiento no disponible", "Atención")
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
@@ -560,9 +552,21 @@ Public Class ucDiario
|
||||
|
||||
Private Sub ucDiario_ErrorGuardando(sender As Object, ex As Exception, OpcionGuardado As Integer) Handles Me.ErrorGuardando
|
||||
Try
|
||||
Dim ea = bd.ObjectStateManager.GetObjectStateEntries(System.Data.EntityState.Added)
|
||||
Dim ee = bd.ObjectStateManager.GetObjectStateEntries(System.Data.EntityState.Deleted)
|
||||
Dim em = bd.ObjectStateManager.GetObjectStateEntries(System.Data.EntityState.Modified)
|
||||
|
||||
' //IEnumerable<Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry> res = from e in this.ChangeTracker.Entries()
|
||||
'// where e.State.HasFlag(Microsoft.EntityFrameworkCore.EntityState.Added) ||
|
||||
'// e.State.HasFlag(Microsoft.EntityFrameworkCore.EntityState.Modified) ||
|
||||
'// e.State.HasFlag(Microsoft.EntityFrameworkCore.EntityState.Deleted)
|
||||
'// select e;
|
||||
|
||||
'//if (res.Any())
|
||||
'// return true;
|
||||
'//return false;
|
||||
|
||||
Dim ea = bd.ChangeTracker.Entries.Where(Function(x) x.State.HasFlag(EntityState.Added))
|
||||
Dim ee = bd.ChangeTracker.Entries.Where(Function(x) x.State.HasFlag(EntityState.Deleted))
|
||||
Dim em = bd.ChangeTracker.Entries.Where(Function(x) x.State.HasFlag(EntityState.Modified))
|
||||
|
||||
Dim sMensaje As String = "Entidades Añadidas: " & ea.Count.ToString
|
||||
For Each ent In ea
|
||||
Select Case ent.Entity.GetType
|
||||
|
||||
@@ -6,13 +6,13 @@ Imports bdGrupoSanchoToro
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Linq.Dynamic
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPF
|
||||
Imports tsWPF.Comun
|
||||
Imports tsWPFCore.Comun
|
||||
Imports tsWPFCore
|
||||
Imports tsUtilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
|
||||
@@ -105,7 +105,7 @@ Public Class ucDiarios
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
Public Function ObtieneAsientos(BackGround As Boolean, TextoBusqueda As String, FechaInicio As Date, FechaFin As Date) As List(Of asientos)
|
||||
Public Function ObtieneAsientos(BackGround As Boolean, TextoBusqueda As String, FechaInicio As DateOnly, FechaFin As DateOnly) As List(Of asientos)
|
||||
Dim rs As New List(Of asientos)
|
||||
Dim parametros(0) As Object
|
||||
Dim iNumExc As Integer = 0
|
||||
@@ -120,10 +120,10 @@ Public Class ucDiarios
|
||||
'End If
|
||||
Dim Calfap() As String = {"NumeroDocumento", "Concepto"}
|
||||
Dim Cnumap() As String = {"idAsiento", "Debe", "Haber"}
|
||||
Dim ExpBusAsi As String = tsWPF.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, Cnumap, Calfap, Nothing)
|
||||
Dim lap = bd.apuntes.Where(ExpBusAsi, parametros).Select(Function(x) x.asientos).Where(Function(x) x.Fecha >= FechaInicio And x.Fecha <= FechaFin).ToList
|
||||
Dim ExpBusAsi As String = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, Cnumap, Calfap, Nothing)
|
||||
Dim lap = bd.apuntes.Where(ExpBusAsi, parametros).Select(Function(x) x.idAsientoNavigation).Where(Function(x) x.Fecha >= FechaInicio And x.Fecha <= FechaFin).ToList
|
||||
Dim ctas = TextoBusqueda.Split(" ").Where(Function(x) x.Length = bdGrupoSanchoToro.db.cuentas.LongitudCuentaFinal).ToArray
|
||||
Dim lap2 = bd.apuntes.Where(Function(x) ctas.Contains(x.cuentas.NumeroCuenta)).Select(Function(x) x.asientos).Where(Function(x) x.Fecha >= FechaInicio And x.Fecha <= FechaFin).ToList
|
||||
Dim lap2 = bd.apuntes.Where(Function(x) ctas.Contains(x.idCuentaNavigation.NumeroCuenta)).Select(Function(x) x.idAsientoNavigation).Where(Function(x) x.Fecha >= FechaInicio And x.Fecha <= FechaFin).ToList
|
||||
rs = lap.Union(lap2).OrderBy(Function(x) x.Fecha).ThenBy(Function(x) x.Fecha).ToList
|
||||
Else
|
||||
rs = bd.asientos.Where(Function(x) x.Fecha >= FechaInicio And x.Fecha <= FechaFin).ToList
|
||||
@@ -145,7 +145,7 @@ Public Class ucDiarios
|
||||
|
||||
|
||||
Dim rs As New List(Of asientos)
|
||||
Dim fi, ff As Date?
|
||||
Dim fi, ff As DateOnly?
|
||||
Dim Busqueda As String
|
||||
|
||||
Busqueda = Me.teBusqueda.Text.Trim
|
||||
|
||||
@@ -39,12 +39,12 @@ Public Class ucEjercicioContable
|
||||
|
||||
If FuerzaNuevo OrElse _idEjercicio Is Nothing Then
|
||||
ra = New bdGrupoSanchoToro.db.ejercicioscontables
|
||||
ra.FechaApertura = Now.Date
|
||||
ra.FechaApertura = DateOnly.FromDateTime(Now)
|
||||
Dim Anno As Integer = Now.Year
|
||||
If Now.Month > 1 Then Anno += 1
|
||||
ra.Descripcion = Anno.ToString
|
||||
ra.FechaInicio = New Date(Anno, 1, 1)
|
||||
ra.FechaFin = New Date(Anno, 12, 31)
|
||||
ra.FechaInicio = New DateOnly(Anno, 1, 1)
|
||||
ra.FechaFin = New DateOnly(Anno, 12, 31)
|
||||
ra.idEmpresa = bd.empresas.First(Function(x) x.FechaBaja.HasValue = False).idEmpresa
|
||||
Me.DataContext = ra
|
||||
_idEjercicio = Nothing
|
||||
@@ -157,7 +157,7 @@ Public Class ucEjercicioContable
|
||||
If Not DXSplashScreen.IsActive Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Obteniendo cuentas ...")
|
||||
Dim Nivel As Integer = cbNivel.EditValue
|
||||
Dim ctas = bdGrupoSanchoToro.db.vf_cuentas.Obtiene_vf_cuentas(bd, ra.ideje, Nivel)
|
||||
Dim ctas = bdGrupoSanchoToro.db.vf_cuentas.Obtiene_vf_cuentas(bd, ra.idEjercicio, Nivel)
|
||||
gcCuentas.ItemsSource = ctas
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
Catch ex As Exception
|
||||
@@ -435,7 +435,7 @@ Public Class ucEjercicioContable
|
||||
Dim ctaea = bd.cuentas.First(Function(x) x.idCuenta = cta.idCuenta)
|
||||
CopiaCuenta(bd, ejnue, ctaea, ctne)
|
||||
End If
|
||||
.cuentas = ctne
|
||||
.idCuentaNavigation = ctne
|
||||
'.idCuenta = ejnue.cuentas.First(Function(x) x.NumeroCuenta = cta.NumeroCuenta).idCuenta
|
||||
'.Fecha = ejnue.FechaInicio
|
||||
.Concepto = "ASIENTO APERTURA"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</tsWPFCore:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="Descripcion" Header="Ejercicio" Width="150" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="empresascontables.RazonSocial" Width="350" IsSmart="True" Header="Empresa" />
|
||||
<dxg:GridColumn FieldName="empresas.RazonSocial" Width="350" IsSmart="True" Header="Empresa" />
|
||||
<dxg:GridColumn FieldName="FechaInicio" Width="90" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy"/>
|
||||
|
||||
@@ -65,7 +65,7 @@ Public Class ucEjerciciosContables
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
'Public Overrides Function ObtieneConexionBD() As tsl5.Datos.BBDD
|
||||
'Public Overrides Function ObtieneConexionBD() As tsUtilidades.Datos.BBDD
|
||||
' Return bdGrupoSanchoToro.gestionasegasaEntities.bdga
|
||||
'End Function
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Imports tsWPF.modExtensiones
|
||||
Imports System.Data.Common
|
||||
Imports System.Data.Entity
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports System.IO
|
||||
@@ -47,7 +47,7 @@ Public Class ucInformeContables
|
||||
'ra.Descripcion = Now.Year.ToString
|
||||
'ra.FechaInicio = New Date(Now.Year, 1, 1)
|
||||
'ra.FechaFin = New Date(Now.Year, 12, 31)
|
||||
'ra.idEmpresa = bd.empresascontables.First(Function(x) x.FechaBaja.HasValue = False).idEmpresaContable
|
||||
'ra.idEmpresa = bd.empresas.First(Function(x) x.FechaBaja.HasValue = False).idEmpresaContable
|
||||
Me.DataContext = ra
|
||||
_idInforme = Nothing
|
||||
' ra.idEjercicio = Nothing
|
||||
|
||||
@@ -12,7 +12,6 @@ Imports tsWPF.Comun
|
||||
Imports tsWPFCore.Comun
|
||||
Imports tsWPFCore
|
||||
Imports tsUtilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
|
||||
@@ -75,7 +74,7 @@ Public Class ucInformesContables
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
'Public Overrides Function ObtieneConexionBD() As tsl5.Datos.BBDD
|
||||
'Public Overrides Function ObtieneConexionBD() As tsUtilidades.Datos.BBDD
|
||||
' Return bdGrupoSanchoToro.gestionasegasaEntities.bdga
|
||||
'End Function
|
||||
|
||||
@@ -123,20 +122,20 @@ Public Class ucInformesContables
|
||||
End If
|
||||
i += 1
|
||||
Loop Until bd.informescontables.Any(Function(x) x.Descripcion = sDesc Or x.Codigo = sCod) = False
|
||||
Dim fi As New ficheros
|
||||
Dim fi As New bdGrupoSanchoToro.db.ficheros
|
||||
With fi
|
||||
.Descripcion = ra.ficheros.Descripcion
|
||||
.Fecha = ra.ficheros.Fecha
|
||||
.idAplicacion = ra.ficheros.idAplicacion
|
||||
.idTipo = ra.ficheros.idTipo
|
||||
.Observaciones = ra.ficheros.Observaciones
|
||||
.Fichero = ra.ficheros.Fichero
|
||||
.NombreFichero = ra.ficheros.NombreFichero
|
||||
.Descripcion = ra.idFicheroNavigation.Descripcion
|
||||
.Fecha = ra.idFicheroNavigation.Fecha
|
||||
.idAplicacion = ra.idFicheroNavigation.idAplicacion
|
||||
.idTipo = ra.idFicheroNavigation.idTipo
|
||||
.Observaciones = ra.idFicheroNavigation.Observaciones
|
||||
.Fichero = ra.idFicheroNavigation.Fichero
|
||||
.NombreFichero = ra.idFicheroNavigation.NombreFichero
|
||||
End With
|
||||
With ni
|
||||
.Codigo = sCod
|
||||
.Descripcion = sDesc
|
||||
.ficheros = fi
|
||||
.idFicheroNavigation = fi
|
||||
End With
|
||||
For Each c In ra.celdasinformescontables
|
||||
Dim nc As New celdasinformescontables
|
||||
@@ -149,7 +148,7 @@ Public Class ucInformesContables
|
||||
End With
|
||||
ni.celdasinformescontables.Add(nc)
|
||||
Next
|
||||
bd.informescontables.AddObject(ni)
|
||||
bd.informescontables.Add(ni)
|
||||
bd.SaveChanges()
|
||||
Me.RefrescaUC()
|
||||
Else
|
||||
|
||||
@@ -7,13 +7,12 @@ Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Linq.Dynamic
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports tsl5.Datos
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPF
|
||||
Imports tsWPF.Comun
|
||||
Imports tsWPFCore.Comun
|
||||
Imports tsWPFCore
|
||||
Imports tsUtilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
|
||||
@@ -88,7 +87,7 @@ Public Class ucListadoDiario
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function ObtieneApuntes(TextoBusqueda As String, FechaInicio As Date, FechaFin As Date) As List(Of apuntes)
|
||||
Public Function ObtieneApuntes(TextoBusqueda As String, FechaInicio As DateOnly, FechaFin As DateOnly) As List(Of apuntes)
|
||||
Dim rs As List(Of apuntes)
|
||||
Dim parametros(0) As Object
|
||||
Dim iNumExc As Integer = 0
|
||||
@@ -99,12 +98,12 @@ Public Class ucListadoDiario
|
||||
Dim Calfc() As String = {"cuentas.NumeroCuenta"}
|
||||
Dim ExpBus As String = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, Nothing, Calf, Nothing, Calfc)
|
||||
If ExpBus = "" Then
|
||||
rs = bd.apuntes.Include(Function(x) x.asientos).Include(Function(x) x.cuentas).Where(Function(x) x.asientos.Fecha >= FechaInicio And x.asientos.Fecha <= FechaFin).OrderBy(Function(x) x.asientos.Fecha).ThenBy(Function(x) x.idAsiento).ThenBy(Function(x) x.idApunte).ToList
|
||||
rs = bd.apuntes.Include(Function(x) x.idAsientoNavigation).Include(Function(x) x.idCuentaNavigation).Where(Function(x) x.idAsientoNavigation.Fecha >= FechaInicio And x.idAsientoNavigation.Fecha <= FechaFin).OrderBy(Function(x) x.idAsientoNavigation.Fecha).ThenBy(Function(x) x.idAsientoNavigation).ThenBy(Function(x) x.idApunte).ToList
|
||||
Else
|
||||
rs = bd.apuntes.Include(Function(x) x.asientos).Include(Function(x) x.cuentas).Where(ExpBus, parametros).Where(Function(x) x.asientos.Fecha >= FechaInicio And x.asientos.Fecha <= FechaFin).OrderBy(Function(x) x.asientos.Fecha).ThenBy(Function(x) x.idAsiento).ThenBy(Function(x) x.idApunte).ToList
|
||||
rs = bd.apuntes.Include(Function(x) x.idAsientoNavigation).Include(Function(x) x.idCuentaNavigation).Where(ExpBus, parametros).Where(Function(x) x.idAsientoNavigation.Fecha >= FechaInicio And x.idAsientoNavigation.Fecha <= FechaFin).OrderBy(Function(x) x.idAsientoNavigation.Fecha).ThenBy(Function(x) x.idAsiento).ThenBy(Function(x) x.idApunte).ToList
|
||||
End If
|
||||
Else
|
||||
rs = bd.apuntes.Include(Function(x) x.asientos).Include(Function(x) x.cuentas).Where(Function(x) x.asientos.Fecha >= FechaInicio And x.asientos.Fecha <= FechaFin).OrderBy(Function(x) x.asientos.Fecha).ThenBy(Function(x) x.idAsiento).ThenBy(Function(x) x.idApunte).ToList
|
||||
rs = bd.apuntes.Include(Function(x) x.idAsientoNavigation).Include(Function(x) x.idCuentaNavigation).Where(Function(x) x.idAsientoNavigation.Fecha >= FechaInicio And x.idAsientoNavigation.Fecha <= FechaFin).OrderBy(Function(x) x.idAsientoNavigation.Fecha).ThenBy(Function(x) x.idAsiento).ThenBy(Function(x) x.idApunte).ToList
|
||||
End If
|
||||
Exit Do
|
||||
Catch ex As Exception
|
||||
@@ -121,7 +120,7 @@ Public Class ucListadoDiario
|
||||
Try
|
||||
|
||||
Dim rs As New List(Of apuntes)
|
||||
Dim fi, ff As Date?
|
||||
Dim fi, ff As DateOnly?
|
||||
Dim Busqueda As String
|
||||
|
||||
Busqueda = Me.teBusqueda.Text.Trim
|
||||
|
||||
Reference in New Issue
Block a user