This commit is contained in:
2023-01-12 06:19:37 -07:00
13 changed files with 728 additions and 318 deletions

View File

@@ -1248,7 +1248,7 @@ Public Class ClsGenerales
#End Region #End Region
#Region "C O L E C T I V A S" #Region "C O L E C T I V A S"
Public Function GetColectivas(CveColectiva As Integer, Colectiva As String, Codigo As String, Tipo As String, CveEmpresa As Integer) As Boolean Public Function GetColectivas(Optional CveColectiva As Integer = -1, Optional Colectiva As String = "-1", Optional Codigo As String = "-1", Optional Tipo As String = "-1", Optional CveEmpresa As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Gral_ColectivasGet") DataAdapter("PA_Gral_ColectivasGet")

View File

@@ -375,61 +375,96 @@ Public Class ClsPaginas
Property GlobalDTFraccionArancelaria() As DataTable Property GlobalDTFraccionArancelaria() As DataTable
Get Get
GlobalDTFraccionArancelaria = DirectCast(Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable Dim AppNombre As String = "GlobalDTFraccionArancelaria"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATFraccionArancelaria() Then Application(AppNombre) = ObjGrales.DtResultados.AsEnumerable()
ObjGrales.Dispose()
End If
GlobalDTFraccionArancelaria = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTFraccionArancelaria") = value Dim AppNombre As String = "GlobalDTFraccionArancelaria"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTIncoterm() As DataTable Property GlobalDTIncoterm() As DataTable
Get Get
GlobalDTIncoterm = DirectCast(Application("GlobalDTIncoterm"), DataTable) Dim AppNombre As String = "GlobalDTIncoterm"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATIncoterm() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTIncoterm = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTIncoterm") = value Dim AppNombre As String = "GlobalDTIncoterm"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTTipoOperacion() As DataTable Property GlobalDTTipoOperacion() As DataTable
Get Get
GlobalDTTipoOperacion = DirectCast(Application("GlobalDTTipoOperacion"), DataTable) Dim AppNombre As String = "GlobalDTTipoOperacion"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATTipoOperacion() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTTipoOperacion = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTTipoOperacion") = value Dim AppNombre As String = "GlobalDTTipoOperacion"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTSATMotivoTraslado() As DataTable Property GlobalDTSATMotivoTraslado() As DataTable
Get Get
GlobalDTSATMotivoTraslado = DirectCast(Application("GlobalDTSATMotivoTraslado"), DataTable) Dim AppNombre As String = "GlobalDTSATMotivoTraslado"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATMotivoTraslado() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTSATMotivoTraslado = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTSATMotivoTraslado") = value Dim AppNombre As String = "GlobalDTSATMotivoTraslado"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTUnidadAduana() As DataTable Property GlobalDTUnidadAduana() As DataTable
Get Get
GlobalDTUnidadAduana = DirectCast(Application("GlobalDTUnidadAduana"), DataTable) Dim AppNombre As String = "GlobalDTUnidadAduana"
End Get If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Set(value As DataTable)
Application("GlobalDTUnidadAduana") = value
End Set
End Property
Property GlobalDTGralPaises() As DataTable
Get
If Application("GlobalDTGralPaises") Is Nothing Then
Dim ObjGrales As New ClsGenerales Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATPais() Then Application("GlobalDTGralPaises") = ObjGrales.DtResultados Else Application("GlobalDTGralPaises") = Nothing If ObjGrales.GetSATUnidadesAduana() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose() ObjGrales.Dispose()
End If End If
GlobalDTGralPaises = DirectCast(Application("GlobalDTGralPaises"), DataTable) GlobalDTUnidadAduana = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTGralPaises") = value Dim AppNombre As String = "GlobalDTUnidadAduana"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralPaises() As DataTable
Get
Dim AppNombre As String = "GlobalDTGralPaises"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATPais() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTGralPaises = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTGralPaises"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable
@@ -437,7 +472,7 @@ Public Class ClsPaginas
Dim AppNombre As String = "GlobalDTGralEstados" Dim AppNombre As String = "GlobalDTGralEstados"
If Application(AppNombre) Is Nothing Then If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose() ObjGrales.Dispose()
End If End If
@@ -463,7 +498,7 @@ Public Class ClsPaginas
Dim AppNombre As String = "GlobalDTGralMunicipios" Dim AppNombre As String = "GlobalDTGralMunicipios"
If Application(AppNombre) Is Nothing Then If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose() ObjGrales.Dispose()
End If End If
@@ -490,7 +525,7 @@ Public Class ClsPaginas
If Application("GlobalDTLocalidad") Is Nothing Then If Application("GlobalDTLocalidad") Is Nothing Then
Dim ObjGrales As New ClsGenerales Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados Else Application("GlobalDTLocalidad") = Nothing If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados
ObjGrales.Dispose() ObjGrales.Dispose()
End If End If
@@ -523,14 +558,13 @@ Public Class ClsPaginas
End Property End Property
Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String, Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String,
Optional CveMunicipio As Integer = -1, Optional CodigoPostal As Integer = -1, Optional CveColonia As Integer = -1) As DataTable Optional CveMunicipio As Integer = -1, Optional CodigoPostal As Integer = -1, Optional CveColonia As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = "GlobalDTGralColonias" Dim AppNombre As String = "GlobalDTGralColonias"
If Application(AppNombre) Is Nothing Then If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose() ObjGrales.Dispose()
End If End If
@@ -561,7 +595,7 @@ Public Class ClsPaginas
Get Get
If Application("GlobalDTPSATUM") Is Nothing Then If Application("GlobalDTPSATUM") Is Nothing Then
Dim ObjGrales As New ClsGenerales Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable()
ObjGrales.Dispose() ObjGrales.Dispose()
End If End If
@@ -1007,18 +1041,36 @@ Public Class ClsPaginas
End Property End Property
Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}"
'sino existe, recarga los datos
Dim Dv As New DataView(DirectCast(Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows) If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
GlobalDTFamilias = Dv.ToTable Dim ObjGenerales As New ClsGenerales
Dv.Dispose() If ObjGenerales.GetCategorias(CveEmpresa, 2) Then Application(AppNombre) = ObjGenerales.DtResultados
Else ObjGenerales.Dispose()
GlobalDTFamilias = DirectCast(Application("GlobalDTFamilias"), DataTable)
End If End If
GlobalDTFamilias = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTFamilias") = value Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTCategoriasPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetCategorias(CveEmpresa, 3) Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
GlobalDTCategoriasPresupuestos = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}"
Application(AppNombre) = value
End Set End Set
End Property End Property
@@ -1109,6 +1161,14 @@ Public Class ClsPaginas
'End Property 'End Property
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable
Get Get
Dim AppNombre As String = "GlobalDTSATUsosCFDI"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATUsosCFDI() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
If EsPersonaFisica <> -1 Then If EsPersonaFisica <> -1 Then
Dim Tipo As New StringBuilder Dim Tipo As New StringBuilder
If EsPersonaFisica = 1 Then Tipo.Append("AplicaPersonaFisica = 1") Else Tipo.Append("AplicaPersonaMoral = 1") If EsPersonaFisica = 1 Then Tipo.Append("AplicaPersonaFisica = 1") Else Tipo.Append("AplicaPersonaMoral = 1")
@@ -1117,16 +1177,17 @@ Public Class ClsPaginas
Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor) Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor)
End If End If
Dim Dv As New DataView(DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows) Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
GlobalDTSATUsosCFDI = Dv.ToTable GlobalDTSATUsosCFDI = Dv.ToTable
Dv.Dispose() Dv.Dispose()
Else Else
GlobalDTSATUsosCFDI = DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable) GlobalDTSATUsosCFDI = DirectCast(Application(AppNombre), DataTable)
End If End If
End Get End Get
Set(ByVal value As DataTable) Set(value As DataTable)
Application("GlobalDTSATUsosCFDI") = value Dim AppNombre As String = "GlobalDTSATUsosCFDI"
Application(AppNombre) = value
End Set End Set
End Property End Property
Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
@@ -2616,11 +2677,11 @@ Public Class ClsPaginas
#Region "***********************************************************************DT GENERALES**************************************************************************************" #Region "***********************************************************************DT GENERALES**************************************************************************************"
Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
'sino existe, recarga los datos 'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados Else Application(AppNombre) = Nothing If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose() ObjGenerales.Dispose()
End If End If
@@ -2634,54 +2695,69 @@ Public Class ClsPaginas
Dv.Dispose() Dv.Dispose()
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
Application(AppNombre) = value Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}"
Dim Dv As New DataView(DirectCast(Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) 'sino existe, recarga los datos
GlobalDTGralCategorias2 = Dv.ToTable If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dv.Dispose() Dim ObjGenerales As New ClsGenerales
Else If ObjGenerales.GetCategorias(CveEmpresa, 4) Then Application(AppNombre) = ObjGenerales.DtResultados
GlobalDTGralCategorias2 = DirectCast(Application("GlobalDTCategorias2"), DataTable) ObjGenerales.Dispose()
End If End If
Dim filtro As New StringBuilder
'If CveMarca > 0 Then
' filtro.AppendFormat(" CveMarca={0} ", CveMarca)
'End If
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
GlobalDTGralCategorias2 = Dv.ToTable
Dv.Dispose()
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTCategorias2") = value Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGralEscolaridades() As DataTable Property GlobalDTGralEscolaridades() As DataTable
Get Get
GlobalDTGralEscolaridades = DirectCast(Application("GlobalDTGralEscolaridades"), DataTable) Dim AppNombre As String = "GlobalDTGralEscolaridades"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetEscolaridades() Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
GlobalDTGralEscolaridades = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTGralEscolaridades") = value Dim AppNombre As String = "GlobalDTGralEscolaridades"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}"
Dim Dv As New DataView(DirectCast(Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
GlobalDTGralColectivas = Dv.ToTable Dim ObjGenerales As New ClsGenerales
Dv.Dispose() If ObjGenerales.GetColectivas(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
Else ObjGenerales.Dispose()
GlobalDTGralColectivas = DirectCast(Application("GlobalDTGralColectivas"), DataTable)
End If End If
GlobalDTGralColectivas = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTGralColectivas") = value Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGralMarcas(CveEmpresa As Integer, Optional CveMarca As Integer = -1) As DataTable Property GlobalDTGralMarcas(CveEmpresa As Integer, Optional CveMarca As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}"
'sino existe, recarga los datos 'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjMarcas As New ClsProductosServicios Dim ObjMarcas As New ClsProductosServicios
@@ -2701,7 +2777,7 @@ Public Class ClsPaginas
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}"
Application(AppNombre) = value Application(AppNombre) = value
End Set End Set
End Property End Property
@@ -3496,33 +3572,58 @@ Public Class ClsPaginas
#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************" #Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
Property GlobalDTAsistenciaDetalle() As DataTable Property GlobalDTAsistenciaDetalle() As DataTable
Get Get
GlobalDTAsistenciaDetalle = DirectCast(Application("GlobalDTAsistenciaDetalle"), DataTable) Dim AppNombre As String = "GlobalDTAsistenciaDetalle"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetAsistenciasDetalle() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTAsistenciaDetalle = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTAsistenciaDetalle") = value Dim AppNombre As String = "GlobalDTAsistenciaDetalle"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTAsistenciasInasistencias() As DataTable Property GlobalDTAsistenciasInasistencias() As DataTable
Get Get
GlobalDTAsistenciasInasistencias = DirectCast(Application("GlobalDTAsistenciasInasistencias"), DataTable) Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetAsistenciasInasistencias() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTAsistenciasInasistencias = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTAsistenciasInasistencias") = value Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTEstatusPersonal() As DataTable Property GlobalDTEstatusPersonal() As DataTable
Get Get
GlobalDTEstatusPersonal = DirectCast(Application("GlobalDTEstatusPersonal"), DataTable) Dim AppNombre As String = "GlobalDTEstatusPersonal"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetEstatusPersonal() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTEstatusPersonal = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTEstatusPersonal") = value Dim AppNombre As String = "GlobalDTEstatusPersonal"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
'sino existe, recarga los datos 'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH Dim ObjPersonal As New ClsRH
@@ -3530,145 +3631,239 @@ Public Class ClsPaginas
ObjPersonal.Dispose() ObjPersonal.Dispose()
End If End If
If CveEmpresa <> -1 Or CvePersonal <> -1 Then GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
Dim Str As StringBuilder = New StringBuilder()
If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CvePersonal <> -1 Then Str.AppendFormat(" {0} CvePersonal = {1}", If(Str.Length > 0, "AND", ""), CvePersonal)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTRHPersonal = Dv.ToTable
Dv.Dispose()
Else
GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
End If
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
Application(AppNombre) = value Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTDepartamentos() As DataTable Property GlobalDTDepartamentos() As DataTable
Get Get
GlobalDTDepartamentos = DirectCast(Application("GlobalDTDepartamentos"), DataTable) Dim AppNombre As String = "GlobalDTDepartamentos"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetDepartamentos() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTDepartamentos = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTDepartamentos") = value Dim AppNombre As String = "GlobalDTDepartamentos"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}"
Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) 'sino existe, recarga los datos
Dim Dv As New DataView(DirectCast(Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
GlobalDTRHPuestos = Dv.ToTable Dim ObjPersonal As New ClsRH
Dv.Dispose() If ObjPersonal.GetPuestos(CveEmpresa) Then Application(AppNombre) = ObjPersonal.DtResultados
Else ObjPersonal.Dispose()
GlobalDTRHPuestos = DirectCast(Application("GlobalDTRHPuestos"), DataTable)
End If End If
GlobalDTRHPuestos = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTRHPuestos") = value Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTEscolaridad() As DataTable Property GlobalDTEscolaridad() As DataTable
Get Get
GlobalDTEscolaridad = DirectCast(Application("GlobalDTEscolaridad"), DataTable) Dim AppNombre As String = "GlobalDTEscolaridad"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetEscolaridades() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTEscolaridad = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTEscolaridad") = value Dim AppNombre As String = "GlobalDTEscolaridad"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTEstadoCivil() As DataTable Property GlobalDTEstadoCivil() As DataTable
Get Get
GlobalDTEstadoCivil = DirectCast(Application("GlobalDTEstadoCivil"), DataTable) Dim AppNombre As String = "GlobalDTEstadoCivil"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetEstadoCivil() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTEstadoCivil = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTEstadoCivil") = value Dim AppNombre As String = "GlobalDTEstadoCivil"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTDocumentos() As DataTable Property GlobalDTDocumentos() As DataTable
Get Get
GlobalDTDocumentos = DirectCast(Application("GlobalDTDocumentos"), DataTable) Dim AppNombre As String = "GlobalDTDocumentos"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetDocumentos() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTDocumentos = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTDocumentos") = value Dim AppNombre As String = "GlobalDTDocumentos"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGenero() As DataTable Property GlobalDTGenero() As DataTable
Get Get
GlobalDTGenero = DirectCast(Application("GlobalDTGenero"), DataTable) Dim AppNombre As String = "GlobalDTGenero"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetGeneros() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTGenero = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTGenero") = value Dim AppNombre As String = "GlobalDTGenero"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTMotivoBaja() As DataTable Property GlobalDTMotivoBaja() As DataTable
Get Get
GlobalDTMotivoBaja = DirectCast(Application("GlobalDTMotivoBaja"), DataTable) Dim AppNombre As String = "GlobalDTMotivoBaja"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetMotivoBaja() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTMotivoBaja = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTMotivoBaja") = value Dim AppNombre As String = "GlobalDTMotivoBaja"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTTiposContrato() As DataTable Property GlobalDTTiposContrato() As DataTable
Get Get
GlobalDTTiposContrato = DirectCast(Application("GlobalDTTiposContrato"), DataTable) Dim AppNombre As String = "GlobalDTTiposContrato"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetTiposContrato() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTTiposContrato = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTTiposContrato") = value Dim AppNombre As String = "GlobalDTTiposContrato"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTRutas() As DataTable Property GlobalDTRutas() As DataTable
Get Get
GlobalDTRutas = DirectCast(Application("GlobalDTRutas"), DataTable) Dim AppNombre As String = "GlobalDTRutas"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetRutas() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTRutas = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTRutas") = value Dim AppNombre As String = "GlobalDTRutas"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTTurno() As DataTable Property GlobalDTTurno() As DataTable
Get Get
GlobalDTTurno = DirectCast(Application("GlobalDTTurno"), DataTable) Dim AppNombre As String = "GlobalDTTurno"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetTurnos() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTTurno = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTTurno") = value Dim AppNombre As String = "GlobalDTTurno"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTJornadas() As DataTable Property GlobalDTJornadas() As DataTable
Get Get
GlobalDTJornadas = DirectCast(Application("GlobalDTJornadas"), DataTable) Dim AppNombre As String = "GlobalDTJornadas"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetJornadas() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTJornadas = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTJornadas") = value Dim AppNombre As String = "GlobalDTJornadas"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTMotivosHorasExtras() As DataTable Property GlobalDTMotivosHorasExtras() As DataTable
Get Get
GlobalDTMotivosHorasExtras = DirectCast(Application("GlobalDTMotivosHorasExtras"), DataTable) Dim AppNombre As String = "GlobalDTMotivosHorasExtras"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetMotivoHorasExtras() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTMotivosHorasExtras = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTMotivosHorasExtras") = value Dim AppNombre As String = "GlobalDTMotivosHorasExtras"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTTipoBuzon() As DataTable Property GlobalDTTipoBuzon() As DataTable
Get Get
GlobalDTTipoBuzon = DirectCast(Application("GlobalDTTipoBuzon"), DataTable) Dim AppNombre As String = "GlobalDTTipoBuzon"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetTipoBuzon() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTTipoBuzon = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTTipoBuzon") = value Dim AppNombre As String = "GlobalDTTipoBuzon"
Application(AppNombre) = value
End Set End Set
End Property End Property
#End Region #End Region
#Region "*********** D T - C O M B U S T I B L E S ***********" #Region "*********** D T - C O M B U S T I B L E S ***********"
Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable
Get Get
If CveEmpresa <> -1 Then If CveEmpresa <> -1 Then
@@ -3884,19 +4079,20 @@ Public Class ClsPaginas
End Set End Set
End Property End Property
Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}"
Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) 'sino existe, recarga los datos
Dim Dv As New DataView(DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
GlobalDTPaqueteriaGuiaTipos = Dv.ToTable Dim ObjGenerales As New ClsGenerales
Dv.Dispose() If ObjGenerales.GetGralPaqueteriasGuiasTipo(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
Else ObjGenerales.Dispose()
GlobalDTPaqueteriaGuiaTipos = DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable)
End If End If
GlobalDTPaqueteriaGuiaTipos = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTPaqueteriaGuiaTipos") = value Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}"
Application(AppNombre) = value
End Set End Set
End Property End Property
Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1, Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,

View File

@@ -15,44 +15,45 @@
} }
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel runat="server" > <asp:UpdatePanel ID="UPAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton> <asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="ImgExcel" runat="server"> <i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-ad-excel"></i> Excel Personalizado</asp:LinkButton>
</li>
<li>
<asp:LinkButton runat="server" ID="LnkPersonalizar" CssClass="" data-toggle="tooltip" Visible="True" OnClick="LnkPersonalizar_Click"
data-placement="left" Text="<i class='fa fa-pencil'></i> Personalizar">
</asp:LinkButton>
</li> </li>
<li> <li>
<asp:LinkButton ID="ImgExcel" runat="server"> <i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton> <asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
</li>
</li>
<li>
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-ad-excel"></i> Excel Personalizado</asp:LinkButton>
</li> <li>
<asp:HyperLink ID="HplProgramar" runat="server">Programar Recursos</asp:HyperLink>
<li>
<asp:LinkButton runat="server" ID="LnkPersonalizar" CssClass="" data-toggle="tooltip" Visible="True" OnClick="LnkPersonalizar_Click" </li>
data-placement="left" title="Enviar Correo de Prueba" Text="<i class='fa fa-pencil'></i> Personalizar"></asp:LinkButton> </li>
</ContentTemplate>
<li> <Triggers>
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink> <asp:PostBackTrigger ControlID="ImgImprimir" />
<asp:PostBackTrigger ControlID="ImgExcel" />
</li> <asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
</Triggers>
</asp:UpdatePanel>
<li>
<asp:HyperLink ID="HplProgramar" runat="server">Programar Recursos</asp:HyperLink>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="ImgImprimir" />
<asp:PostBackTrigger ControlID="ImgExcel" />
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
</Triggers>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte de CxP - Detalle Reporte de CxP - Detalle
@@ -216,18 +217,18 @@
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label runat="server" class="col-md-1" ID="LblProyecto"></asp:Label> <asp:Label runat="server" class="col-md-1" ID="LblProyecto"></asp:Label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlProyecto" runat="server" CssClass="select2me" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%" AutoPostBack="true"> <asp:DropDownList ID="DdlProyecto" runat="server" CssClass="select2me" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label runat="server" class="col-md-1" ID="LblSubProyectofiltro"></asp:Label> <asp:Label runat="server" class="col-md-1" ID="LblSubProyectofiltro"></asp:Label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%"> <asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1" style="margin-left:20px"><span>Comprobación:</span></div> <div class="col-md-1" style="margin-left:20px"><span>Comprobación:</span></div>
<div class="col-md-1"> <div class="col-md-1">
@@ -241,19 +242,19 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-1"><span>Moneda:</span></div> <div class="col-md-1"><span>Moneda:</span></div>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="Ddlmoneda" runat="server" AppendDataBoundItems="true" CssClass="select2me" DataTextField="Moneda" DataValueField="CveMoneda" Width="100%" ></asp:DropDownList> <asp:DropDownList ID="Ddlmoneda" runat="server" AppendDataBoundItems="true" CssClass="select2me" DataTextField="Moneda" DataValueField="CveMoneda" Width="100%" ></asp:DropDownList>
</div> </div>
<div class="col-md-1" style="margin-left:20px"><span>Aplica NC:</span></div> <div class="col-md-1" style="margin-left:20px"><span>Aplica NC:</span></div>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlAplicaNC" runat="server" CssClass="select2me" AppendDataBoundItems="true" Width="100%"> <asp:DropDownList ID="DdlAplicaNC" runat="server" CssClass="select2me" AppendDataBoundItems="true" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem> <asp:ListItem Text="Si" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem> <asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -264,7 +265,7 @@
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None"> CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns> <Columns>
<%--0--%> <%--0--%>

View File

@@ -83,18 +83,6 @@ Partial Class RepCxPDetalle
ViewState("FechaFin") = value ViewState("FechaFin") = value
End Set End Set
End Property End Property
Private Property Personalizo As Integer
Get
Return ViewState("Personalizo").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("Personalizo") = value
End Set
End Property
Public Property FechaVInicio() As String Public Property FechaVInicio() As String
Get Get
@@ -205,7 +193,6 @@ Partial Class RepCxPDetalle
Private Property TCEspecifico As Double Private Property TCEspecifico As Double
Public Property DTCuentasContables() As DataTable Public Property DTCuentasContables() As DataTable
Get Get
If ViewState("DTCuentasContables") Is Nothing Then If ViewState("DTCuentasContables") Is Nothing Then
@@ -218,20 +205,14 @@ Partial Class RepCxPDetalle
Set(value As DataTable) Set(value As DataTable)
ViewState("DTCuentasContables") = value ViewState("DTCuentasContables") = value
End Set End Set
End Property End Property
#End Region #End Region
'pRivate ReadOnly Property ColumnasVisibles As
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Personalizo = 0 'Private ReadOnly Property ColumnasVisibles As
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
ViewState("Opcion") = IfNull(Request("Op"), "S") ViewState("Opcion") = IfNull(Request("Op"), "S")
MostrarOcultarColumnas() MostrarOcultarColumnas(False)
CargaCombos() CargaCombos()
If Request("Op") IsNot Nothing Then If Request("Op") IsNot Nothing Then
CargaDatos() CargaDatos()
@@ -274,7 +255,6 @@ Partial Class RepCxPDetalle
DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1")) DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1"))
DdlUsuarioRegistro.SelectedValueExist(UsuarioRegistro) DdlUsuarioRegistro.SelectedValueExist(UsuarioRegistro)
Dim CveSucursal As Integer = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero Dim CveSucursal As Integer = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
@@ -309,7 +289,6 @@ Partial Class RepCxPDetalle
FechaCorte = IfNull(Request("FechaCorte"), Now.ToDate.ToString).ToString FechaCorte = IfNull(Request("FechaCorte"), Now.ToDate.ToString).ToString
txtCorteA.Text = $"31/12/{Now.Year}" txtCorteA.Text = $"31/12/{Now.Year}"
If Request("FechaI") <> "-1" AndAlso IsDate(Request("FechaI")) Then txtFechaI.Text = Request("FechaI") If Request("FechaI") <> "-1" AndAlso IsDate(Request("FechaI")) Then txtFechaI.Text = Request("FechaI")
If Request("FechaF") <> "-1" AndAlso IsDate(Request("FechaF")) Then txtFechaF.Text = Request("FechaF") If Request("FechaF") <> "-1" AndAlso IsDate(Request("FechaF")) Then txtFechaF.Text = Request("FechaF")
If Request("FechaVI") <> "-1" AndAlso IsDate(Request("FechaVI")) Then txtFechaVI.Text = Request("FechaVI") If Request("FechaVI") <> "-1" AndAlso IsDate(Request("FechaVI")) Then txtFechaVI.Text = Request("FechaVI")
@@ -349,8 +328,6 @@ Partial Class RepCxPDetalle
GvDatos.Columns(11).Visible = (UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0) GvDatos.Columns(11).Visible = (UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0)
For Each lItem As ListItem In DdlGrupo.Items For Each lItem As ListItem In DdlGrupo.Items
If lItem.Value.ToEntero = 9 Then If lItem.Value.ToEntero = 9 Then
@@ -358,7 +335,6 @@ Partial Class RepCxPDetalle
End If End If
Next Next
End Sub End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
@@ -544,11 +520,8 @@ Partial Class RepCxPDetalle
End If End If
End If End If
End If End If
If e.Row.DBCampo("CveCompra") = "" Then If e.Row.DBCampo("CveCompra") = "" Then
e.Row.FCLabel("LblMoneda").Text = "" e.Row.FCLabel("LblMoneda").Text = ""
End If End If
@@ -595,7 +568,7 @@ Partial Class RepCxPDetalle
#End Region #End Region
#Region "PERSONALIZAR" #Region "PERSONALIZAR"
Protected Sub MostrarOcultarColumnas() Protected Sub MostrarOcultarColumnas(Optional Personalizo As Boolean = True)
If ChkTipoDocto.Checked Then If ChkTipoDocto.Checked Then
GvDatos.Columns(0).Visible = True GvDatos.Columns(0).Visible = True
@@ -639,15 +612,12 @@ Partial Class RepCxPDetalle
GvDatos.Columns(7).Visible = False GvDatos.Columns(7).Visible = False
End If End If
If ChkMoneda.Checked Then If ChkMoneda.Checked Then
GvDatos.Columns(8).Visible = True GvDatos.Columns(8).Visible = True
Else Else
GvDatos.Columns(8).Visible = False GvDatos.Columns(8).Visible = False
End If End If
If ChkSaldo.Checked Then If ChkSaldo.Checked Then
GvDatos.Columns(9).Visible = True GvDatos.Columns(9).Visible = True
Else Else
@@ -692,12 +662,12 @@ Partial Class RepCxPDetalle
GvDatos.Columns(16).Visible = ChkDescripcion.Checked GvDatos.Columns(16).Visible = ChkDescripcion.Checked
Personalizo = 1 If Personalizo Then
If Personalizo = 1 Then
ImgExcelPersonalizado.Visible = True ImgExcelPersonalizado.Visible = True
Else Else
ImgExcelPersonalizado.Visible = False ImgExcelPersonalizado.Visible = False
End If End If
UPAcciones.Update()
UPDatos.Update() UPDatos.Update()
End Sub End Sub

View File

@@ -9,36 +9,37 @@
<script RunAt="server"> <script RunAt="server">
Public ReadOnly Property EsProduccion As String Public ReadOnly Property EsProduccion As String
Get Get
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
Return "0" Return "0"
Else Else
Return System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() Return System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString()
End If End If
End Get End Get
End Property End Property
Private Sub GuardaLogAsax(str As String) Private Sub GuardaLogAsax(str As String)
'GuardaLog(str) 'GuardaLog(str)
End Sub End Sub
Sub Application_Start(sender As Object, e As EventArgs) Sub Application_Start(sender As Object, e As EventArgs)
Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHmhQEs54hwXWiqhb7jE6yoykR4jHwP3Mz0nuxn0JR9fNMeDKv" + "sS5s+rCYr7Ex4DRTHaUJIUDqrvGmvWyMjzUl9RAEz/XG8RenfJvoEilBZ9Wqq8Uu/n92YhChB4PbAh9FeH3abSU3PF" + "LuVa6GydYWQvZGpHhFs98Idp754TAgWZatzcF3Ksp6q4laYxnyUY0cA0hYejanRBjIT1Nu59xmlOKE7EGIb9wKlLn/" + "XnW8k8PUNuReOk7ATeHO07JSMLikmvIytkWET2bXDmBI43tAX3fLUE+KlOe7FR/hvfQ6oqqtVRlSZ22QBanel09+XE" + "X8aVC8b+WuRv1nInJeQHBD9zF8b67n4ouKRgv2/vSxopOhCZXdaqdyO4ct+FmSC8cAAcMIGeiKnc5ww8Cq44ClTqJl" + "V2qsCjoS4bb8Nzd2Gy+q/TG/D3dAEKSpPGUx2EEksora/kIkNooq6+bgyH7hqCG2bHKaSQwr2g0keNrYIUcTIwROn1" + "cnQDetzsBqX4lvu64VZWq5+cQD+dyPJwOS6M" Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHmhQEs54hwXWiqhb7jE6yoykR4jHwP3Mz0nuxn0JR9fNMeDKv" + "sS5s+rCYr7Ex4DRTHaUJIUDqrvGmvWyMjzUl9RAEz/XG8RenfJvoEilBZ9Wqq8Uu/n92YhChB4PbAh9FeH3abSU3PF" + "LuVa6GydYWQvZGpHhFs98Idp754TAgWZatzcF3Ksp6q4laYxnyUY0cA0hYejanRBjIT1Nu59xmlOKE7EGIb9wKlLn/" + "XnW8k8PUNuReOk7ATeHO07JSMLikmvIytkWET2bXDmBI43tAX3fLUE+KlOe7FR/hvfQ6oqqtVRlSZ22QBanel09+XE" + "X8aVC8b+WuRv1nInJeQHBD9zF8b67n4ouKRgv2/vSxopOhCZXdaqdyO4ct+FmSC8cAAcMIGeiKnc5ww8Cq44ClTqJl" + "V2qsCjoS4bb8Nzd2Gy+q/TG/D3dAEKSpPGUx2EEksora/kIkNooq6+bgyH7hqCG2bHKaSQwr2g0keNrYIUcTIwROn1" + "cnQDetzsBqX4lvu64VZWq5+cQD+dyPJwOS6M"
'Dim Licence As String = String.Format("{0}/Bin/ASS151026R37.license", AppDomain.CurrentDomain.BaseDirectory) 'Dim Licence As String = String.Format("{0}/Bin/ASS151026R37.license", AppDomain.CurrentDomain.BaseDirectory)
'Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream(System.IO.File.ReadAllBytes(Licence)) 'Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream(System.IO.File.ReadAllBytes(Licence))
'HyperSoft.ElectronicDocument.Download.Activation.Activation.LoadActivationFile(stream) 'HyperSoft.ElectronicDocument.Download.Activation.Activation.LoadActivationFile(stream)
Dim sessionData As New Dictionary(Of String, HttpSessionState)() Dim sessionData As New Dictionary(Of String, HttpSessionState)()
Application("s") = sessionData Application("s") = sessionData
'BANDERA PARA VALIDACION DE CFDI 'BANDERA PARA VALIDACION DE CFDI
Application("GlobalValidarCFDI") = True Application("GlobalValidarCFDI") = True
'---------------------------------------------------------------------------------------------------------------------- '----------------------------------------------------------------------------------------------------------------------
'C A R G A - R H 'C A R G A - R H
#If False Then
GuardaLogAsax(String.Format("Globalasax 1:{0}", DateTime.Now)) GuardaLogAsax(String.Format("Globalasax 1:{0}", DateTime.Now))
Using ObjRH As New ClsRH Using ObjRH As New ClsRH
@@ -59,6 +60,7 @@
If ObjRH.GetMotivoHorasExtras() Then Application("GlobalDTMotivosHorasExtras") = ObjRH.DtResultados Else Application("GlobalDTMotivosHorasExtras") = Nothing If ObjRH.GetMotivoHorasExtras() Then Application("GlobalDTMotivosHorasExtras") = ObjRH.DtResultados Else Application("GlobalDTMotivosHorasExtras") = Nothing
If ObjRH.GetAsistenciasDetalle() Then Application("GlobalDTAsistenciaDetalle") = ObjRH.DtResultados Else Application("GlobalDTAsistenciaDetalle") = Nothing If ObjRH.GetAsistenciasDetalle() Then Application("GlobalDTAsistenciaDetalle") = ObjRH.DtResultados Else Application("GlobalDTAsistenciaDetalle") = Nothing
End Using End Using
#End If
'---------------------------------------------------------------------------------------------------------------------- '----------------------------------------------------------------------------------------------------------------------
'C A R G A - O S 'C A R G A - O S
GuardaLogAsax(String.Format("Globalasax 2:{0}", DateTime.Now)) GuardaLogAsax(String.Format("Globalasax 2:{0}", DateTime.Now))
@@ -89,7 +91,6 @@
'If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, -1) Then Application("GlobalDTOCEstatusUsuarios") = ObjOC.DtResultados Else Application("GlobalDTOCEstatusUsuarios") = Nothing 'If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, -1) Then Application("GlobalDTOCEstatusUsuarios") = ObjOC.DtResultados Else Application("GlobalDTOCEstatusUsuarios") = Nothing
End Using End Using
'------------------------------------------------------------------------------------------------------------------------- '-------------------------------------------------------------------------------------------------------------------------
'A M O R T I Z A C I O N - C O N T A B L E 'A M O R T I Z A C I O N - C O N T A B L E
@@ -234,20 +235,20 @@
'If ObjGenerales.GetGralEstados Then Application("GlobalDTGralEstados") = ObjGenerales.DtResultados Else Application("GlobalDTGralEstados") = Nothing 'If ObjGenerales.GetGralEstados Then Application("GlobalDTGralEstados") = ObjGenerales.DtResultados Else Application("GlobalDTGralEstados") = Nothing
'If ObjGenerales.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = ObjGenerales.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing 'If ObjGenerales.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = ObjGenerales.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
'If ObjGenerales.GetGralPoblaciones Then Application("GlobalDTGralPoblaciones") = ObjGenerales.DtResultados Else Application("GlobalDTGralPoblaciones") = Nothing 'If ObjGenerales.GetGralPoblaciones Then Application("GlobalDTGralPoblaciones") = ObjGenerales.DtResultados Else Application("GlobalDTGralPoblaciones") = Nothing
If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing 'If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing
'If ObjGenerales.GetCategorias Then Application("GlobalDTGralCategorias") = ObjGenerales.DtResultados Else Application("GlobalDTGralCategorias") = Nothing 'If ObjGenerales.GetCategorias Then Application("GlobalDTGralCategorias") = ObjGenerales.DtResultados Else Application("GlobalDTGralCategorias") = Nothing
If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing 'If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing 'If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing 'If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTObjGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTObjGralColectivas") = Nothing 'If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTGralColectivas") = Nothing
'If ObjGenerales.GetGralPaqueterias Then Application("GlobalDTPaqueterias") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueterias") = Nothing 'If ObjGenerales.GetGralPaqueterias Then Application("GlobalDTPaqueterias") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueterias") = Nothing
If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing 'If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing
If ObjGenerales.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing If ObjGenerales.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
End Using End Using
#If False Then
'SAT 'SAT
Using ObjGrales As New ClsGenerales Using ObjGrales As New ClsGenerales
If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing 'If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing 'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing
If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing
@@ -261,7 +262,7 @@
'If ObjGrales.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing 'If ObjGrales.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing
'If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing 'If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing
End Using End Using
#End If
GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now)) GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'E V E N T O S 'E V E N T O S

View File

@@ -190,6 +190,7 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/> <asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/>
<asp:BoundField DataField="Transito" ItemStyle-HorizontalAlign="Right" HeaderText="En Tránsito" DataFormatString="{0:#,###.######}" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View File

@@ -227,7 +227,7 @@
<Columns> <Columns>
<%--0--%> <%--0--%>
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Codigo" /> <asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Codigo" />
<%--1--%> <%--1--%>
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código2" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" Visible="False" DataTextField="Codigo2" /> <asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código2" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" Visible="False" DataTextField="Codigo2" />
<%--2--%> <%--2--%>

View File

@@ -54,21 +54,11 @@ Partial Class Inventarios_ReporteEntradasSalidas
Return (UsuarioActual.CveEmpresa.Contiene(72, 80)) Return (UsuarioActual.CveEmpresa.Contiene(72, 80))
End Get End Get
End Property End Property
Private Property Personalizo As Integer
Get
Return ViewState("Personalizo").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("Personalizo") = value
End Set
End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
Personalizo = 0
If UsuarioActual.CveEmpresa.Contiene(119) Then If UsuarioActual.CveEmpresa.Contiene(119) Then
LnkFormatoInventario.Visible = True LnkFormatoInventario.Visible = True
@@ -435,7 +425,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
#End Region #End Region
#Region "PERSONALIZAR" #Region "PERSONALIZAR"
Private Sub MostrarOcultarColumnas() Private Sub MostrarOcultarColumnas(Optional Personalizo As Boolean = True)
GvM.Columns(1).Visible = ChkCodigoAlterno.Checked GvM.Columns(1).Visible = ChkCodigoAlterno.Checked
GvM.Columns(2).Visible = ChkCodigoBarras.Checked GvM.Columns(2).Visible = ChkCodigoBarras.Checked
GvM.Columns(3).Visible = ChkClasificacion2.Checked GvM.Columns(3).Visible = ChkClasificacion2.Checked
@@ -510,12 +500,12 @@ Partial Class Inventarios_ReporteEntradasSalidas
dvCan.Style.Add("width", "21%") dvCan.Style.Add("width", "21%")
End If End If
Personalizo = 1 If Personalizo Then
If Personalizo = 1 Then
LnkExcelPersonalizado.Visible = True LnkExcelPersonalizado.Visible = True
Else Else
LnkExcelPersonalizado.Visible = False LnkExcelPersonalizado.Visible = False
End If End If
UPAcciones.Update()
UpEncabezado.Update() UpEncabezado.Update()
UPPMov.Update() UPPMov.Update()
@@ -524,7 +514,6 @@ Partial Class Inventarios_ReporteEntradasSalidas
Private Sub BtnPersonalizar_Click(sender As Object, e As EventArgs) Handles BtnPersonalizar.Click Private Sub BtnPersonalizar_Click(sender As Object, e As EventArgs) Handles BtnPersonalizar.Click
MostrarOcultarColumnas() MostrarOcultarColumnas()
RegistraScript("$('#DivPersonalizar').modal('hide')") RegistraScript("$('#DivPersonalizar').modal('hide')")
UPAcciones.Update()
'CargaDatos() 'CargaDatos()
End Sub End Sub

View File

@@ -184,20 +184,20 @@ Partial Class LogIn
Return URLParametros Return URLParametros
End Function End Function
Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1) As Data.DataTable 'Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1) As Data.DataTable
Get ' Get
If CveUsuario <> -1 Then ' If CveUsuario <> -1 Then
Dim Dv As New Data.DataView(DirectCast(Application("GlobalDTUsuarios"), Data.DataTable), "CveUsuario =" & CveUsuario, "", Data.DataViewRowState.CurrentRows) ' Dim Dv As New Data.DataView(DirectCast(Application("GlobalDTUsuarios"), Data.DataTable), "CveUsuario =" & CveUsuario, "", Data.DataViewRowState.CurrentRows)
GlobalDTUsuarios = Dv.ToTable ' GlobalDTUsuarios = Dv.ToTable
Dv.Dispose() ' Dv.Dispose()
Else ' Else
GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), Data.DataTable) ' GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), Data.DataTable)
End If ' End If
End Get ' End Get
Set(value As Data.DataTable) ' Set(value As Data.DataTable)
Application("GlobalDTUsuarios") = value ' Application("GlobalDTUsuarios") = value
End Set ' End Set
End Property 'End Property
Dim BtnLogIn_Clickenter As Integer = 0 Dim BtnLogIn_Clickenter As Integer = 0
Protected Sub BtnLogIn_Click(ByVal sender As Object, ByVal e As EventArgs) 'Handles CmdLogIn.Click Protected Sub BtnLogIn_Click(ByVal sender As Object, ByVal e As EventArgs) 'Handles CmdLogIn.Click
Dim ReturnUrl As String = "/" Dim ReturnUrl As String = "/"
@@ -251,16 +251,20 @@ Partial Class LogIn
Else Else
'PLATAFORMA SIG 'PLATAFORMA SIG
CType(Session("UsuarioSIG"), Usuario).CvePlataforma = 1 CType(Session("UsuarioSIG"), Usuario).CvePlataforma = 1
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario) Using ObjUsuarios As New ClsSisUsuarios
If dt IsNot Nothing Then If ObjUsuarios.GetUsuariosEmpresas(Usuario.CveUsuario) Then
If dt.Rows.Count >= 1 Then Dim dt As Data.DataTable = ObjUsuarios.DtResultados
If dt.Rows.Count > 1 Then If dt IsNot Nothing Then
Usuario.MultipleEmpresa = True If dt.Rows.Count >= 1 Then
If dt.Rows.Count > 1 Then
Usuario.MultipleEmpresa = True
End If
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
End If
End If End If
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False) dt.Dispose()
End If End If
End If End Using
dt.Dispose()
End If End If
Dim cookie = FormsAuthentication.GetAuthCookie(Usuario.CveUsuario, False) Dim cookie = FormsAuthentication.GetAuthCookie(Usuario.CveUsuario, False)

View File

@@ -434,8 +434,8 @@ public partial class Nomina_Aguinaldo : ClsPaginas
FraccionI = (aguinaldogravado / diasanio) * diasmes; FraccionI = (aguinaldogravado / diasanio) * diasmes;
FraccionII_1 = salariomensual + FraccionI; FraccionII_1 = salariomensual + FraccionI;
str.Clear(); str.Clear();
str.AppendFormat("SELECT dbo.Fnc_NomValues(40, 0, 00, -1, {0}, {1}, {1}) isrFraccionII_2,", FraccionII_1, diasmes); str.AppendFormat("SELECT dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionII_2,", FraccionII_1, diasmes, DdlEjercicios.SelectedValue);
str.AppendFormat(" dbo.Fnc_NomValues(40, 0, 00, -1, {0}, {1}, {1}) isrFraccionIII_1", salariomensual, diasmes); str.AppendFormat(" dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionIII_1", salariomensual, diasmes, DdlEjercicios.SelectedValue);
if (objbase.runQuerystr(str.ToString())) if (objbase.runQuerystr(str.ToString()))
{ {
DataRow drow = objbase.DtResultados.Rows[0]; DataRow drow = objbase.DtResultados.Rows[0];

View File

@@ -262,6 +262,9 @@
<li> <li>
<asp:LinkButton ID="LnkModalPlantillaNomina" OnClick="LnkModalPlantillaNomina_Click" runat="server"><i class="fa fa-upload"></i>Cargar masiva de conceptos</asp:LinkButton> <asp:LinkButton ID="LnkModalPlantillaNomina" OnClick="LnkModalPlantillaNomina_Click" runat="server"><i class="fa fa-upload"></i>Cargar masiva de conceptos</asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton ID="LnkCargaNetos" OnClick="LnkCargaNetos_Click" runat="server"><i class="fa fa-upload"></i>Cargar netos</asp:LinkButton>
</li>
<li> <li>
<asp:LinkButton ID="LnkVerTablas" OnClick="LnkVerTablas_Click" runat="server"><i class="fa fa-columns" aria-hidden="true"></i>Tablas de cálculo</asp:LinkButton> <asp:LinkButton ID="LnkVerTablas" OnClick="LnkVerTablas_Click" runat="server"><i class="fa fa-columns" aria-hidden="true"></i>Tablas de cálculo</asp:LinkButton>
</li> </li>
@@ -404,7 +407,7 @@
<label class="col-md-1 compoonenlabel" style="line-height: 1; max-width: 85px;">Tipo Trabajador:</label> <label class="col-md-1 compoonenlabel" style="line-height: 1; max-width: 85px;">Tipo Trabajador:</label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList Width="100%" ID="DdlTipoTrabajador" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" <asp:DropDownList Width="100%" ID="DdlTipoTrabajador" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true"
DataTextField="TipoTrabajadorB" DataValueField="CveTipoTrabajador" ValidationGroup="GrpGuardar"> DataTextField="TipoTrabajadorB" DataValueField="CveTipoTrabajador" ValidationGroup="GrpGuardar">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-2" style="max-width: 160px !important; white-space: nowrap;"> <div class="col-md-2" style="max-width: 160px !important; white-space: nowrap;">
@@ -629,7 +632,7 @@
<%--<asp:LinkButton ID="LnkProcesarReporteIncidenciaCitrus" CssClass="btn yellow-gold" OnClick="LnkProcesarReporteIncidenciaCitrus_Click" runat="server">Descargar</asp:LinkButton> <%--<asp:LinkButton ID="LnkProcesarReporteIncidenciaCitrus" CssClass="btn yellow-gold" OnClick="LnkProcesarReporteIncidenciaCitrus_Click" runat="server">Descargar</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" CssClass="btn yellow-gold" OnClick="LnkMostrarocultarConceptos_Click" runat="server">Cargar</asp:LinkButton>--%> <asp:LinkButton ID="LinkButton1" CssClass="btn yellow-gold" OnClick="LnkMostrarocultarConceptos_Click" runat="server">Cargar</asp:LinkButton>--%>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" class="btn-group "> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" class="btn-group ">
<ContentTemplate> <ContentTemplate>
<a class="btn yellow-gold btn-sm" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" aria-expanded="true"><i class="sidebar-toggler-wrapper"></i>Asistencia <a class="btn yellow-gold btn-sm" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" aria-expanded="true"><i class="sidebar-toggler-wrapper"></i>Asistencia
<i class="fa fa-angle-down"></i> <i class="fa fa-angle-down"></i>
@@ -663,7 +666,7 @@
<asp:Literal ID="ltlGvAsistencia" runat="server"></asp:Literal> <asp:Literal ID="ltlGvAsistencia" runat="server"></asp:Literal>
</div> </div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
</ajax:TabContainer> </ajax:TabContainer>
</ContentTemplate> </ContentTemplate>
@@ -3231,7 +3234,7 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div id="DModalAsistenciaTabular" class="modal ADS fade" role="dialog"> <div id="DModalAsistenciaTabular" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpdatePanel3" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpdatePanel3" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -3269,7 +3272,7 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
@@ -3364,6 +3367,9 @@
</div> </div>
<div class="portlet-body rowpadding "> <div class="portlet-body rowpadding ">
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox> <asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
<div class=" text-right">
<asp:CheckBox ID="ChkRecalcularNomina" Text="¿Volver a calcular la nómina?" runat="server" />
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -3383,6 +3389,60 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div id="DmodalNetos" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpdatePanel4" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Cargar Netos </h4>
</div>
<div class="modal-body">
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-upload font-green"></i>
<span class="caption-subject bold uppercase">Cargar archivo </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkFormatoNetos" OnClick="LnkFormatoNetos_Click" CssClass="btn yellow-gold" runat="server"><i class="fa fa-download"></i> Descargar Plantilla</asp:LinkButton>
</div>
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body rowpadding ">
<asp:TextBox ID="TxtCargarNetos" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkCargarNominaNetos" OnClick="LnkCargarNomina_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkFormatoNetos" />
</Triggers>
</asp:UpdatePanel>
</div>
<div id="DModalCargaASistenciaMasiva" class="modal ADS fade" role="dialog"> <div id="DModalCargaASistenciaMasiva" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpModalAsistenciaMasiva" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpModalAsistenciaMasiva" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>

View File

@@ -134,7 +134,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
set { ViewState["PermisoEmitir"] = value; } set { ViewState["PermisoEmitir"] = value; }
} }
protected int CveTipoTrabajador protected int CveTipoTrabajador
{ {
get get
@@ -247,9 +247,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (!IsPostBack) if (!IsPostBack)
{ {
LnkCargaNetos.Visible = (UsuarioActual.CveRol == 1);
using (ClsRH objrh = new ClsRH()) using (ClsRH objrh = new ClsRH())
{ {
if(objrh.TiposTrabajadorGet(-1, UsuarioActual.CveEmpresa)) if (objrh.TiposTrabajadorGet(-1, UsuarioActual.CveEmpresa))
{ {
DataTable dt = objrh.DtResultados; DataTable dt = objrh.DtResultados;
DataRow drow = dt.NewRow(); DataRow drow = dt.NewRow();
@@ -259,13 +260,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
dt.AcceptChanges(); dt.AcceptChanges();
DdlTipoTrabajador.DataSource = dt; DdlTipoTrabajador.DataSource = dt;
DdlTipoTrabajador.DataBind(); DdlTipoTrabajador.DataBind();
DdlTipoTrabajador.SelectedValueExist( "-1"); DdlTipoTrabajador.SelectedValueExist("-1");
} }
} }
if (UsuarioActual.CveUsuario == 100) if (UsuarioActual.CveUsuario == 100)
{ {
Alert("recuerda que solo la empresa (119) tiene activado el timbrado 4.0", TipoMensaje.ToastAdventencia); Alert("recuerda que solo la empresa (119) tiene activado el timbrado 4.0", TipoMensaje.ToastAdventencia);
} }
//CreaObjetoEmpresa(UsuarioActual); //CreaObjetoEmpresa(UsuarioActual);
DataTable dtperinc = null; DataTable dtperinc = null;
using (ClsNominas objnom = new ClsNominas()) using (ClsNominas objnom = new ClsNominas())
@@ -1311,9 +1312,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
{ {
LogicNominas lognom = new LogicNominas(); LogicNominas lognom = new LogicNominas();
string Msg = ""; string Msg = "";
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3)); Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
if (Msg != null && Msg.Length > 0) if (Msg != null && Msg.Length > 0)
{ {
Msg = msgCorregidoSat(Msg, CvePersonal, RFC, CURP); Msg = msgCorregidoSat(Msg, CvePersonal, RFC, CURP);
@@ -1498,8 +1499,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
UsuarioActual = this.UsuarioActual; UsuarioActual = this.UsuarioActual;
}*/ }*/
string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4)); string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4));
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3)); Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
if (Msg != null && Msg.Length > 0) if (Msg != null && Msg.Length > 0)
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{0}", Msg), TipoMensaje.MsgAdvertencia); } { Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{0}", Msg), TipoMensaje.MsgAdvertencia); }
else else
@@ -1742,6 +1743,178 @@ public partial class Nomina_Nomina2 : ClsPaginas
UpCargarNomina.Update(); UpCargarNomina.Update();
} }
protected void LnkCargaNetos_Click(object sender, EventArgs e)
{
RegistraScript("$('#DmodalNetos').modal();");
}
protected void LnkFormatoNetos_Click(object sender, EventArgs e)
{
try
{
StringBuilder str = new StringBuilder("0");
bool continuar = false;
using (ClsNominas ObjNomina = new ClsNominas())
{
if (ObjNomina.GetConceptos(UsuarioActual.CveEmpresa))
{
GVConceptosPlantilla.DataSource = ObjNomina.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}");
GVConceptosPlantilla.DataBind();
foreach (DataRow gvrow in ObjNomina.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveSistema =-1").Rows)
{
if (gvrow["CveConcepto"].ToEntero() > 0 )
{
str.AppendFormat(",{0}", gvrow["CveConcepto"]);
continuar = true;
}
}
}
}
string msgerror = "Debe seleccionar los conceptos a cargar.";
if (dtConceptos == null || dtConceptos.Columns.Count <= 2)
{
msgerror = "Debe cargar el periodo antes de descargar la plantilla";
continuar = false;
}
if (continuar)
{
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
var libro = wb.AddWorksheet("Nomina");
int column = 1;
libro.Row(1).Hide();
libro.Cell(1, column).Value = "Codigo";
libro.Cell(3, column).Value = "Codigo";
column++;
libro.Cell(1, column).Value = "Empleado";
libro.Cell(3, column).Value = "Empleado";
libro.Column(column).Width = 35;
DataTable dtcP = dtConceptos.FiltraParametros(string.Format("Tipo = 'P' AND EsPadre = 1 AND CveConcepto in({0})", str));
DataTable dtcD = dtConceptos.FiltraParametros(string.Format("Tipo = 'D' AND EsPadre = 1 AND CveConcepto in({0})", str));
DataTable dtcO = dtConceptos.FiltraParametros(string.Format("Tipo = 'O' AND EsPadre = 1 AND CveConcepto in({0})", str));
int iniciotipe = column;
foreach (DataRow row in dtcP.Rows)
{
column++;
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
libro.Cell(FilaConceptos, column).Value = "S";
libro.Cell(3, column).Value = row["Concepto"].ToString();
libro.Cell(4, column).Value = row["Codigo"].ToString();
libro.Column(column).Width = 15;
}
if (iniciotipe < column)
{
libro.Range(2, iniciotipe + 1, 2, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(2, iniciotipe + 1, 2, column).Merge().Value = "-";
}
iniciotipe = column;
foreach (DataRow row in dtcD.Rows)
{
column++;
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
libro.Cell(FilaConceptos, column).Value = "S";
libro.Cell(3, column).Value = row["Concepto"].ToString();
libro.Cell(4, column).Value = row["Codigo"].ToString();
libro.Column(column).Width = 15;
}
if (iniciotipe < column)
{
libro.Range(2, iniciotipe + 1, 2, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(2, iniciotipe + 1, 2, column).Merge().Value = "-";
}
iniciotipe = column;
foreach (DataRow row in dtcO.Rows)
{
column++;
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
libro.Cell(FilaConceptos, column).Value = "S";
libro.Cell(3, column).Value = row["Concepto"].ToString();
libro.Cell(4, column).Value = row["Codigo"].ToString();
libro.Column(column).Width = 15;
}
if (iniciotipe < column)
{
libro.Range(2, iniciotipe + 1, 2, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(2, iniciotipe + 1, 2, column).Merge().Value = "-";
}
libro.Range(2, 1, 2, 2).Merge().Value = "";
libro.Range(4, 1, 4, 2).Merge().Value = "";
libro.Range(2, 1, 2, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Range(4, 1, 4, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(2).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(3).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(4).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(FilaConceptos).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Row(2).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Row(3).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Row(4).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
//libro.Row(FilaConceptos).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Cell(FilaConceptos, 1).Value = "'-------";
libro.Cell(FilaConceptos, 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.FromArgb(177, 160, 199);
libro.Cell(FilaConceptos, 2).Value = "¿Modificar SI(S)/NO(N)?";
libro.Cell(FilaConceptos, 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(177, 160, 199));
libro.Row(FilaConceptos).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(177, 160, 199));
int Fila = 5;
foreach (DataRow erow in dtempleados.FiltraParametros("CvePersonal>0 AND NomAutorizado=0").Rows)
{
Fila++;
column = 1;
libro.Cell(Fila, column).Value = string.Format("'{0}", erow["Codigo"]);
column++;
libro.Cell(Fila, column).Value = erow["Nombre"];
foreach (DataRow row in dtcP.Rows)
{
column++;
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
libro.Cell(Fila, column).Value = erow[Concepto];
}
foreach (DataRow row in dtcD.Rows)
{
column++;
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
libro.Cell(Fila, column).Value = erow[Concepto];
}
foreach (DataRow row in dtcO.Rows)
{
column++;
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
libro.Cell(Fila, column).Value = erow[Concepto];
}
}
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "Plantilla conceptos nómina "));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}
else
{
Alert(msgerror, TipoMensaje.MsgAdvertencia);
}
}
catch (Exception ex)
{
Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString(), TipoMensaje.MsgAdvertencia);
}
}
protected void LnkFormato_Click(object sender, EventArgs e) protected void LnkFormato_Click(object sender, EventArgs e)
{ {
try try
@@ -1909,6 +2082,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
int chkImporte = 1; int chkImporte = 1;
int chkImporteGravado = 0; int chkImporteGravado = 0;
List<Archivo> Filesgral = TxtArchivoNomina.getfiles().Archivos; List<Archivo> Filesgral = TxtArchivoNomina.getfiles().Archivos;
if(((LinkButton)sender).ID == LnkCargarNominaNetos.ID)
{
Filesgral = TxtCargarNetos.getfiles().Archivos;
}
bool continuar = Filesgral.Count > 0; bool continuar = Filesgral.Count > 0;
string stringError = ""; string stringError = "";
Archivo fileItem = continuar ? Filesgral[0] : null; Archivo fileItem = continuar ? Filesgral[0] : null;
@@ -1924,6 +2102,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
stringError = "No se inserto un archivo de tipo Excel"; stringError = "No se inserto un archivo de tipo Excel";
} }
}
else
{
stringError = "favor de ingresar el archivo y esperar a que cargue";
} }
if (!(CvePeriodoSeleccionado >= 0)) if (!(CvePeriodoSeleccionado >= 0))
{ {
@@ -2105,6 +2288,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
else else
{ {
Alert("La información se a actualizado satisfactoriamente"); Alert("La información se a actualizado satisfactoriamente");
if (((LinkButton)sender).ID == LnkCargarNominaNetos.ID || ChkRecalcularNomina.Checked)
{
cargaDatos(false);
}
} }
} }
@@ -6423,7 +6610,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
ObjPersonal.IniciaTransacSQL(); ObjPersonal.IniciaTransacSQL();
bool OcurrioError = false; bool OcurrioError = false;
if (!ObjPersonal.AddAsistenciaMasiva2(DdlPeriodoCM.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,-1)) if (!ObjPersonal.AddAsistenciaMasiva2(DdlPeriodoCM.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1))
OcurrioError = true; OcurrioError = true;
if (OcurrioError) if (OcurrioError)
@@ -8267,7 +8454,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
for (int i = 2; i < DTEXcel.Columns.Count; i++) for (int i = 2; i < DTEXcel.Columns.Count; i++)
{ {
DateTime FechaAsis = DTEXcel.Columns[i].ColumnName.ToDateTime(); DateTime FechaAsis = DTEXcel.Columns[i].ColumnName.ToDateTime();
if( FechaAsis < fechai || FechaAsis > fechaf) if (FechaAsis < fechai || FechaAsis > fechaf)
{ {
continuar = false; continuar = false;
stringError = "Las fechas no concuerdadn con el periodo seleccionado"; stringError = "Las fechas no concuerdadn con el periodo seleccionado";

View File

@@ -132,6 +132,7 @@
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlGrupo" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlGrupo" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Familia-Marca-Linea" Value="1"></asp:ListItem> <asp:ListItem Selected="True" Text="Familia-Marca-Linea" Value="1"></asp:ListItem>
<asp:ListItem Text="Familia-Linea" Value="2"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>