diff --git a/AIMMGM/VentasPS.aspx.vb b/AIMMGM/VentasPS.aspx.vb
index b80c442e3..7211c69b9 100644
--- a/AIMMGM/VentasPS.aspx.vb
+++ b/AIMMGM/VentasPS.aspx.vb
@@ -51,7 +51,7 @@ Partial Class AIMMGM_Ventas
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
- Gv.ExportToExcelx("ListadoVentas")
+ Gv.ExportToExcelX("ListadoVentas")
End Sub
Protected Sub DdlTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipo.SelectedIndexChanged
diff --git a/Acumuladores/CatFoliosGarantia.aspx.vb b/Acumuladores/CatFoliosGarantia.aspx.vb
index b6456f11d..739276730 100644
--- a/Acumuladores/CatFoliosGarantia.aspx.vb
+++ b/Acumuladores/CatFoliosGarantia.aspx.vb
@@ -247,7 +247,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Protected Sub BtnExportarExcel_Click(sender As Object, e As EventArgs)
GvGarantiasDetalle.ExportToExcelG(LblFolio.Text, "Ajustes de Garantía", UsuarioActual)
- 'GvGarantiasDetalle.ExportToExcelx(LblFolio.Text)
+ 'GvGarantiasDetalle.ExportToExcelX(LblFolio.Text)
End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 59b3e072a..93713d476 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -46,6 +46,7 @@ Public Class ClsPaginas
End Property
#Region "Propiedades"
+ Private Shared ReadOnly Property Rand As New Random()
Private Property SubReportData As Modelos.MSubReportData
Get
@@ -197,32 +198,34 @@ Public Class ClsPaginas
End Set
End Property
- 'Property GlobalValidarCFDI As Boolean
- ' Get
- ' GlobalValidarCFDI = CBool(Application("GlobalValidarCFDI"))
- ' End Get
- ' Set(value As Boolean)
- ' Application("GlobalValidarCFDI") = value
- ' End Set
- 'End Property
+
Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1) As DataTable
Get
+ Dim AppNombre As String = String.Format("GlobalDTUsuarios-{0}", CveEmpresa)
+ If Application(AppNombre) Is Nothing Then
+ Using ObjUsuarios As New ClsSisUsuarios
+ If ObjUsuarios.GetUsuariosEmpresas(-1, CveEmpresa) Then Application(AppNombre) = ObjUsuarios.DtResultados
+ End Using
+ End If
+
Dim Str As New StringBuilder
If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario)
- If CveEmpresa <> -1 Then Str.AppendFormat(" {0} CveEmpresa = {1}", If(Str.Length > 0, "AND", ""), CveEmpresa)
+ 'If CveEmpresa <> -1 Then Str.AppendFormat(" {0} CveEmpresa = {1}", If(Str.Length > 0, "AND", ""), CveEmpresa)
If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente)
If CveProveedor <> -1 Then Str.AppendFormat(" {0} CveProveedor = {1}", If(Str.Length > 0, "AND", ""), CveProveedor)
If CveUsuario <> -1 OrElse CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTUsuarios = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), DataTable)
+ GlobalDTUsuarios = DirectCast(Application(AppNombre), DataTable)
End If
+
End Get
Set(value As DataTable)
- Application("GlobalDTUsuarios") = value
+ Dim AppNombre As String = String.Format("GlobalDTUsuarios-{0}", CveEmpresa)
+ Application(AppNombre) = value
End Set
End Property
Property GlobalDTNomConceptos(CveEmpresa As Integer) As DataTable
@@ -630,12 +633,32 @@ Public Class ClsPaginas
Application("GlobalDTNomConceptosFunciones") = value
End Set
End Property
- Property GlobalDTUsuarioResponsable() As DataTable
+ Property GlobalDTUsuarioResponsable(CveEmpresa As Integer) As DataTable
Get
- GlobalDTUsuarioResponsable = DirectCast(Application("GlobalDTUsuarioResponsable"), DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTUsuarioResponsable-{0}", CveEmpresa)
+ If Application(AppNombre) Is Nothing Then
+ Using ObjUsuarios As New ClsSisUsuarios
+ If ObjUsuarios.GetUsuariosEmpresas(-1, CveEmpresa) Then Application(AppNombre) = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0")
+ End Using
+ End If
+
+ 'Dim Str As New StringBuilder
+ ''If CveEmpresa <> -1 Then Str.AppendFormat(" {0} CveEmpresa = {1}", If(Str.Length > 0, "AND", ""), CveEmpresa)
+ 'If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente)
+ 'If CveProveedor <> -1 Then Str.AppendFormat(" {0} CveProveedor = {1}", If(Str.Length > 0, "AND", ""), CveProveedor)
+
+ 'If CveUsuario <> -1 OrElse CveEmpresa <> -1 Then
+ ' Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ ' GlobalDTUsuarios = Dv.ToTable
+ ' Dv.Dispose()
+ 'Else
+ GlobalDTUsuarioResponsable = DirectCast(Application(AppNombre), DataTable)
+ ' End If
+
End Get
Set(value As DataTable)
- Application("GlobalDTUsuarioResponsable") = value
+ Dim AppNombre As String = String.Format("GlobalDTUsuarioResponsable-{0}", CveEmpresa)
+ Application(AppNombre) = value
End Set
End Property
Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable
@@ -807,19 +830,37 @@ Public Class ClsPaginas
Application("GlobalDTNomSatTipoIncapacidad") = value
End Set
End Property
- Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
+ Public Shared Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
Get
+ Dim AppNombre As String = "GlobalDTEmpresas"
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Using ObjEmpresas As New ClsSisEmpresas()
+ If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then
+ HttpContext.Current.Application(AppNombre) = ObjEmpresas.DtResultados
+ 'verifico si existe la carpeta de la empresa, sino la crea
+ For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows
+ Dim Ruta As String = String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa"))
+ If Not IO.Directory.Exists(Ruta) Then IO.Directory.CreateDirectory(Ruta)
+ If Not System.IO.Directory.Exists(String.Format("{0}\XML\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\XML\", Ruta))
+ If Not System.IO.Directory.Exists(String.Format("{0}\PDF\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\PDF\", Ruta))
+
+ Next
+ End If
+ End Using
+ End If
If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTEmpresas = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTEmpresas = DirectCast(Application("GlobalDTEmpresas"), DataTable)
+ GlobalDTEmpresas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
+
End Get
Set(ByVal value As DataTable)
- Application("GlobalDTEmpresas") = value
+ Dim AppNombre As String = "GlobalDTEmpresas"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
@@ -1113,12 +1154,19 @@ Public Class ClsPaginas
Application("GlobalDTClasificacionesPresupuestos") = value
End Set
End Property
- Property GlobalDTMetodosPago() As DataTable
+ Public Shared Property GlobalDTMetodosPago() As DataTable
Get
- GlobalDTMetodosPago = DirectCast(Application("GlobalDTMetodosPago"), DataTable)
+ Dim AppNombre As String = "GlobalDTMetodosPago"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjMetodoPago As New ClsMetodosPagos
+ If ObjMetodoPago.GetMetodosPago() Then HttpContext.Current.Application(AppNombre) = ObjMetodoPago.DtResultados
+ ObjMetodoPago.Dispose()
+ End If
+ GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTMetodosPago") = value
+ Dim AppNombre As String = "GlobalDTMetodosPago"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTModulos() As DataTable
@@ -1337,106 +1385,109 @@ Public Class ClsPaginas
Application("GlobalDTEstatusOrdenCompra") = value
End Set
End Property
- Property GlobalDTLeyendasFiscales() As DataTable
+ Public Shared Property GlobalDTLeyendasFiscales() As DataTable
Get
- GlobalDTLeyendasFiscales = DirectCast(Application("GlobalDTLeyendasFiscales"), DataTable)
+ Dim AppNombre As String = "GlobalDTLeyendasFiscales"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjLeyendasFiscales As New ClsLeyendasFiscales
+ If ObjLeyendasFiscales.GetLeyendasFiscales() Then HttpContext.Current.Application(AppNombre) = ObjLeyendasFiscales.DtResultados
+ ObjLeyendasFiscales.Dispose()
+ End If
+ GlobalDTLeyendasFiscales = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTLeyendasFiscales") = value
+ Dim AppNombre As String = "GlobalDTLeyendasFiscales"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
-
- Property GlobalDTEstatusFactura() As DataTable
+ Public Shared Property GlobalDTEstatusFactura() As DataTable
Get
- GlobalDTEstatusFactura = DirectCast(Application("GlobalDTEstatusFactura"), DataTable)
+ Dim AppNombre As String = "GlobalDTEstatusFactura"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjEstatusFactura As New ClsEstatusFactura
+ If ObjEstatusFactura.GetEstatusFactura() Then HttpContext.Current.Application(AppNombre) = ObjEstatusFactura.DtResultados
+ ObjEstatusFactura.Dispose()
+ End If
+ GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTEstatusFactura") = value
+ Dim AppNombre As String = "GlobalDTEstatusFactura"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
+ Public Shared Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
Get
-
- If DirectCast(Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then
- Dim P As New ClsProyectos
- If P.GetProyectos Then
- Application("GlobalDTProyectos") = P.DtResultados
- End If
- P.Dispose()
+ Dim AppNombre As String = $"GlobalDTProyectos-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing OrElse DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0 Then
+ Dim ObjProyectos As New ClsProyectos
+ If ObjProyectos.GetProyectos(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjProyectos.DtResultados
+ ObjProyectos.Dispose()
Dim msg As String = "aqui no se carga proyectos"
- If Request IsNot Nothing Then
- msg = msg & Request.ServerVariables("URL")
+ If HttpContext.Current.Request IsNot Nothing Then
+ msg += HttpContext.Current.Request.ServerVariables("URL")
End If
msg.GuardaLog()
-
End If
-
- If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1
-
- Dim StrSQL As New StringBuilder
- If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto)
- If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
+ If Estatus <> -1 Then 'OrElse CveProyecto <> -1
+ 'Dim StrSQL As New StringBuilder
+ 'If Estatus <> -1 Then StrSQL.Append($"Estatus = {Estatus}")
+ 'If CveProyecto <> -1 Then StrSQL.Append(" {If(StrSQL.Length > 0, "AND", "")} CveProyecto = {CveProyecto}")
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveEstatus = {Estatus}", "", DataViewRowState.CurrentRows)
GlobalDTProyectos = Dv.ToTable
Dv.Dispose()
-
Else
- GlobalDTProyectos = DirectCast(Application("GlobalDTProyectos"), DataTable)
+ GlobalDTProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
-
End Get
- Set(ByVal value As DataTable)
+ Set(value As DataTable)
If value Is Nothing OrElse value.Rows.Count = 0 Then
Dim msg As String = "aqui no se carga proyectos"
- If Request IsNot Nothing Then
- msg = msg & Request.ServerVariables("URL")
+ If HttpContext.Current.Request IsNot Nothing Then
+ msg += HttpContext.Current.Request.ServerVariables("URL")
End If
msg.GuardaLog()
-
End If
- Application("GlobalDTProyectos") = value
+ Dim AppNombre As String = $"GlobalDTProyectos-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
+ Public Shared Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
'sino existe, recarga los datos
- If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then
+ If HttpContext.Current.Application(AppNombre) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
Dim P As New ClsSubProyectos
- If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados
+ If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
P.Dispose()
End If
- If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
+ If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse Estatus <> -1 Then
Dim StrSQL As New StringBuilder
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTSubProyectos = Dv.ToTable
Dv.Dispose()
-
Else
- GlobalDTSubProyectos = DirectCast(Application(AppNombre), DataTable)
+ GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(ByVal value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
+ Public Shared Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTSubProyectosUsuarios-{0}", CveEmpresa)
- If Application(AppNombre) Is Nothing Then
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjSubProyectos.DtResultados Else Alert("Ocurrió un error al cargar los SubProyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
+ If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjSubProyectos.DtResultados
ObjSubProyectos.Dispose()
End If
@@ -1448,34 +1499,26 @@ Public Class ClsPaginas
If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", CveEstatus)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTSubProyectosUsuarios = Dv.ToTable
Dv.Dispose()
- 'Dim ObjSubProyectos As New ClsSubProyectos()
- 'If ObjSubProyectos.GetSubProyectosUsuarios(CveUsuario:=CveUsuario, CveProyecto:=CveProyecto, CveSubProyecto:=CveSubProyecto, CveEstatus:=CveEstatus, CveEmpresa:=CveEmpresa) Then
- ' GlobalDTSubProyectosUsuarios = ObjSubProyectos.DtResultados
- 'Else
- ' GlobalDTSubProyectosUsuarios = Nothing
- 'End If
- 'ObjSubProyectos.Dispose()
-
Else
- GlobalDTSubProyectosUsuarios = DirectCast(Application(AppNombre), DataTable)
+ GlobalDTSubProyectosUsuarios = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(ByVal value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTSubProyectosUsuarios-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable
+ Public Shared Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTProyectosUsuarios-{0}", CveEmpresa)
- If Application(AppNombre) Is Nothing Then
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
+ If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"})
ObjSubProyectos.Dispose()
End If
@@ -1486,26 +1529,34 @@ Public Class ClsPaginas
If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatusProyecto = {0}", CveEstatus)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTProyectosUsuarios = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTProyectosUsuarios = DirectCast(Application(AppNombre), DataTable)
+ GlobalDTProyectosUsuarios = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(ByVal value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTProyectosUsuarios-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable
Get
- GlobalDTPrecioListas = DirectCast(Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
+ Dim AppNombre As String = $"GlobalDTPrecioListas-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetPrecioListas(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTPrecioListas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTPrecioListas") = value
+ Dim AppNombre As String = $"GlobalDTPrecioListas-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
'Property GlobalDTMesas() As DataTable
@@ -1655,7 +1706,7 @@ Public Class ClsPaginas
' Application("GlobalDTProductosServicios") = value
' End Set
'End Property
- ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable
+ Public Shared ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable
Get
Dim ObjPS As New ClsProductosServicios
@@ -1738,16 +1789,14 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
- Public Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa)
- If CveEmpresa <> -1 Then
- 'sino existe, recarga los datos
- If Application(AppNombre) Is Nothing Then
- Dim ObjPS As New ClsProductosServicios
- If ObjPS.GetPSEquivalencias(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados
- ObjPS.Dispose()
- End If
+
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjPS As New ClsProductosServicios
+ If ObjPS.GetPSEquivalencias(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjPS.DtResultados
+ ObjPS.Dispose()
End If
If CvePS <> -1 OrElse CveUM <> -1 Then
@@ -1756,16 +1805,16 @@ Public Class ClsPaginas
If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTProductosServiciosEquivalencias = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTProductosServiciosEquivalencias = DirectCast(Application(AppNombre), DataTable)
+ GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
@@ -1918,12 +1967,19 @@ Public Class ClsPaginas
End Set
End Property
'Bancos
- Property GlobalDTBancos() As DataTable
+ Public Shared Property GlobalDTBancos() As DataTable
Get
- GlobalDTBancos = DirectCast(Application("GlobalDTBancos"), DataTable)
+ Dim AppNombre As String = "GlobalDTBancos"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjBancos As New ClsBancos
+ If ObjBancos.GetBancos() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
+ ObjBancos.Dispose()
+ End If
+ GlobalDTBancos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTBancos") = value
+ Dim AppNombre As String = "GlobalDTBancos"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
'Property GlobalDTBancosCuentas(CveUsuario As Integer) As DataTable
@@ -1940,54 +1996,64 @@ Public Class ClsPaginas
' Application("GlobalDTBancosCuentas") = value
' End Set
'End Property
- Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1, Optional CveTipoCuenta As Integer = -1) As DataTable
+ Public Shared Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1, Optional CveTipoCuenta As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjBancos As New ClsBancos
If ObjBancos.GetBancosCuentasUsuarios(-1, CveEmpresa) Then
- Application(AppNombre) = ObjBancos.DtResultados
+ HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
Else
- Application(AppNombre) = Nothing
+ HttpContext.Current.Application(AppNombre) = Nothing
End If
End Using
End If
- Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
+ Dim Str As String = String.Format("CveEmpresa = {0} ", CveEmpresa)
If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario)
If CveTipoCuenta > -1 Then Str = String.Format("{0} AND CveTipoCuenta = {1}", Str, CveTipoCuenta)
If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta)
If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows)
GlobalDTBancosCuentas = Dv.ToTable
Dv.Dispose()
'GlobalDTBancosCuentas = DirectCast(Application("GlobalDTBancosCuentas"), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTTipoTransacciones() As DataTable
+ Public Shared Property GlobalDTTipoTransacciones() As DataTable
Get
- If UsuarioActual.CveEmpresa = 66 Then
- GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable).FiltraParametros("Estatus = 1")
- Else
- GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable)
+ Dim AppNombre As String = "GlobalDTTipoTransacciones"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjBancos As New ClsBancos
+ If ObjBancos.GetBancos_TiposTransaccion(-1) Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
+ ObjBancos.Dispose()
End If
+ GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTTipoTransacciones") = value
+ Dim AppNombre As String = "GlobalDTTipoTransacciones"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTBancosEstatusIE() As DataTable
+ Public Shared Property GlobalDTBancosEstatusIE() As DataTable
Get
- GlobalDTBancosEstatusIE = DirectCast(Application("GlobalDTBancosEstatusIE"), DataTable)
+ Dim AppNombre As String = "GlobalDTBancosEstatusIE"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjBancos As New ClsBancos
+ If ObjBancos.GetBancos_EstatusIE() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
+ ObjBancos.Dispose()
+ End If
+ GlobalDTBancosEstatusIE = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTBancosEstatusIE") = value
+ Dim AppNombre As String = "GlobalDTBancosEstatusIE"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTBancosIE() As DataTable
@@ -1998,12 +2064,19 @@ Public Class ClsPaginas
Application("GlobalDTBancosIE") = value
End Set
End Property
- Property GlobalDTTipoCuenta() As DataTable
+ Public Shared Property GlobalDTTipoCuenta() As DataTable
Get
- GlobalDTTipoCuenta = DirectCast(Application("GlobalDTTipoCuenta"), DataTable)
+ Dim AppNombre As String = "GlobalDTTipoCuenta"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjBancos As New ClsBancos
+ If ObjBancos.GetBancos_TiposCuenta() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
+ ObjBancos.Dispose()
+ End If
+ GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTTipoCuenta") = value
+ Dim AppNombre As String = "GlobalDTTipoCuenta"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
'Fin Bancos
@@ -2249,39 +2322,44 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
- Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoAlmacen = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoAlmacen = DirectCast(Application("GlobalDTTipoAlmacen"), DataTable)
+ Dim AppNombre As String = $"GlobalDTTipoAlmacen-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim Objinventarios As New ClsInventarios
+ If Objinventarios.GetTiposAlmacenes() Then HttpContext.Current.Application(AppNombre) = Objinventarios.DtResultados
+ Objinventarios.Dispose()
End If
-
+ GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTTipoAlmacen") = value
+ Dim AppNombre As String = $"GlobalDTTipoAlmacen-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTInvConceptos() As DataTable
+ Public Shared Property GlobalDTInvConceptos() As DataTable
Get
-
- Return DirectCast(Application("GlobalDTInvConceptos"), DataTable)
-
+ Dim AppNombre As String = "GlobalDTInvConceptos"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim Objinventarios As New ClsInventarios
+ If Objinventarios.GetConceptos() Then HttpContext.Current.Application(AppNombre) = Objinventarios.DtResultados
+ Objinventarios.Dispose()
+ End If
+ GlobalDTInvConceptos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTInvConceptos") = value
+ Dim AppNombre As String = "GlobalDTInvConceptos"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
-
- Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
+ Public Shared Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
'sino existe, recarga los datos
- If Application(AppNombre) Is Nothing Then
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjUsr As New ClsInventarios
- If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then Application(AppNombre) = ObjUsr.DtResultados
+ If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
ObjUsr.Dispose()
End If
@@ -2292,31 +2370,15 @@ Public Class ClsPaginas
If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTAlmacen = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
- 'Get
- ' Dim Str As New StringBuilder
- ' Str.Append("1=1 AND ")
- ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
- ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
- ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
- ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
-
- ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTAlmacen = Dv.ToTable
- ' Dv.Dispose()
-
- 'End Get
- 'Set(value As DataTable)
- ' Application("GlobalDTAlmacen") = value
- 'End Set
End Property
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1, Optional CveEstatus As Integer = 1) As DataTable
Get
@@ -2343,31 +2405,26 @@ Public Class ClsPaginas
End Set
End Property
- Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable
+ Public Shared Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable
Get
- Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa)
+ Dim AppNombre As String = $"GlobalDTSeccionAlmacen-{CveEmpresa}"
'sino existe, recarga los datos
- If Application(AppNombre) Is Nothing Then
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjInv As New ClsInventarios
- If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then Application(AppNombre) = ObjInv.DtResultados
+ If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjInv.DtResultados
ObjInv.Dispose()
End If
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
-
- If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
- If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ If CveAlmacen > 0 Then
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveAlmacen = {CveAlmacen}", "", DataViewRowState.CurrentRows)
GlobalDTSeccionAlmacen = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTSeccionAlmacen = DirectCast(Application("GlobalDTSeccionAlmacen"), DataTable)
+ GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
-
End Get
Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa)
- Application(AppNombre) = value
+ Dim AppNombre As String = $"GlobalDTSeccionAlmacen-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
@@ -2425,54 +2482,89 @@ Public Class ClsPaginas
Application("GlobalDTNom_Periodos") = value
End Set
End Property
- Public Property GlobalDTVtaFormaPago() As DataTable
+ Public Shared Property GlobalDTVtaFormaPago() As DataTable
Get
- GlobalDTVtaFormaPago = DirectCast(Application("GlobalDTVtaFormaPago"), DataTable)
+ Dim AppNombre As String = "GlobalDTVtaFormaPago"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetFormaPago() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTVtaFormaPago") = value
+ Dim AppNombre As String = "GlobalDTVtaFormaPago"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTVtaMetodoPago() As DataTable
+ Public Shared Property GlobalDTVtaMetodoPago() As DataTable
Get
- GlobalDTVtaMetodoPago = DirectCast(Application("GlobalDTVtaMetodoPago"), DataTable)
+ Dim AppNombre As String = "GlobalDTVtaMetodoPago"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetMetodoPago() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTVtaMetodoPago") = value
+ Dim AppNombre As String = "GlobalDTVtaMetodoPago"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTVtaTiposRelacion() As DataTable
+ Public Shared Property GlobalDTVtaTiposRelacion() As DataTable
Get
- GlobalDTVtaTiposRelacion = DirectCast(Application("GlobalDTVtaTiposRelacion"), DataTable)
+ Dim AppNombre As String = "GlobalDTVtaTiposRelacion"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetTiposRelacion() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTVtaTiposRelacion") = value
+ Dim AppNombre As String = "GlobalDTVtaTiposRelacion"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTTiposDocumentos() As DataTable
+ Public Shared Property GlobalDTTiposDocumentos() As DataTable
Get
- GlobalDTTiposDocumentos = DirectCast(Application("GlobalDTTiposDocumentos"), DataTable)
+ Dim AppNombre As String = "GlobalDTTiposDocumentos"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetTiposDocumentos() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTTiposDocumentos") = value
+ Dim AppNombre As String = "GlobalDTTiposDocumentos"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTVtaCobranzaEstatus(CveEmpresa As Integer, Optional CveCobranzaEstatus As Integer = -1) As DataTable
Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTCobranzaEstatus = Dv.ToTable
+ Dim AppNombre As String = $"GlobalDTVtaCobranzaEstatus-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetCobranzaEstatus(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ If CveCobranzaEstatus <> -1 Then
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveCobranzaEstatus = {CveCobranzaEstatus}", "", DataViewRowState.CurrentRows)
+ GlobalDTVtaCobranzaEstatus = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTCobranzaEstatus = DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable)
+ GlobalDTVtaCobranzaEstatus = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
- Application("GlobalDTVtaCobranzaEstatus") = value
+ Dim AppNombre As String = $"GlobalDTVtaCobranzaEstatus-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
-
#Region "***********************************************************************DT EVENTOS****************************************************************************************"
Property GlobalDTTiposEventos() As DataTable
Get
@@ -2492,21 +2584,48 @@ Public Class ClsPaginas
End Set
End Property
- Property GlobalDTOIEventoTarea() As DataTable
+ Public Shared Property GlobalDTOIEventoTarea(CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As DataTable
Get
- GlobalDTOIEventoTarea = DirectCast(Application("GlobalDTOIEventoTarea"), DataTable)
+ Dim AppNombre As String = $"GlobalDTOIEventoTarea-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjEventos As New ClsOIEventos
+ If ObjEventos.GetEventoTarea(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados
+ ObjEventos.Dispose()
+ End If
+ If CveUsuario <> -1 Then
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveUsuario = {CveUsuario}", "", DataViewRowState.CurrentRows)
+ GlobalDTOIEventoTarea = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTOIEventoTarea = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
+ End If
End Get
Set(value As DataTable)
- Application("GlobalDTOIEventoTarea") = value
+ Dim AppNombre As String = $"GlobalDTOIEventoTarea-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTOIEstatusEventos() As DataTable
+ Public Shared Property GlobalDTOIEstatusEventos(Optional CveEventoEstatus As Integer = -1) As DataTable
Get
- GlobalDTOIEstatusEventos = DirectCast(Application("GlobalDTOIEstatusEventos"), DataTable)
+ Dim AppNombre As String = "GlobalDTOIEstatusEventos"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjEventos As New ClsOIEventos
+ If ObjEventos.GetEstatusEventos(-1) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados
+ ObjEventos.Dispose()
+ End If
+ If CveEventoEstatus > 0 Then
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveEventoEstatus = {CveEventoEstatus}", "", DataViewRowState.CurrentRows)
+ GlobalDTOIEstatusEventos = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTOIEstatusEventos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
+ End If
End Get
Set(value As DataTable)
- Application("GlobalDTOIEstatusEventos") = value
+ Dim AppNombre As String = "GlobalDTOIEstatusEventos"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
#End Region
@@ -3484,69 +3603,55 @@ Public Class ClsPaginas
#Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************"
- Property GlobalDTContaPlantillasPolizas(CveEmpresa As Integer, Optional TipoPlantilla As Integer = -1) As DataTable
+ Public Shared Property GlobalDTContaPlantillasPolizas(CveEmpresa As Integer, Optional TipoPlantilla As Integer = -1) As DataTable
Get
- If CveEmpresa <> -1 Or TipoPlantilla <> -1 Then
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- If TipoPlantilla <> -1 Then Str.AppendFormat(" AND TipoPlantilla = {0}", TipoPlantilla)
-
- Dim Dv As New DataView(DirectCast(Application("GlobalDTContaPlantillasPolizas"), DataTable), Str.ToString.Substring(5), "", DataViewRowState.CurrentRows)
- GlobalDTContaPlantillasPolizas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaPlantillasPolizas = DirectCast(Application("GlobalDTContaPlantillasPolizas"), DataTable)
+ Dim AppNombre As String = $"GlobalDTContaPlantillasPolizas-{CveEmpresa}"
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjContabilidad As New ClsContabilidad
+ If ObjContabilidad.GetConta_PlantillasPolizas(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados
+ ObjContabilidad.Dispose()
End If
+ Dim Str As New StringBuilder
+
+ If TipoPlantilla <> -1 Then Str.AppendFormat(" TipoPlantilla = {0}", TipoPlantilla)
+
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTContaPlantillasPolizas = Dv.ToTable
+ Dv.Dispose()
End Get
Set(value As DataTable)
- Application("GlobalDTContaPlantillasPolizas") = value
+ Dim AppNombre As String = $"GlobalDTContaPlantillasPolizas-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza As Integer) As DataTable
+ Public Shared Property GlobalDTContaPlantillasPolizasDetalle(CveEmpresa As Integer, CvePlantillaPoliza As Integer) As DataTable
Get
- If CvePlantillaPoliza <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows)
- GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaPlantillasPolizasDetalle = DirectCast(Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable)
+ Dim AppNombre As String = $"GlobalDTContaPlantillasPolizasDetalle-{CveEmpresa}"
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjContabilidad As New ClsContabilidad
+ If ObjContabilidad.GetConta_PlantillasPolizasDetalle(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados
+ ObjContabilidad.Dispose()
End If
+ Dim Str As New StringBuilder
+
+ If CvePlantillaPoliza <> -1 Then Str.AppendFormat(" CvePlantillaPoliza = {0}", CvePlantillaPoliza)
+
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable
+ Dv.Dispose()
End Get
Set(value As DataTable)
- Application("GlobalDTContaPlantillasPolizasDetalle") = value
+ Dim AppNombre As String = $"GlobalDTContaPlantillasPolizasDetalle-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- 'Property GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza As Integer, CveEmpresa As Integer) As DataTable
- ' Get
- ' Dim AppNombre As String = String.Format("GlobalDTContaPlantillasPolizas-{0}", CveEmpresa)
- ' 'sino existe, recarga los datos
- ' If Application(AppNombre) Is Nothing Then
- ' Using ObjContabilidad As New ClsContabilidad
- ' If ObjContabilidad.GetConta_PlantillasPolizasDetalle(-1, CveEmpresa) Then Application(AppNombre) = ObjContabilidad.DtResultados Else Application(AppNombre) = Nothing
- ' End Using
- ' End If
-
- ' Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "Orden", DataViewRowState.CurrentRows)
- ' GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable
- ' Dv.Dispose()
-
-
- ' End Get
- ' Set(value As DataTable)
- ' Dim AppNombre As String = String.Format("GlobalDTContaPlantillasPolizas-{0}", CveEmpresa)
- ' Application(AppNombre) = value
- ' End Set
- 'End Property
-
-
Public Shared Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
- 'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjContabilidad As New ClsContabilidad
If ObjContabilidad.GetConta_ConceptosContables() Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
@@ -4030,50 +4135,53 @@ Public Class ClsPaginas
End Get
End Property
- Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable
Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTOIRevision = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTOIRevision = DirectCast(Application("GlobalDTOIRevision"), DataTable)
+ Dim AppNombre As String = $"GlobalDTOIRevision-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjEventos As New ClsOIEventos
+ If ObjEventos.GetRevisionesEventos(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados
+ ObjEventos.Dispose()
End If
+ GlobalDTOIRevision = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTOIRevision") = value
+ Dim AppNombre As String = $"GlobalDTOIRevision-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
- Property GlobalDTOIAgendaTipo() As DataTable
+
+ Public Shared Property GlobalDTOIAgendaTipo() As DataTable
Get
- GlobalDTOIAgendaTipo = DirectCast(Application("GlobalDTOIAgendaTipo"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTOIAgendaTipo") = value
- End Set
- End Property
- Property GlobalDTOIAgenda() As DataTable
- Get
- GlobalDTOIAgenda = DirectCast(Application("GlobalDTOIAgenda"), DataTable)
- End Get
- Set(value As DataTable)
- Application("GlobalDTOIAgenda") = value
- End Set
- End Property
- Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTVtaCondicionesEntrega = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTVtaCondicionesEntrega = DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable)
+ Dim AppNombre As String = "GlobalDTOIAgendaTipo"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjEventos As New ClsOIEventos
+ If ObjEventos.GetAgendaTipo() Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados
+ ObjEventos.Dispose()
End If
+ GlobalDTOIAgendaTipo = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
- Application("GlobalDTVtaCondicionesEntrega") = value
+ Dim AppNombre As String = "GlobalDTOIAgendaTipo"
+ HttpContext.Current.Application(AppNombre) = value
+ End Set
+ End Property
+
+ Public Shared Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable
+ Get
+ Dim AppNombre As String = $"GlobalDTVtaCondicionesEntrega-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetCondicionesEntrega(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTVtaCondicionesEntrega = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = $"GlobalDTVtaCondicionesEntrega-{CveEmpresa}"
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable
@@ -5993,23 +6101,26 @@ Public Class ClsPaginas
End If
Return Retorno
-
End Function
- Public Sub CerrarSession()
+ Public Sub CerrarSession()
Usuario.CerrarSession()
End Sub
- Public Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5, Optional ShowCloseButton As Boolean = True, Optional TextoConfirmacion As String = "", Optional TextoSegundoBoton As String = "", Optional JSBtn2 As String = "")
+ Private Shared Function GetCurrentPageViewState() As System.Web.UI.StateBag
+ Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page)
+ Dim viewStateProp = page?.[GetType]().GetProperty("ViewState", Reflection.BindingFlags.FlattenHierarchy Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic)
+ Return CType(viewStateProp?.GetValue(page), System.Web.UI.StateBag)
+ End Function
+ Public Shared Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5, Optional ShowCloseButton As Boolean = True, Optional TextoConfirmacion As String = "", Optional TextoSegundoBoton As String = "", Optional JSBtn2 As String = "")
If DirectCast(pOpcion, Integer).Contiene(5, 7, 6, 8) Then
Mensaje = Mensaje.Replace("'"c, "\'").Replace(vbCrLf, "").Replace("""", "\'").Replace(vbLf, " ")
JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'")
Dim toastscript As String = String.Format("alertatoast({3},'{0}',function(){{{1}}},{2});", Mensaje, JSBtnAceptar, timeout, DirectCast(pOpcion, Integer))
- ViewState("strToastMsglargonoreplace") = String.Format("{0}{1}", If(Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString().Length > 0, ViewState("strToastMsglargonoreplace").ToString(), ""), toastscript)
+ GetCurrentPageViewState()("strToastMsglargonoreplace") = String.Format("{0}{1}", If(Not IsNothing(GetCurrentPageViewState()("strToastMsglargonoreplace")) AndAlso GetCurrentPageViewState()("strToastMsglargonoreplace").ToString().Length > 0, GetCurrentPageViewState()("strToastMsglargonoreplace").ToString(), ""), toastscript)
Else
Mensaje.Alert(Mensaje, pOpcion, JSBtnAceptar, TimeoutToast:=timeout, ShowCloseButton:=ShowCloseButton, TextoConfirmacion:=TextoConfirmacion, TextoSegundoBoton:=TextoSegundoBoton, JSBtn2:=JSBtn2)
End If
-
End Sub
Protected Overridable Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
If sw IsNot Nothing AndAlso Not (Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing) Then
@@ -6026,7 +6137,6 @@ Public Class ClsPaginas
RegistraScript(ViewState("strToastMsglargonoreplace").ToString(), "esteseraunticklargoparaquenosesobrescribaconotro")
ViewState("strToastMsglargonoreplace") = Nothing
End If
-
End Sub
Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object)
'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente
@@ -6034,10 +6144,8 @@ Public Class ClsPaginas
Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(40), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache
'Session.Add(VSKey, pviewState) 'Store the ViewState on Cache
ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey)
-
End Sub
Protected Overrides Function LoadPageStateFromPersistenceMedium() As Object
-
Dim VSKey As String = Request.Form("__VIEWSTATE_KEY")
If Not VSKey.StartsWith("VIEWSTATE_") Then 'Request the Key from the page and validade it.
Throw New Exception(String.Format("Invalid VIEWSTATE Key: {0}", VSKey))
@@ -6048,7 +6156,6 @@ Public Class ClsPaginas
Else
Return Cache(VSKey)
End If
-
End Function
Public Shared Sub CargaParametros(Parametros As String)
Dim P1() As String = Parametros.Split("&"c)
@@ -6061,17 +6168,14 @@ Public Class ClsPaginas
P2 = Tmp.Split("="c)
UrlParametros.Add(P2(0).ToString.ToUpper(), P2(1))
Next
-
End Sub
Shared Sub RegeneraImagen(ByVal Ruta As String)
-
Dim BM As New Drawing.Bitmap(Ruta)
Dim Width As Integer = BM.Width
Dim Height As Integer = BM.Height
Dim Thumb As New Drawing.Bitmap(Width, Height)
Dim G As Drawing.Graphics = Drawing.Graphics.FromImage(Thumb)
-
G.InterpolationMode = Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
G.DrawImage(BM, New Drawing.Rectangle(0, 0, Width, Height), New Drawing.Rectangle(0, 0, BM.Width, BM.Height), Drawing.GraphicsUnit.Pixel)
@@ -6082,9 +6186,10 @@ Public Class ClsPaginas
Thumb.Save(Ruta, Drawing.Imaging.ImageFormat.Jpeg) 'can use any image format
Thumb.Dispose()
End Sub
- Public Sub RegistraScript(Script As String, Optional valuetick As String = "")
- Dim Rdm As Random = New Random()
- ScriptManager.RegisterStartupScript(Page, Me.GetType(), String.Format("{0}{1}{2}", (DateTime.Now.Ticks + 1), Rdm.Next(), valuetick), String.Format("", Script), False)
+ Public Shared Sub RegistraScript(Script As String, Optional valuetick As String = "")
+ Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page)
+ Script = $"{Script.TrimEnd(";"c)};" 'sino trae ";" al final, se lo agregamos
+ ScriptManager.RegisterStartupScript(page, page.GetType(), $"{DateTime.Now.Ticks + 1}{Rand.Next()}{valuetick}", Script, True)
End Sub
Public Sub TabEnabled(Tab As System.Web.UI.HtmlControls.HtmlAnchor, Valor As Boolean)
If Valor Then
@@ -6101,9 +6206,6 @@ Public Class ClsPaginas
Public Sub TabActive(Tab As System.Web.UI.HtmlControls.HtmlAnchor)
RegistraScript(String.Format("$( ""#{0}"" ).Click( );", Tab.ClientID))
End Sub
- '''
- '''
- '''
Public Sub Alerta(Mensaje As String, Tipo As String, Funcion As String)
RegistraScript(String.Format("bootbox.alert('{0}', function() {{{2}}} );", Mensaje, Tipo, Funcion))
End Sub
@@ -10362,7 +10464,7 @@ Public Class ClsPaginas
Public Function AplicaPrePolizaPagoVenta(VentaActual As Venta, Pago As VentaPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean
Dim ErrorMovtos As Boolean = False
- Dim PorcentajePago As Decimal = Pago.ImportePago / VentaActual.Total
+ Dim PorcentajePago As Decimal = Pago.ImportePagoVenta / VentaActual.Total
Dim ImporteMovimiento As Decimal = 0
Dim ImporteMN As Decimal = 0
Dim ImporteME As Decimal = 0
@@ -10372,6 +10474,7 @@ Public Class ClsPaginas
Dim tFechaUltimaFluctuacion As Date
Dim tImportePago, tImporteVenta As Decimal
Dim CveConceptoContableComplementaria As Integer = 207
+ If PorcentajePago > 1 Then PorcentajePago = 1
Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 2, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 2
@@ -10573,7 +10676,7 @@ Public Class ClsPaginas
Dim ConceptoContable, IdCtaContable As Integer
Dim TipoMovimiento As Boolean
Dim Diferencia As Decimal = 0
- tImportePago +=Pago.ImporteFluctuacionAdicional 'para los casos de aplicación de
+ tImportePago += Pago.ImporteFluctuacionAdicional 'para los casos de aplicación de
If tImporteVenta <> tImportePago Then
If tImporteVenta < tImportePago Then
diff --git a/App_Code/ClsProyectos.vb b/App_Code/ClsProyectos.vb
index 38f6a15dd..f26258873 100644
--- a/App_Code/ClsProyectos.vb
+++ b/App_Code/ClsProyectos.vb
@@ -128,11 +128,12 @@ Public Class ClsProyectos
SqlTransacc = Nothing
End Sub
- Public Function GetProyectos(Optional Opcion As Integer = -1) As Boolean
+ Public Function GetProyectos(CveEmpresa As Integer, Optional Opcion As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ProyectosGet")
With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With
Try
diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb
index 115bacd73..46296e77d 100644
--- a/App_Code/ClsSisUsuarios.vb
+++ b/App_Code/ClsSisUsuarios.vb
@@ -657,7 +657,7 @@ Public Class ClsSisUsuarios
Return Retorno
End Function
- Public Function GetUsuariosEmpresas(CveUsuario As Integer) As Boolean
+ Public Function GetUsuariosEmpresas(CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -665,6 +665,7 @@ Public Class ClsSisUsuarios
DataAdapter("PA_Sis_UsuariosEmpresasGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 25f5e0936..1752b34e4 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -5725,7 +5725,7 @@ Public Class ClsVentas
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesVendedorCambio")
With SqlAdapter.SelectCommand.Parameters
- .Add("@CveCliente", SqlDbType.VarChar).Value = CveCliente
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index d1a3e66b5..ca48d9f8c 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -326,47 +326,47 @@ Namespace Modelos
IniciaValores()
End Sub
- Public Sub New(ObjsClsPaginas As ClsPaginas, Optional Row As Data.DataRow = Nothing)
- If Row IsNot Nothing Then
- setValues(Row)
- Else
- IniciaValores()
- End If
- SetMetodoPago(ObjsClsPaginas)
- Timbre = New CFDITimbre
- DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
- End Sub
+ 'Public Sub New(ObjsClsPaginas As ClsPaginas, Optional Row As Data.DataRow = Nothing)
+ ' If Row IsNot Nothing Then
+ ' setValues(Row)
+ ' Else
+ ' IniciaValores()
+ ' End If
+ ' SetMetodoPago()
+ ' Timbre = New CFDITimbre
+ ' DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
+ 'End Sub
- Public Sub New(ObjsClsPaginas As ClsPaginas, CveVenta As Integer, CveEmpresa As Integer)
- Me.CveEmpresa = CveEmpresa
- Dim ObjVentas As New ClsVentas()
- If ObjVentas.GetVenta(CveVenta, CveEmpresa) Then
- If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
- setValues(ObjVentas.DtResultados.Rows(0))
- SetMetodoPago(ObjsClsPaginas)
- SetMoneda(ObjsClsPaginas)
- End If
- End If
- ObjVentas.Dispose()
- DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
- End Sub
- Public Sub New(ObjsClsPaginas As ClsPaginas, UsuarioActual As Usuario, Optional Row As Data.DataRow = Nothing)
- Me.UsuarioActual = UsuarioActual
- Me.ErrorList = New List(Of String)
- Me.RemisionesLista = New List(Of Integer)
- Me.ListaMensajes = New List(Of String)
- If Row IsNot Nothing Then
- setValues(Row)
- Else
- IniciaValores()
- End If
- SetMetodoPago(ObjsClsPaginas)
- SetMoneda(ObjsClsPaginas)
- SetSubProyecto(ObjsClsPaginas)
- SetSubProyectoMatriz(ObjsClsPaginas)
- Timbre = New CFDITimbre
- DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
- End Sub
+ 'Public Sub New(ObjsClsPaginas As ClsPaginas, CveVenta As Integer, CveEmpresa As Integer)
+ ' Me.CveEmpresa = CveEmpresa
+ ' Dim ObjVentas As New ClsVentas()
+ ' If ObjVentas.GetVenta(CveVenta, CveEmpresa) Then
+ ' If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
+ ' setValues(ObjVentas.DtResultados.Rows(0))
+ ' SetMetodoPago()
+ ' SetMoneda()
+ ' End If
+ ' End If
+ ' ObjVentas.Dispose()
+ ' DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
+ 'End Sub
+ 'Public Sub New(ObjsClsPaginas As ClsPaginas, UsuarioActual As Usuario, Optional Row As Data.DataRow = Nothing)
+ ' Me.UsuarioActual = UsuarioActual
+ ' Me.ErrorList = New List(Of String)
+ ' Me.RemisionesLista = New List(Of Integer)
+ ' Me.ListaMensajes = New List(Of String)
+ ' If Row IsNot Nothing Then
+ ' setValues(Row)
+ ' Else
+ ' IniciaValores()
+ ' End If
+ ' SetMetodoPago()
+ ' SetMoneda()
+ ' SetSubProyecto(ObjsClsPaginas)
+ ' SetSubProyectoMatriz(ObjsClsPaginas)
+ ' Timbre = New CFDITimbre
+ ' DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
+ 'End Sub
Public Sub New(UsuarioActual As Usuario, Optional Row As Data.DataRow = Nothing)
Me.UsuarioActual = UsuarioActual
Me.ErrorList = New List(Of String)
@@ -2278,7 +2278,7 @@ Namespace Modelos
If GenerarPrePoliza AndAlso CveMovimiento > 0 Then
Dim Concepto As String = "Cancelación Usado" & factura.SerieFolio
Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancSalUsados", 74, DtMovimientosEntrada.SUMD("Total"), DtMovimientosEntrada.SUMD("Total"), 1, tFecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
+ Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
Dim tCveConcepto As Integer = 278
Dim ValorInventario As Decimal = 0
Dim MovAlmacen As Boolean = False 'debe quedar como el anterior, pero negativo
@@ -2503,7 +2503,7 @@ Namespace Modelos
If ValorMultiplicador = -1 AndAlso ConceptoContable = 291 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CuentasContablesInvalidas.Append(" " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
@@ -2599,7 +2599,7 @@ Namespace Modelos
If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
Dim Importe68 As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL * ValorMultiplicador
- Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
+ Dim IdCtaContable68 = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then
ErrorPrepoliza = True
@@ -2622,7 +2622,7 @@ Namespace Modelos
If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
Dim Importe68 As Decimal = 0
- Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
+ Dim IdCtaContable68 = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then
ErrorPrepoliza = True
@@ -2687,7 +2687,7 @@ Namespace Modelos
ImporteConcepto12 = importeMX.RoundSQL
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CuentasContablesInvalidas.Append(" " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
@@ -3332,20 +3332,20 @@ Namespace Modelos
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador)
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
- Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
+ Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs") Then
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
Else
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
End If
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
+ CuentasContablesInvalidas.Append(" " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
idCuentaContabilizacion = 0
End If
@@ -3407,14 +3407,14 @@ Namespace Modelos
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
- Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
+ Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
Else
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
End If
If UsuarioActual.CveEmpresa = 119 Then
@@ -3425,7 +3425,7 @@ Namespace Modelos
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
+ CuentasContablesInvalidas.Append(" " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
idCuentaContabilizacion = 0
End If
@@ -3463,20 +3463,20 @@ Namespace Modelos
importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
- Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
+ Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs") Then
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
Else
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
End If
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
+ CuentasContablesInvalidas.Append(" " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
idCuentaContabilizacion = 0
End If
@@ -3646,12 +3646,12 @@ Namespace Modelos
Dim PorcentajeImpuestoPago As Decimal = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal
- If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then
- IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString.ToEntero
+ If ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then
+ IdCtaContable = ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString.ToEntero
End If
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.AppendFormat(" {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("NumCuentaMoneda").ToString.ToEntero)
+ CuentasContablesInvalidas.AppendFormat(" {0}", ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("NumCuentaMoneda").ToString.ToEntero)
idCuentaContabilizacion = 0
End If
@@ -3714,7 +3714,7 @@ Namespace Modelos
If importeMovimiento <> 0 And Not ErrorPrepoliza Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CuentasContablesInvalidas.Append(" " & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
@@ -3969,7 +3969,7 @@ Namespace Modelos
Private Function GenerarMovimientoGarantia(CveConceptoMovimiento As Integer, ConceptoPoliza As String, FechaMovimiento As DateTime, factura As Factura, ByRef ObjAcum As ClsAcumuladores, ByRef ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, Optional Modulo As String = "Modelos/SDGA") As Boolean
Dim OcurrioError As Boolean = False
Try
- Dim CveAlmacenGarantia As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero()
+ Dim CveAlmacenGarantia As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero()
Dim DtGarantias As DataTable = Nothing
If ObjAcum.GetGarantiasDetalle(factura.CveVenta) Then
@@ -4248,7 +4248,7 @@ Namespace Modelos
For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUM("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).ToString.ToDecimal
- IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
Try
If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, Me.SerieFolio, 69, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then
@@ -4262,7 +4262,7 @@ Namespace Modelos
Next
If Not OcurrioError Then
- IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero
ValorInventario = (DtCostos.SUM("Total", "").ToDecimal).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, Me.SerieFolio, 68, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then
OcurrioError = True
@@ -4346,7 +4346,7 @@ Namespace Modelos
If UsuarioActual.CveEmpresa = 1 Then
DtEquivalencias = New DataTable
- DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa)
+ DtEquivalencias = ClsPaginas.GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa)
Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero
Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'")
@@ -4408,7 +4408,7 @@ Namespace Modelos
End If
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
- IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then
@@ -4418,7 +4418,7 @@ Namespace Modelos
cont += 1
Next
End If
- IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
'If TotalCosto <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then
@@ -4547,7 +4547,7 @@ Namespace Modelos
End If
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
- IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then
@@ -4557,7 +4557,7 @@ Namespace Modelos
cont += 1
Next
End If
- IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
'If TotalCosto <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then
@@ -5495,7 +5495,7 @@ Namespace Modelos
DtCostos = ObjInventario.DtResultados
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
- Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero
+ Dim IdCtaContableAlmacen As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero
Dim IdCtaContable As Integer = 0
If tmpCostos.Rows.Count > 0 Then
@@ -5524,7 +5524,7 @@ Namespace Modelos
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
End If
- IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
If Not ErrorCancelar Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, False, Multiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=Multiplicador * ValorInventario, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then
@@ -6406,7 +6406,7 @@ Namespace Modelos
Dim EsContabilizable As Boolean = False
Dim Concepto As String = "Cancelación"
Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancExAR1", 74, DtEntradaDetalle.SUMD("Total"), DtEntradaDetalle.SUMD("Total"), 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero
+ Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorInventario, Concepto, 68, Concepto, Fecha, 0, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoSalidaDevRem, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto, Contabilizable:=EsContabilizable) Then
ErrorCancelar = True
@@ -7194,12 +7194,12 @@ Namespace Modelos
Public Sub SetSubProyecto()
If CveSubProyecto > 0 AndAlso UsuarioActual IsNot Nothing Then
- SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(""))
+ SubProyecto = New Modelos.SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(""))
End If
End Sub
Public Sub SetSubProyectoMatriz()
If UsuarioActual IsNot Nothing Then
- Dim Row As Data.DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")
+ Dim Row As Data.DataRow = ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")
If Not IsNothing(Row) Then
SubProyectoMatriz = New Modelos.SubProyectoModel(Row)
End If
@@ -7236,7 +7236,7 @@ Namespace Modelos
End Sub
Public Sub SetMoneda()
If CveMoneda > 0 Then
- Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda))
+ Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda = {0}", CveMoneda))
If Not IsNothing(dr) Then
Moneda = dr("Moneda").ToString()
MonedaSAT = dr("AbreviaturaSAT").ToString()
@@ -7245,37 +7245,23 @@ Namespace Modelos
End If
End Sub
Public Sub SetMetodoPago()
- If CveMetodoPago > 0 AndAlso Not IsNothing(GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then
- MetodoPago = GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString()
- ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString()
- End If
- End Sub
- Public Sub SetMoneda(ObjClsPaginas As ClsPaginas)
- If Not IsNothing(ObjClsPaginas) Then
- Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda))
+ If CveMetodoPago > 0 Then
+ Dim dr As DataRow = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago = {0}", CveMetodoPago))
If Not IsNothing(dr) Then
- Moneda = dr("Moneda").ToString()
- MonedaSAT = dr("AbreviaturaSAT").ToString()
- MonedaAbreviatura = dr("Abreviatura").ToString()
- End If
- End If
- End Sub
- Public Sub SetMetodoPago(ObjClsPaginas As ClsPaginas)
- If Not IsNothing(ObjClsPaginas) Then
- If Not IsNothing(ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then
- MetodoPago = ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString()
- ClaveMetodoPagoSAT = ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString()
+ MetodoPago = dr("MetodoPago").ToString()
+ ClaveMetodoPagoSAT = dr("ClaveSAT").ToString()
End If
End If
End Sub
+
Public Sub SetSubProyecto(obj As ClsPaginas)
If CveSubProyecto > 0 AndAlso Not IsNothing(obj) Then
- SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveEmpresa:=obj.UsuarioActual.CveEmpresa).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}"))
+ SubProyecto = New Modelos.SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1, CveEmpresa:=obj.UsuarioActual.CveEmpresa).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}"))
End If
End Sub
Public Sub SetSubProyectoMatriz(obj As ClsPaginas)
If Not IsNothing(obj) Then
- Dim Row As Data.DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=obj.UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")
+ Dim Row As Data.DataRow = ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=obj.UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")
If Not IsNothing(Row) Then
SubProyectoMatriz = New Modelos.SubProyectoModel(Row)
End If
@@ -7478,571 +7464,139 @@ Namespace Modelos
End Set
End Property
- Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa)
-
- If CvePS <> -1 OrElse CveUM <> -1 Then
- Dim StrSQL As New StringBuilder
- If CvePS <> -1 Then StrSQL.AppendFormat(" AND CvePS = {0}", CvePS)
- If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTProductosServiciosEquivalencias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
- End Get
-
- End Property
- Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProveedorClasificacion = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProveedorClasificacion = DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProveedorClasificacion") = value
- End Set
- End Property
- Property GlobalDTProveedorSucursales(CveProveedor As Integer) As DataTable
- Get
- If CveProveedor <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable), String.Format("CveProveedor = {0}", CveProveedor), "", DataViewRowState.CurrentRows)
- GlobalDTProveedorSucursales = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProveedorSucursales = DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProveedorSucursales") = value
- End Set
- End Property
- Property GlobalDTRoles(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTRoles = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTRoles = DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTRoles") = value
- End Set
- End Property
- Property GlobalDTNomSatBancos() As DataTable
- Get
- GlobalDTNomSatBancos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatBancos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatBancos") = value
- End Set
- End Property
- Property GlobalDTNomSatConceptos() As DataTable
- Get
- GlobalDTNomSatConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatConceptos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatConceptos") = value
- End Set
- End Property
- Property GlobalDTNomSatRegimenContratacion() As DataTable
- Get
- GlobalDTNomSatRegimenContratacion = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion") = value
- End Set
- End Property
- Property GlobalDTNomSatRiesgoPuesto() As DataTable
- Get
- GlobalDTNomSatRiesgoPuesto = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto") = value
- End Set
- End Property
- Property GlobalDTNomSatTipoIncapacidad() As DataTable
- Get
- GlobalDTNomSatTipoIncapacidad = DirectCast(HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad") = value
- End Set
- End Property
- Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
- Get
-
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTEmpresas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEmpresas = DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable)
- End If
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTEmpresas") = value
- End Set
- End Property
- Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjClasificaciones As New ClsClasificaciones
- If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados
- ObjClasificaciones.Dispose()
- End If
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
- If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion)
- If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
-
-
-
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificaciones2 = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificaciones2 = DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificaciones2") = value
- End Set
- End Property
- Property GlobalDTClasificacionesSubProyectos(Optional CveClasificacion As Integer = -1, Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesSubProyectos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesSubProyectos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto") = value
- End Set
- End Property
- Property GlobalDTACClasificadorObjetoGasto(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTACClasificadorObjetoGasto = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTACClasificadorObjetoGasto = DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto") = value
- End Set
- End Property
- Property GlobalDTClasificacionesDetalle(Optional CveEmpresa As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesDetalle = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesDetalle = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesDetalle") = value
- End Set
- End Property
- Property GlobalDTSubFamilias(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTSubFamilias = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTSubFamilias = DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTSubFamilias") = value
- End Set
- End Property
- Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTFamilias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTFamilias = DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTFamilias") = value
- End Set
- End Property
- Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesPresupuestos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesPresupuestos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos") = value
- End Set
- End Property
- Property GlobalDTMetodosPago() As DataTable
- Get
- GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application("GlobalDTMetodosPago"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMetodosPago") = value
- End Set
- End Property
- Property GlobalDTModulos() As DataTable
- Get
- GlobalDTModulos = DirectCast(HttpContext.Current.Application("GlobalDTModulos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTModulos") = value
- End Set
- End Property
-
- Property GlobalDTEstatusOrdenCompra() As DataTable
- Get
- GlobalDTEstatusOrdenCompra = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenCompra"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusOrdenCompra") = value
- End Set
- End Property
- Property GlobalDTLeyendasFiscales() As DataTable
- Get
- GlobalDTLeyendasFiscales = DirectCast(HttpContext.Current.Application("GlobalDTLeyendasFiscales"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value
- End Set
- End Property
- Property GlobalDTEstatusFactura() As DataTable
- Get
- GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusFactura") = value
- End Set
- End Property
- Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
- Get
-
- If DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then
- Dim P As New ClsProyectos
- If P.GetProyectos Then
- HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados
- End If
- P.Dispose()
-
- End If
-
- If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1
-
- Dim StrSQL As New StringBuilder
- If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto)
- If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProyectos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProyectos = DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
-
- End If
- HttpContext.Current.Application("GlobalDTProyectos") = value
- End Set
- End Property
-
- Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
- Dim P As New ClsSubProyectos
- If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
- P.Dispose()
-
- Dim msg As String = "aqui no se carga subproyectos"
- If HttpContext.Current.Request IsNot Nothing Then
- msg = msg & HttpContext.Current.Request.ServerVariables("URL")
- End If
- msg.GuardaLog()
-
- End If
-
- If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
- Dim StrSQL As New StringBuilder
- If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
- If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
- If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTSubProyectos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
-
- Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
- Get
-
- If HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") Is Nothing Then
- Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados Else Alert("Ocurrió un error al cargar los SubProyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
- ObjSubProyectos.Dispose()
- End If
-
- If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
- Dim StrSQL As New StringBuilder
- If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
- If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
- If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", CveEstatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTSubProyectosUsuarios = Dv.ToTable
- Dv.Dispose()
-
- Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios(CveUsuario:=CveUsuario, CveProyecto:=CveProyecto, CveSubProyecto:=CveSubProyecto, CveEstatus:=CveEstatus, CveEmpresa:=CveEmpresa) Then
- GlobalDTSubProyectosUsuarios = ObjSubProyectos.DtResultados
- Else
- GlobalDTSubProyectosUsuarios = Nothing
- End If
- ObjSubProyectos.Dispose()
-
- Else
- GlobalDTSubProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
-
-
- End If
- HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") = value
- End Set
- End Property
- Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable
- Get
-
- If HttpContext.Current.Application("GlobalDTProyectosUsuarios") Is Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable).Rows.Count = 0 Then
- Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.Application("GlobalDTProyectosUsuarios") = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
- ObjSubProyectos.Dispose()
- GuardaLog("Se Cargo GlobalDTProyectosUsuarios")
- End If
-
- If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
- Dim StrSQL As New StringBuilder
- If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
- If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatusProyecto = {0}", CveEstatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTProyectosUsuarios = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
-
- End If
- HttpContext.Current.Application("GlobalDTProyectosUsuarios") = value
- End Set
- End Property
- Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable
- Get
- GlobalDTPrecioListas = DirectCast(HttpContext.Current.Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTPrecioListas") = value
- End Set
- End Property
- 'Property GlobalDTMesas() As DataTable
- ' Get
- ' GlobalDTMesas = DirectCast(HttpContext.Current.Application("GlobalDTMesas"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTMesas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable
- ' Get
- ' GlobalDTTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoOrdenServicios") = value
- ' End Set
- 'End Property
- 'Property GlobalDTSubTipoOrdenServicios() As DataTable
- ' Get
- ' GlobalDTSubTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios") = value
- ' End Set
- 'End Property
- 'Property GlobalDTCaracteristicasOrdenServicios() As DataTable
- ' Get
- ' GlobalDTCaracteristicasOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios") = value
- ' End Set
- 'End Property
- 'Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable
- ' Get
- ' GlobalDTOrdenesServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTCaracteristicasOpciones() As DataTable
- ' Get
- ' GlobalDTCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOpciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTCaracteristicasOpciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable
+ 'Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
' Get
+
' If CveEmpresa <> -1 Then
-
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoCuentasEquipos = Dv.ToTable
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ ' GlobalDTEmpresas = Dv.ToTable
' Dv.Dispose()
' Else
- ' GlobalDTTipoCuentasEquipos = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable)
+ ' GlobalDTEmpresas = DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable)
' End If
' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuentasEquipos") = value
+ ' Set(ByVal value As DataTable)
+ ' HttpContext.Current.Application("GlobalDTEmpresas") = value
' End Set
'End Property
- 'Property GlobalDTTipoCuentasEquiposCaracteristicas(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuentasEquiposOpciones(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTTipoCuentasEquiposOpciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable)
+ 'Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
+ ' Get
+ ' Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
+ ' 'sino existe, recarga los datos
+ ' If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
+ ' Dim P As New ClsSubProyectos
+ ' If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
+ ' P.Dispose()
+
+ ' Dim msg As String = "aqui no se carga subproyectos"
+ ' If HttpContext.Current.Request IsNot Nothing Then
+ ' msg = msg & HttpContext.Current.Request.ServerVariables("URL")
+ ' End If
+ ' msg.GuardaLog()
+
' End If
+
+ ' If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
+ ' Dim StrSQL As New StringBuilder
+ ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
+ ' If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
+ ' If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
+ ' If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ ' GlobalDTSubProyectos = Dv.ToTable
+ ' Dv.Dispose()
+
+ ' Else
+ ' GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
+ ' End If
+
' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones") = value
+ ' Set(ByVal value As DataTable)
+ ' Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
+ ' HttpContext.Current.Application(AppNombre) = value
' End Set
'End Property
+
+ 'Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
+ ' Get
+
+ ' If HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") Is Nothing Then
+ ' Dim ObjSubProyectos As New ClsSubProyectos()
+ ' If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados Else Alert("Ocurrió un error al cargar los SubProyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
+ ' ObjSubProyectos.Dispose()
+ ' End If
+
+ ' If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
+ ' Dim StrSQL As New StringBuilder
+ ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
+ ' If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
+ ' If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
+ ' If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
+ ' If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", CveEstatus)
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ ' GlobalDTSubProyectosUsuarios = Dv.ToTable
+ ' Dv.Dispose()
+
+ ' Dim ObjSubProyectos As New ClsSubProyectos()
+ ' If ObjSubProyectos.GetSubProyectosUsuarios(CveUsuario:=CveUsuario, CveProyecto:=CveProyecto, CveSubProyecto:=CveSubProyecto, CveEstatus:=CveEstatus, CveEmpresa:=CveEmpresa) Then
+ ' GlobalDTSubProyectosUsuarios = ObjSubProyectos.DtResultados
+ ' Else
+ ' GlobalDTSubProyectosUsuarios = Nothing
+ ' End If
+ ' ObjSubProyectos.Dispose()
+
+ ' Else
+ ' GlobalDTSubProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable)
+ ' End If
+
+ ' End Get
+ ' Set(ByVal value As DataTable)
+ ' If value Is Nothing OrElse value.Rows.Count = 0 Then
+
+
+ ' End If
+ ' HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") = value
+ ' End Set
+ 'End Property
+ 'Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable
+ ' Get
+
+ ' If HttpContext.Current.Application("GlobalDTProyectosUsuarios") Is Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable).Rows.Count = 0 Then
+ ' Dim ObjSubProyectos As New ClsSubProyectos()
+ ' If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.Application("GlobalDTProyectosUsuarios") = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
+ ' ObjSubProyectos.Dispose()
+ ' GuardaLog("Se Cargo GlobalDTProyectosUsuarios")
+ ' End If
+
+ ' If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
+ ' Dim StrSQL As New StringBuilder
+ ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
+ ' If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
+ ' If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
+ ' If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatusProyecto = {0}", CveEstatus)
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ ' GlobalDTProyectosUsuarios = Dv.ToTable
+ ' Dv.Dispose()
+
+ ' Else
+ ' GlobalDTProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable)
+ ' End If
+
+ ' End Get
+ ' Set(ByVal value As DataTable)
+ ' If value Is Nothing OrElse value.Rows.Count = 0 Then
+
+ ' End If
+ ' HttpContext.Current.Application("GlobalDTProyectosUsuarios") = value
+ ' End Set
+ 'End Property
+
ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1) As DataTable
Get
Dim ObjPS As New ClsProductosServicios
@@ -8058,470 +7612,6 @@ Namespace Modelos
End Property
-
- Property GlobalDTInvMetodosInventario() As DataTable
- Get
- GlobalDTInvMetodosInventario = DirectCast(HttpContext.Current.Application("GlobalDTInvMetodosInventario"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTInvMetodosInventario") = value
- End Set
- End Property
- 'Property GlobalDTAFCaracteristicasOpciones() As DataTable
- ' Get
- ' GlobalDTAFCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTAFCaracteristicas() As DataTable
- ' Get
- ' GlobalDTAFCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicas"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAFCaracteristicas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTAFCaracteristicasClasificaciones() As DataTable
- ' Get
- ' GlobalDTAFCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable
- ' Get
- ' Dim Str As New StringBuilder
- ' If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS)
- ' If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa)
-
- ' If CvePS > 0 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTImpuestosLocales = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTImpuestosLocales = DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTImpuestosLocales") = value
- ' End Set
- 'End Property
- 'Bancos
- Property GlobalDTBancos() As DataTable
- Get
- GlobalDTBancos = DirectCast(HttpContext.Current.Application("GlobalDTBancos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTBancos") = value
- End Set
- End Property
-
-
- Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
- Dim ObjBancos As New ClsBancos
- If ObjBancos.GetBancosCuentasUsuarios(-1, CveEmpresa) Then
- HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
- Else
- HttpContext.Current.Application(AppNombre) = Nothing
- End If
- ObjBancos.Dispose()
- End If
-
- Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
- If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario)
- If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta)
- If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows)
- GlobalDTBancosCuentas = Dv.ToTable
- Dv.Dispose()
- 'GlobalDTBancosCuentas = DirectCast(Application("GlobalDTBancosCuentas"), DataTable)
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
-
-
-
- Property GlobalDTTipoTransacciones() As DataTable
- Get
- If UsuarioActual.CveEmpresa = 66 Then
- GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoTransacciones"), DataTable).FiltraParametros("Estatus = 1")
- Else
- GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoTransacciones"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoTransacciones") = value
- End Set
- End Property
- 'Property GlobalDTEstatusIE() As DataTable
- ' Get
- ' GlobalDTEstatusIE = DirectCast(HttpContext.Current.Application("GlobalDTEstatusIE"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTEstatusIE") = value
- ' End Set
- 'End Property
- 'Property GlobalDTBancosIE() As DataTable
- ' Get
- ' GlobalDTBancosIE = DirectCast(HttpContext.Current.Application("GlobalDTBancosIE"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTBancosIE") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuenta() As DataTable
- ' Get
- ' GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuenta"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuenta") = value
- ' End Set
- 'End Property
- ''Fin Bancos
-
- ''Fin EstadoCIvil
- ''TipoPerioso
- 'Property GlobalDTTipoPeriodo() As DataTable
- ' Get
- ' GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application("GlobalDTTipoPeriodo"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoPeriodo") = value
- ' End Set
- 'End Property
- ''Fin TipoPeriodo
-
- 'Periodos
- 'Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable
- ' Get
- ' Dim Str As New StringBuilder
- ' If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- ' If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo)
- ' If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo)
- ' If Str.Length > 0 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTNominasPeriodos = Dv.ToTable
- ' Dv.Dispose()
-
- ' Else
- ' GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable)
- ' End If
-
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTNominasPeriodos") = value
- ' End Set
- 'End Property
- 'Fin Periodos
-
- 'Fin Ruta
- 'Cliente
- Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjClientes As New ClsClientes
- If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados
- ObjClientes.Dispose()
- End If
-
-
- If CveEmpresa <> -1 Then
-
- Dim StrSQL As New StringBuilder
- StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTCliente = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- 'Dim ObjClientes As New ClsClientes
- 'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados
- 'ObjClientes.Dispose()
- End Set
- End Property
- Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjClientes As New ClsClientes
- If ObjClientes.GetClienteClasificacion(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados
- ObjClientes.Dispose()
- End If
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClienteClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- 'Dim ObjClientes As New ClsClientes
- 'If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados
- 'ObjClientes.Dispose()
- End Set
- End Property
- Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTEstatusOrdenServicios = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEstatusOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusOrdenServicios") = value
- End Set
- End Property
- 'Variables para Ventas
- Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Boolean = True, Optional VendedorTipo As Integer = 1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows)
- GlobalDTVendedores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTVendedores = DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTVendedores") = value
- End Set
- End Property
- Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClientesCorporativo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClientesCorporativo = DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClientesCorporativo") = value
- End Set
- End Property
- Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTCompProveedores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTCompProveedores = DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTCompProveedores") = value
- End Set
- End Property
- 'EstatusFactura
- 'Property GlobalDTCompEstatusFactura() As DataTable
- ' Get
- ' GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'")
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTCompEstatusFactura") = value
- ' End Set
- 'End Property
- 'Property GlobalDTContratosSecciones() As DataTable
- ' Get
- ' GlobalDTContratosSecciones = DirectCast(HttpContext.Current.Application("GlobalDTContratosSecciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTContratosSecciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTContratos() As DataTable
- ' Get
- ' GlobalDTContratos = DirectCast(HttpContext.Current.Application("GlobalDTContratos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTContratos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTContratosTipos() As DataTable
- ' Get
- ' GlobalDTContratosTipos = DirectCast(HttpContext.Current.Application("GlobalDTContratosTipos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTContratosTipos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoAlmacen = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable)
- ' End If
-
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoAlmacen") = value
- ' End Set
- 'End Property
- 'Property GlobalDTInvConceptos() As DataTable
- ' Get
-
- ' Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable)
-
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTInvConceptos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTSeccionAlmacen = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable)
- ' End If
-
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value
- ' End Set
- 'End Property
- Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjUsr As New ClsInventarios
- If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
- ObjUsr.Dispose()
- End If
-
- Dim Str As New StringBuilder
- Str.Append("1=1 AND ")
- If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
- If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
- If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
- If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTAlmacen = Dv.ToTable
- Dv.Dispose()
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- 'Get
-
- ' Dim Str As New StringBuilder
- ' Str.Append("1=1 AND ")
- ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
- ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
- ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
- ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
-
- ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTAlmacen = Dv.ToTable
- ' Dv.Dispose()
-
- 'End Get
- 'Set(value As DataTable)
- ' Application("GlobalDTAlmacen") = value
- 'End Set
- End Property
- Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjUsr As New ClsSisUsuarios
- If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
- ObjUsr.Dispose()
- End If
- Dim Str As New StringBuilder
- Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
- If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTAlmacenUsuarios = Dv.ToTable
- Dv.Dispose()
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
- 'Property GlobalDTNom_Periodos() As DataTable
- ' Get
- ' GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTNom_Periodos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTVtaFormaPago() As DataTable
- ' Get
- ' GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTVtaFormaPago") = value
- ' End Set
- 'End Property
- 'Property GlobalDTVtaMetodoPago() As DataTable
- ' Get
- ' GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value
- ' End Set
- 'End Property
- 'Property GlobalDTVtaTiposRelacion() As DataTable
- ' Get
- ' GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application("GlobalDTVtaTiposRelacion"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTVtaTiposRelacion") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTiposDocumentos() As DataTable
- ' Get
- ' GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTTiposDocumentos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTiposDocumentos") = value
- ' End Set
- 'End Property
Public ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As ClsPaginas.MTipoCambioFluctuacion
Get
@@ -8559,71 +7649,6 @@ Namespace Modelos
End Get
End Property
-
-#Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************"
- Property GlobalDTContaPlantillasPolizas(CveEmpresa As Integer, Optional TipoPlantilla As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Or TipoPlantilla <> -1 Then
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- If TipoPlantilla <> -1 Then Str.AppendFormat(" AND TipoPlantilla = {0}", TipoPlantilla)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizas"), DataTable), Str.ToString.Substring(5), "", DataViewRowState.CurrentRows)
- GlobalDTContaPlantillasPolizas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaPlantillasPolizas = DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizas"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTContaPlantillasPolizas") = value
- End Set
- End Property
-
- Property GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza As Integer) As DataTable
- Get
- If CvePlantillaPoliza <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows)
- GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaPlantillasPolizasDetalle = DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle") = value
- End Set
- End Property
-
- Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Using ObjContabilidad As New ClsContabilidad
- If ObjContabilidad.GetConta_ConceptosContables() Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
- End Using
-
- End If
- If CveConceptoContable <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows)
- GlobalDTContaConceptosContables = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
-#End Region
-
-
Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,
Optional PorcentajeIVA As Double = -1) As DataTable
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index 06ff258ec..9f9cd4c4e 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -64,7 +64,6 @@ Namespace Extensiones
Private Const SEncryptionKeyAES As String = "$Ap7+5&z$Ap7+5&z$Ap7+5&z$Ap7+5&z"
#End Region
-
Public Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean, Optional curRow As Integer = 0) As DataTable
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim excelFile As GemBox.Spreadsheet.ExcelFile = GemBox.Spreadsheet.ExcelFile.Load(flatFilePath)
@@ -125,7 +124,6 @@ Namespace Extensiones
End Function
-
Public Function IfNull(Valor As Object, Predeterminado As Object, Optional IfNotNull As Object = Nothing) As Object
If Valor Is Nothing OrElse IsDBNull(Valor) Then ' si es nulo, manda el valor predeterminado
@@ -188,7 +186,6 @@ Namespace Extensiones
End Try
End Function
-
Public Sub GuardaLog(Str As String)
Dim ArchivoW As StreamWriter
@@ -337,8 +334,7 @@ Namespace Extensiones
End Sub
#End Region
-#Region "Alertas y notificaciones"
-
+#Region "Alertas y notificaciones"
Public Enum TipoUpdate As Integer
NoGuardar = 0
@@ -362,7 +358,7 @@ Namespace Extensiones
End Enum
Public Sub Alert(Obj As Object, Mensaje As String, pOpcion As TipoMensaje, Optional JSBtnAceptar As String = "", Optional TextoConfirmacion As String = "Aceptar", Optional TextoCancelacion As String = "Cancelar", Optional TimeoutToast As Integer = 5, Optional ShowCloseButton As Boolean = True, Optional TextoSegundoBoton As String = "", Optional JSBtn2 As String = "")
- If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler.GetType().IsSubclassOf(GetType(Page)) Then
+ If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler.GetType().IsSubclassOf(GetType(Page)) Then
Dim Titulo As String = ""
Dim Plus As String = DateTime.Now.Ticks.ToString
@@ -441,7 +437,7 @@ Namespace Extensiones
closeButtonOption = "backdrop : ""static"", keyboard : false, closeButton: false,"
End If
- Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
+ Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page)
Dim script As String = ""
If showalert Then
script = String.Format("bootbox.dialog({{message: ""{0} "", className: ""{11}"", {13} onEscape: function() {{ {12} }},title: ""{1}"",buttons: {{ success: {{ label: ""{2}"", className: "" {3}""," &
@@ -465,7 +461,7 @@ Namespace Extensiones
Public Sub Alert2(Obj As Object, Mensaje As String, pOpcion As TipoMensaje, Optional JSBtnAceptar As String = "")
- If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then
+ If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler IsNot Nothing Then
Dim Img, Botones As String
Dim Titulo As String
Dim Plus As String = DateTime.Now.Ticks.ToString
@@ -503,7 +499,7 @@ Namespace Extensiones
Try
- Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
+ Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page)
'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True)
ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
Pag = Nothing
@@ -555,7 +551,7 @@ Namespace Extensiones
'
'Public Sub updateindicador(Obj As Object, script As String)
- ' Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
+ ' Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page)
' ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), script, True)
' Pag = Nothing
'End Sub
@@ -3474,8 +3470,9 @@ Namespace Extensiones
End Sub
- Public Sub SelectedTextLikeIfExist(ByRef Rbl As DropDownList, ByRef Valor As String)
+ Public Sub SelectedTextLikeIfExist(Rbl As DropDownList, Valor As String)
If Valor <> "" Then
+ Rbl.ClearSelection()
For Each item As ListItem In Rbl.Items
If item.Text.Contains(Valor) Then
item.Selected = True
@@ -3643,16 +3640,7 @@ Namespace Extensiones
Public Sub RegistraScript(Obj As Object, Script As String)
- RegistraScript(Script)
- End Sub
-
-
- Public Sub RegistraScript(Script As String)
- Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
- Script = String.Format("{0};", Script.TrimEnd(";"c)) ' sino trae ";" al final, se lo agregamos
- ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), Guid.NewGuid().ToString(), Script, True)
- Pag = Nothing
-
+ ClsPaginas.RegistraScript(Script)
End Sub
@@ -3667,7 +3655,7 @@ Namespace Extensiones
Private ReadOnly Property ObjClsPaginas As ClsPaginas
Get
- Return DirectCast(System.Web.HttpContext.Current.Handler, ClsPaginas)
+ Return DirectCast(System.Web.HttpContext.Current.CurrentHandler, ClsPaginas)
End Get
End Property
diff --git a/Ashx/E48.ashx b/Ashx/E48.ashx
index 385fd6efe..81952afa9 100644
--- a/Ashx/E48.ashx
+++ b/Ashx/E48.ashx
@@ -78,7 +78,7 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
Dim IDPoliza As Integer = 0
Dim usuario As String = JsonRequest("usuario").ToString()
- If ObjUsuarios.GetUsuariosEmpresas(-1) Then
+ If ObjUsuarios.GetUsuariosEmpresas(-1, -1) Then
CveUsuario = ObjUsuarios.DtResultados.FiltroPrimeroValor("CveUsuario", String.Format("Usuario = '{0}' ", usuario)).ToEntero
If CveUsuario > 0 Then
UsuarioActual = ValidaUsuarioSistema(CveUsuario, CveEmpresa)
diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx
index d9fa69a59..3ad28d89c 100644
--- a/Ashx/SIGFacturacion.ashx
+++ b/Ashx/SIGFacturacion.ashx
@@ -168,7 +168,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
If DTRemisionesPS IsNot Nothing AndAlso DTRemisionesPS.Rows.Count > 0 Then
Dim Resp As New Modelos.Factura.MMensajeFactura
- Dim CveSubProyectoMatriz As Integer = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero()
+ Dim CveSubProyectoMatriz As Integer = ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero()
Dim ObjFactura = CreaFactura(Resp, UsuarioActual, DTRemisionesPS, RowCliente("CveCliente").ToString().ToEntero(), CveSubProyectoMatriz, 1, DatosRemisiones, FechaI, FechaF)
@@ -310,8 +310,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
ObjFactura.TipoCambio = 1
ObjFactura.ConvertirPesos = False
ObjFactura.CveMoneda = CveMoneda
- ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda))
- ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
+ ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda))
+ ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
ObjFactura.TipoDocto = "Ing"
ObjFactura.RefDocto = ""
'ObjFactura.CveMesa = -1
@@ -339,8 +339,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
ObjFactura.CveSubProyecto = CveSubProyecto
ObjFactura.CveSubProyectoCobranza = CveSubProyecto
ObjFactura.CveSubProyectoEjecucion = CveSubProyecto
- ObjFactura.SubProyecto = New SubProyectoModel(GlobalDTSubProyectos(-1).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto)))
- ObjFactura.SubProyectoMatriz = New SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1"))
+ ObjFactura.SubProyecto = New SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto)))
+ ObjFactura.SubProyectoMatriz = New SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1"))
'CLIENTE
ObjFactura.CveCliente = CveCliente
@@ -351,16 +351,16 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33
- ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
- ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
+ ObjFactura.FormaPago33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
+ ObjFactura.FormaPagoSAT33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
- ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
- ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
+ ObjFactura.MetodoPago33 = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
+ ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
- ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
- ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
+ ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
+ ObjFactura.ClaveUsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
'ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
@@ -668,7 +668,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Dim DrPS As DataRow = Nothing
- DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
+ DrPS = ClsPaginas.GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
If DrPS Is Nothing Then
Retorno.Mensajes.Add("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.")
@@ -705,7 +705,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Dim Row As DataRow = Nothing
Dim TotalCalculableImpuestos As Decimal = 0
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
- Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0)
+ Dim DrSubProyecto As DataRow = ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0)
Row = TmpDT.NewRow()
Row("CveProyecto") = DrSubProyecto("CveProyecto").ToString().ToEntero()
@@ -951,7 +951,6 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
ArchivoW.Dispose()
End Sub
-#Region "G L O B A L - D T"
Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
Get
If GlobalTipoCambio <= 0 Then
@@ -1000,2832 +999,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
End Set
End Property
- 'Property GlobalValidarCFDI As Boolean
- ' Get
- ' GlobalValidarCFDI = CBool(HttpContext.Current.Application("GlobalValidarCFDI"))
- ' End Get
- ' Set(value As Boolean)
- ' HttpContext.Current.Application("GlobalValidarCFDI") = value
- ' End Set
- 'End Property
- Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1) As DataTable
- Get
- Dim Str As New StringBuilder
- If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario)
- If CveEmpresa <> -1 Then Str.AppendFormat(" {0} CveEmpresa = {1}", If(Str.Length > 0, "AND", ""), CveEmpresa)
- If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente)
- If CveProveedor <> -1 Then Str.AppendFormat(" {0} CveProveedor = {1}", If(Str.Length > 0, "AND", ""), CveProveedor)
- If CveUsuario <> -1 OrElse CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTUsuarios = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTUsuarios"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTUsuarios") = value
- End Set
- End Property
- Property GlobalDTNomConceptos(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNomConceptos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTNomConceptos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTNomConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomConceptos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTNomConceptos") = value
- End Set
- End Property
- Property GlobalDTTiposGastos(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTiposGastos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTiposGastos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTiposGastos = DirectCast(HttpContext.Current.Application("GlobalDTTiposGastos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTiposGastos") = value
- End Set
- End Property
- Property GlobalDTMFActividad(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveActividad As Integer = -1) As DataTable
- Get
-
- Dim dt As DataTable = Nothing
- Dim ObjMF As New ClsMF
-
- If ObjMF.GetActividad(CveActividad, CveEmpresa, Estatus) Then
- dt = ObjMF.DtResultados
- End If
-
- ObjMF.Dispose()
- GlobalDTMFActividad = dt
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTActividad") = value
- End Set
- End Property
- Property GlobalDTMFOperador(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveOperador As Integer = -1) As DataTable
- Get
-
- Dim dt As DataTable = Nothing
- Dim ObjMF As New ClsMF
-
- If ObjMF.GetOperador(CveOperador, CveEmpresa, Estatus) Then
- dt = ObjMF.DtResultados
- End If
-
- ObjMF.Dispose()
- GlobalDTMFOperador = dt
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTOperador") = value
- End Set
- End Property
- Property GlobalDTMFEstatus(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
- Get
-
- Dim dt As DataTable = Nothing
- Dim ObjMF As New ClsMF
-
- If ObjMF.GetEstatus(CveEstatus, Estatus, CveEmpresa) Then
- dt = ObjMF.DtResultados
- End If
-
- ObjMF.Dispose()
- GlobalDTMFEstatus = dt
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatus") = value
- End Set
- End Property
- Property DtFacturaDefault() As DataTable
- Get
- DtFacturaDefault = DirectCast(HttpContext.Current.Application("DtFacturaDefault"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("DtFacturaDefault") = value
- End Set
- End Property
- Property Directorio() As String
- Get
- Directorio = DirectCast(HttpContext.Current.Application("Directorio"), String)
- End Get
- Set(value As String)
- HttpContext.Current.Application("Directorio") = value
- End Set
- End Property
- Property GlobalDTPSATPS() As DataTable
- Get
- GlobalDTPSATPS = DirectCast(HttpContext.Current.Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTPSATPS") = value
- End Set
- End Property
-
-#Region "GLOBALES DE SAT COMERCIO EXTERIOR"
-
- Property GlobalDTClavePedimento() As DataTable
- Get
- GlobalDTClavePedimento = DirectCast(HttpContext.Current.Application("GlobalDTClavePedimento"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClavePedimento") = value
- End Set
- End Property
-
- Property GlobalDTFraccionArancelaria() As DataTable
- Get
- GlobalDTFraccionArancelaria = DirectCast(HttpContext.Current.Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTFraccionArancelaria") = value
- End Set
- End Property
-
- Property GlobalDTIncoterm() As DataTable
- Get
- GlobalDTIncoterm = DirectCast(HttpContext.Current.Application("GlobalDTIncoterm"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTIncoterm") = value
- End Set
- End Property
-
- Property GlobalDTTipoOperacion() As DataTable
- Get
- GlobalDTTipoOperacion = DirectCast(HttpContext.Current.Application("GlobalDTTipoOperacion"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoOperacion") = value
- End Set
- End Property
-
- Property GlobalDTSATMotivoTraslado() As DataTable
- Get
- GlobalDTSATMotivoTraslado = DirectCast(HttpContext.Current.Application("GlobalDTSATMotivoTraslado"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTSATMotivoTraslado") = value
- End Set
- End Property
-
- Property GlobalDTUnidadAduana() As DataTable
- Get
- GlobalDTUnidadAduana = DirectCast(HttpContext.Current.Application("GlobalDTUnidadAduana"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTUnidadAduana") = value
- End Set
- End Property
-
- Property GlobalDTPais() As DataTable
- Get
- GlobalDTPais = DirectCast(HttpContext.Current.Application("GlobalDTPais"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTPais") = value
- End Set
- End Property
-
- Property GlobalDTEstado(ClaveSATPais As String) As DataTable
- Get
- If ClaveSATPais <> "-1" Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows)
- GlobalDTEstado = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEstado = DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstado") = value
- End Set
- End Property
-
- Property GlobalDTMunicipio(ClaveSATEstado As String) As DataTable
- Get
- If ClaveSATEstado <> "-1" Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTMunicipio"), DataTable), String.Format("ClaveSATEstado = '{0}'", ClaveSATEstado), "", DataViewRowState.CurrentRows)
- GlobalDTMunicipio = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTMunicipio = DirectCast(HttpContext.Current.Application("GlobalDTMunicipio"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMunicipio") = value
- End Set
- End Property
-
- Property GlobalDTColonia(ClaveSATMunicipio As String) As DataTable
- Get
- If ClaveSATMunicipio <> "-1" Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTColonia"), DataTable), String.Format("ClaveSATMunicipio = '{0}'", ClaveSATMunicipio), "", DataViewRowState.CurrentRows)
- GlobalDTColonia = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTColonia = DirectCast(HttpContext.Current.Application("GlobalDTColonia"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTColonia") = value
- End Set
- End Property
-
-#End Region
-
- Property GlobalDTPSATUM() As DataTable
- Get
- GlobalDTPSATUM = DirectCast(HttpContext.Current.Application("GlobalDTPSATUM"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTPSATUM") = value
- End Set
- End Property
- Property GlobalDTNomConceptosFunciones() As DataTable
- Get
- GlobalDTNomConceptosFunciones = DirectCast(HttpContext.Current.Application("GlobalDTNomConceptosFunciones"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTNomConceptosFunciones") = value
- End Set
- End Property
- Property GlobalDTUsuarioResponsable() As DataTable
- Get
- GlobalDTUsuarioResponsable = DirectCast(HttpContext.Current.Application("GlobalDTUsuarioResponsable"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTUsuarioResponsable") = value
- End Set
- End Property
- Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable
- Get
- GlobalDTProveedoresCuentas = DirectCast(HttpContext.Current.Application("GlobalDTProveedoresCuentas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProveedoresCuentas") = value
- End Set
- End Property
- Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProveedorClasificacion = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProveedorClasificacion = DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProveedorClasificacion") = value
- End Set
- End Property
- Property GlobalDTProveedorSucursales(CveProveedor As Integer) As DataTable
- Get
- If CveProveedor <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable), String.Format("CveProveedor = {0}", CveProveedor), "", DataViewRowState.CurrentRows)
- GlobalDTProveedorSucursales = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProveedorSucursales = DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProveedorSucursales") = value
- End Set
- End Property
- Property GlobalDTRoles(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTRoles = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTRoles = DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTRoles") = value
- End Set
- End Property
- Property GlobalDTNomSatBancos() As DataTable
- Get
- GlobalDTNomSatBancos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatBancos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatBancos") = value
- End Set
- End Property
- Property GlobalDTNomSatConceptos() As DataTable
- Get
- GlobalDTNomSatConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatConceptos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatConceptos") = value
- End Set
- End Property
- Property GlobalDTNomSatRegimenContratacion() As DataTable
- Get
- GlobalDTNomSatRegimenContratacion = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion") = value
- End Set
- End Property
- Property GlobalDTNomSatRiesgoPuesto() As DataTable
- Get
- GlobalDTNomSatRiesgoPuesto = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto") = value
- End Set
- End Property
- Property GlobalDTNomSatTipoIncapacidad() As DataTable
- Get
- GlobalDTNomSatTipoIncapacidad = DirectCast(HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad") = value
- End Set
- End Property
- Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
- Get
-
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTEmpresas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEmpresas = DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable)
- End If
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTEmpresas") = value
- End Set
- End Property
- Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
- If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones"), DataTable)
- End If
-
-
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificaciones") = value
- End Set
- End Property
- Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificaciones2 = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificaciones2 = DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificaciones2") = value
- End Set
- End Property
- Property GlobalDTClasificacionesSubProyectos(Optional CveClasificacion As Integer = -1, Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesSubProyectos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesSubProyectos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto") = value
- End Set
- End Property
- Property GlobalDTACClasificadorObjetoGasto(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTACClasificadorObjetoGasto = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTACClasificadorObjetoGasto = DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto") = value
- End Set
- End Property
- Property GlobalDTClasificacionesDetalle(Optional CveEmpresa As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesDetalle = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesDetalle = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesDetalle") = value
- End Set
- End Property
- Property GlobalDTSubFamilias(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTSubFamilias = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTSubFamilias = DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTSubFamilias") = value
- End Set
- End Property
- Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTFamilias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTFamilias = DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTFamilias") = value
- End Set
- End Property
- Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesPresupuestos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesPresupuestos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos") = value
- End Set
- End Property
- Property GlobalDTMetodosPago() As DataTable
- Get
- GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application("GlobalDTMetodosPago"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMetodosPago") = value
- End Set
- End Property
- Property GlobalDTModulos() As DataTable
- Get
- GlobalDTModulos = DirectCast(HttpContext.Current.Application("GlobalDTModulos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTModulos") = value
- End Set
- End Property
- Property GlobalDTMonedas() As DataTable
- Get
- GlobalDTMonedas = DirectCast(HttpContext.Current.Application("GlobalDTMonedas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMonedas") = value
- End Set
- End Property
- Property GlobalDTMonedasAlias() As DataTable
- Get
- GlobalDTMonedasAlias = DirectCast(HttpContext.Current.Application("GlobalDTMonedasAlias"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMonedasAlias") = value
- End Set
- End Property
- Property GlobalDTSucursales(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSucursales"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " Sucursal", DataViewRowState.CurrentRows)
- GlobalDTSucursales = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTSucursales = DirectCast(HttpContext.Current.Application("GlobalDTSucursales"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTSucursales") = value
- End Set
- End Property
- Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable
- Get
- If EsPersonaFisica <> -1 Then
- Dim Tipo As String = ""
- If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1"
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
- GlobalDTSATUsosCFDI = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTSATUsosCFDI") = value
- End Set
- End Property
- 'Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows)
- ' GlobalDTUnidadesMedida = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTUnidadesMedida") = value
- ' End Set
- 'End Property
- 'Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTUnidadesMedidaAlias = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTUnidadesMedidaAlias = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias") = value
- ' End Set
- 'End Property
- Property GlobalDTEstatusOrdenCompra() As DataTable
- Get
- GlobalDTEstatusOrdenCompra = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenCompra"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusOrdenCompra") = value
- End Set
- End Property
- Property GlobalDTLeyendasFiscales() As DataTable
- Get
- GlobalDTLeyendasFiscales = DirectCast(HttpContext.Current.Application("GlobalDTLeyendasFiscales"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value
- End Set
- End Property
-
- Property GlobalDTEstatusFactura() As DataTable
- Get
- GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusFactura") = value
- End Set
- End Property
- Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
- Get
-
- If DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then
- Dim P As New ClsProyectos
- If P.GetProyectos Then
- HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados
- End If
- P.Dispose()
-
- End If
-
- If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1
-
- Dim StrSQL As New StringBuilder
- If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto)
- If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProyectos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProyectos = DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
-
- End If
- HttpContext.Current.Application("GlobalDTProyectos") = value
- End Set
- End Property
- Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
- Dim P As New ClsSubProyectos
- If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
- P.Dispose()
-
- End If
-
- If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
- Dim StrSQL As New StringBuilder
- If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
- If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
- If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTSubProyectos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
- Get
-
- If HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") Is Nothing Then
- Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados Else Alert("Ocurrió un error al cargar los SubProyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
- ObjSubProyectos.Dispose()
- End If
-
- If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
- Dim StrSQL As New StringBuilder
- If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
- If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
- If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", CveEstatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTSubProyectosUsuarios = Dv.ToTable
- Dv.Dispose()
-
- Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios(CveUsuario:=CveUsuario, CveProyecto:=CveProyecto, CveSubProyecto:=CveSubProyecto, CveEstatus:=CveEstatus, CveEmpresa:=CveEmpresa) Then
- GlobalDTSubProyectosUsuarios = ObjSubProyectos.DtResultados
- Else
- GlobalDTSubProyectosUsuarios = Nothing
- End If
- ObjSubProyectos.Dispose()
-
- Else
- GlobalDTSubProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
-
-
- End If
- HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") = value
- End Set
- End Property
- Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable
- Get
-
- If HttpContext.Current.Application("GlobalDTProyectosUsuarios") Is Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable).Rows.Count = 0 Then
- Dim ObjSubProyectos As New ClsSubProyectos()
- If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.Application("GlobalDTProyectosUsuarios") = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
- ObjSubProyectos.Dispose()
- GuardaLog("Se Cargo GlobalDTProyectosUsuarios")
- End If
-
- If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
- Dim StrSQL As New StringBuilder
- If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
- If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatusProyecto = {0}", CveEstatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTProyectosUsuarios = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
-
- End If
- HttpContext.Current.Application("GlobalDTProyectosUsuarios") = value
- End Set
- End Property
- Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable
- Get
- GlobalDTPrecioListas = DirectCast(HttpContext.Current.Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTPrecioListas") = value
- End Set
- End Property
- Property GlobalDTMesas() As DataTable
- Get
- GlobalDTMesas = DirectCast(HttpContext.Current.Application("GlobalDTMesas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMesas") = value
- End Set
- End Property
- Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable
- Get
- GlobalDTTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoOrdenServicios") = value
- End Set
- End Property
- Property GlobalDTSubTipoOrdenServicios() As DataTable
- Get
- GlobalDTSubTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios") = value
- End Set
- End Property
- Property GlobalDTCaracteristicasOrdenServicios() As DataTable
- Get
- GlobalDTCaracteristicasOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios") = value
- End Set
- End Property
- Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable
- Get
- GlobalDTOrdenesServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas") = value
- End Set
- End Property
- Property GlobalDTCaracteristicasOpciones() As DataTable
- Get
- GlobalDTCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOpciones"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTCaracteristicasOpciones") = value
- End Set
- End Property
- Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoCuentasEquipos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoCuentasEquipos = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoCuentasEquipos") = value
- End Set
- End Property
- Property GlobalDTTipoCuentasEquiposCaracteristicas(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas") = value
- End Set
- End Property
- Property GlobalDTTipoCuentasEquiposOpciones(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoCuentasEquiposOpciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones") = value
- End Set
- End Property
- ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1) As DataTable
- Get
- Dim ObjPS As New ClsProductosServicios
-
- If ObjPS.GetPS(CvePS, -1, CveEmpresa, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta) Then
- GlobalDTPS = ObjPS.DtResultados
- Else
- GlobalDTPS = Nothing
- End If
-
- ObjPS.Dispose()
- End Get
- End Property
- Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Cons = DirectCast(HttpContext.Current.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow))
-
- Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
- If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
- If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
- If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
- If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
-
- Try
- GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
- Catch ex As Exception
- GlobalDTPSSimplificado = New DataTable
- End Try
-
- Else
- GlobalDTPSSimplificado = DirectCast(HttpContext.Current.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTPSSimplificado") = value
- End Set
- End Property
- Property GlobalDTProductosServiciosAlias(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim StrSQL As New StringBuilder
- StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstado = {0} ", Estatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosAlias"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProductosServiciosAlias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProductosServiciosAlias = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosAlias"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProductosServiciosAlias") = value
- End Set
- End Property
-
- Property GlobalDTProductosServiciosCaracteristicas(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProductosServiciosCaracteristicas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProductosServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicas"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicas") = value
- End Set
- End Property
- Property GlobalDTProductosServiciosCaracteristicasOpciones(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProductosServiciosCaracteristicasOpciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProductosServiciosCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicasOpciones"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProductosServiciosCaracteristicasOpciones") = value
- End Set
- End Property
- Property GlobalDTInvMetodosInventario() As DataTable
- Get
- GlobalDTInvMetodosInventario = DirectCast(HttpContext.Current.Application("GlobalDTInvMetodosInventario"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTInvMetodosInventario") = value
- End Set
- End Property
- Property GlobalDTAFCaracteristicasOpciones() As DataTable
- Get
- GlobalDTAFCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones") = value
- End Set
- End Property
- Property GlobalDTAFCaracteristicas() As DataTable
- Get
- GlobalDTAFCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAFCaracteristicas") = value
- End Set
- End Property
- Property GlobalDTAFCaracteristicasClasificaciones() As DataTable
- Get
- GlobalDTAFCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones") = value
- End Set
- End Property
- Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim Str As New StringBuilder
- If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS)
- If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa)
-
- If CvePS > 0 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTImpuestosLocales = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTImpuestosLocales = DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTImpuestosLocales") = value
- End Set
- End Property
- 'Bancos
- Property GlobalDTBancos() As DataTable
- Get
- GlobalDTBancos = DirectCast(HttpContext.Current.Application("GlobalDTBancos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTBancos") = value
- End Set
- End Property
-
- Property GlobalDTEstatusIE() As DataTable
- Get
- GlobalDTEstatusIE = DirectCast(HttpContext.Current.Application("GlobalDTEstatusIE"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusIE") = value
- End Set
- End Property
- Property GlobalDTBancosIE() As DataTable
- Get
- GlobalDTBancosIE = DirectCast(HttpContext.Current.Application("GlobalDTBancosIE"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTBancosIE") = value
- End Set
- End Property
- Property GlobalDTTipoCuenta() As DataTable
- Get
- GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuenta"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoCuenta") = value
- End Set
- End Property
- 'Fin Bancos
-
- 'Fin EstadoCIvil
- 'TipoPerioso
- Property GlobalDTTipoPeriodo() As DataTable
- Get
- GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application("GlobalDTTipoPeriodo"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoPeriodo") = value
- End Set
- End Property
- 'Fin TipoPeriodo
-
- 'Periodos
- Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo)
- If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo)
- If Str.Length > 0 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTNominasPeriodos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTNominasPeriodos") = value
- End Set
- End Property
- 'Fin Periodos
-
- 'Fin Ruta
- 'Cliente
- Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjClientes As New ClsClientes
- If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados
- ObjClientes.Dispose()
- End If
-
-
- If CveEmpresa <> -1 Then
-
- Dim StrSQL As New StringBuilder
- StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTCliente = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- 'Dim ObjClientes As New ClsClientes
- 'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados
- 'ObjClientes.Dispose()
- End Set
- End Property
- Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjClientes As New ClsClientes
- If ObjClientes.GetClienteClasificacion(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados
- ObjClientes.Dispose()
- End If
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClienteClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- 'Dim ObjClientes As New ClsClientes
- 'If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados
- 'ObjClientes.Dispose()
- End Set
- End Property
- Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTEstatusOrdenServicios = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEstatusOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusOrdenServicios") = value
- End Set
- End Property
- 'Variables para Ventas
- Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Boolean = True, Optional VendedorTipo As Integer = 1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows)
- GlobalDTVendedores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTVendedores = DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTVendedores") = value
- End Set
- End Property
- Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClientesCorporativo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClientesCorporativo = DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClientesCorporativo") = value
- End Set
- End Property
- Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTCompProveedores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTCompProveedores = DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTCompProveedores") = value
- End Set
- End Property
- 'EstatusFactura
- Property GlobalDTCompEstatusFactura() As DataTable
- Get
- GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'")
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTCompEstatusFactura") = value
- End Set
- End Property
- Property GlobalDTContratosSecciones() As DataTable
- Get
- GlobalDTContratosSecciones = DirectCast(HttpContext.Current.Application("GlobalDTContratosSecciones"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTContratosSecciones") = value
- End Set
- End Property
- Property GlobalDTContratos() As DataTable
- Get
- GlobalDTContratos = DirectCast(HttpContext.Current.Application("GlobalDTContratos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTContratos") = value
- End Set
- End Property
- Property GlobalDTContratosTipos() As DataTable
- Get
- GlobalDTContratosTipos = DirectCast(HttpContext.Current.Application("GlobalDTContratosTipos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTContratosTipos") = value
- End Set
- End Property
- Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoAlmacen = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoAlmacen") = value
- End Set
- End Property
- Property GlobalDTInvConceptos() As DataTable
- Get
-
- Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable)
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTInvConceptos") = value
- End Set
- End Property
- Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTSeccionAlmacen = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value
- End Set
- End Property
- Property GlobalDTAlmacen(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAlmacen = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTAlmacen"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAlmacen") = value
- End Set
- End Property
- Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjUsr As New ClsSisUsuarios
- If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
- ObjUsr.Dispose()
- End If
- Dim Str As New StringBuilder
- Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
- If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTAlmacenUsuarios = Dv.ToTable
- Dv.Dispose()
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- 'Get
- ' If CveEmpresa <> -1 Then
- ' Dim Str As New StringBuilder
- ' Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
- ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
-
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTAlmacenUsuarios = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTAlmacenUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable)
- ' End If
-
- 'End Get
- 'Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAlmacenUsuarios") = value
- 'End Set
- End Property
- Property GlobalDTNom_Periodos() As DataTable
- Get
- GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTNom_Periodos") = value
- End Set
- End Property
- Property GlobalDTVtaFormaPago() As DataTable
- Get
- GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTVtaFormaPago") = value
- End Set
- End Property
- Property GlobalDTVtaMetodoPago() As DataTable
- Get
- GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value
- End Set
- End Property
- Property GlobalDTVtaTiposRelacion() As DataTable
- Get
- GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application("GlobalDTVtaTiposRelacion"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTVtaTiposRelacion") = value
- End Set
- End Property
- Property GlobalDTTiposDocumentos() As DataTable
- Get
- GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTTiposDocumentos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTiposDocumentos") = value
- End Set
- End Property
- Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTCobranzaEstatus = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTCobranzaEstatus = DirectCast(HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus") = value
- End Set
- End Property
-
-
-#Region "***********************************************************************DT EVENTOS****************************************************************************************"
- Property GlobalDTTiposEventos() As DataTable
- Get
- GlobalDTTiposEventos = DirectCast(HttpContext.Current.Application("GlobalDTTiposEventos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTiposEventos") = value
- End Set
- End Property
-
- Property GlobalDTEventos() As DataTable
- Get
- GlobalDTEventos = DirectCast(HttpContext.Current.Application("GlobalDTEventos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEventos") = value
- End Set
- End Property
-
- Property GlobalDTOIEventoTarea() As DataTable
- Get
- GlobalDTOIEventoTarea = DirectCast(HttpContext.Current.Application("GlobalDTOIEventoTarea"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTOIEventoTarea") = value
- End Set
- End Property
-
- Property GlobalDTOIEstatusEventos() As DataTable
- Get
- GlobalDTOIEstatusEventos = DirectCast(HttpContext.Current.Application("GlobalDTOIEstatusEventos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTOIEstatusEventos") = value
- End Set
- End Property
-#End Region
-
-#Region " **********************************************************************DT PROSPECTOS*************************************************************************************"
- Property GlobalDTProspectosCaracteristicasClasificaciones() As DataTable
- Get
- GlobalDTProspectosCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicasClasificaciones"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosCaracteristicasClasificaciones") = value
- End Set
- End Property
- Property GlobalDTProspectosTiposCaracteristicas() As DataTable
- Get
- GlobalDTProspectosTiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosTiposCaracteristicas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosTiposCaracteristicas") = value
- End Set
- End Property
- Property GlobalDTProspectosCaracteristicas(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosCaracteristicas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicas"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosCaracteristicas") = value
- End Set
- End Property
-
- Property GlobalDTProspectosCaracteristicasOpciones() As DataTable
- Get
- GlobalDTProspectosCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones") = value
- End Set
- End Property
-#End Region
-
-#Region "***********************************************************************DT ACTIVOS FIJOS**********************************************************************************"
- Property GlobalDTActivoFijos(CveEmpresa As Integer, Optional CveSubTipoActivoFijo As Integer = -1, Optional CveActivoFijo As Integer = -1) As DataTable
- Get
- Dim dt As DataTable = Nothing
- 'Dim Str As New StringBuilder
- 'Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- 'If CveSubTipoActivoFijo <> -1 Then Str.AppendFormat(" AND CveSubTipoActivoFijo = {0}", CveSubTipoActivoFijo)
-
- Dim ObjAF As New ClsAF
- 'If ObjAF.GetActivosFijos(CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, -1, "-1", -1, -1, -1, -1, -1) Then
- If ObjAF.GetActivosFijos(CveActivoFijo, CveEmpresa, "-1", "-1", -1, CveSubTipoActivoFijo, "-1", -1, -1, -1, -1, -1, "", -1) Then
- dt = ObjAF.DtResultados
- End If
-
- ObjAF.Dispose()
- GlobalDTActivoFijos = dt
-
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTActivoFijos") = value
- End Set
- End Property
- Property GlobalDTEstadoActivoFijo() As DataTable
- Get
- GlobalDTEstadoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTEstadoActivoFijo"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstadoActivoFijo") = value
- End Set
- End Property
- Property GlobalDTMarcaActivoFijo(CveEmpresa As Integer) As DataTable
- Get
- Dim dt As DataTable = Nothing
-
- Dim ObjAF As New ClsAF
-
- If ObjAF.GetMarcasActivosFijos(CveEmpresa) Then
- dt = ObjAF.DtResultados
- End If
-
- ObjAF.Dispose()
- GlobalDTMarcaActivoFijo = dt
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMarcaActivoFijo") = value
- End Set
- End Property
- Property GlobalDTModeloActivoFijo(CveEmpresa As Integer, CveMarca As Integer) As DataTable
- Get
- Dim dt As DataTable = Nothing
-
- Dim ObjAF As New ClsAF
-
- If ObjAF.GetModelosActivosFijos(CveEmpresa, CveMarca) Then
- dt = ObjAF.DtResultados
- End If
-
- ObjAF.Dispose()
- GlobalDTModeloActivoFijo = dt
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTModeloActivoFijo") = value
- End Set
- End Property
-
- Property GlobalDTSubTipoActivoFijo(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTSubTipoActivoFijo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTSubTipoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoActivoFijo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTSubTipoActivoFijo") = value
- End Set
- End Property
- Property GlobalDTTipoActivoFijo(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTTipoActivoFijo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTTipoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTTipoActivoFijo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoActivoFijo") = value
- End Set
- End Property
-
-#End Region
-
-#Region "***********************************************************************DT GENERALES**************************************************************************************"
- Property GlobalDTGralPaises() As DataTable
- Get
- GlobalDTGralPaises = DirectCast(HttpContext.Current.Application("GlobalDTGralPaises"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTGralPaises") = value
- End Set
- End Property
- Property GlobalDTGralEstados(CvePais As Integer) As DataTable
- Get
- GlobalDTGralEstados = DirectCast(HttpContext.Current.Application("GlobalDTGralEstados"), DataTable).FiltraParametros(String.Format("CvePais ={0}", CvePais))
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTGralEstados") = value
- End Set
- End Property
- Property GlobalDTGralMunicipios(CveEstado As Integer) As DataTable
- Get
- GlobalDTGralMunicipios = DirectCast(HttpContext.Current.Application("GlobalDTGralMunicipios"), DataTable).FiltraParametros(String.Format("CveEstado ={0}", CveEstado))
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTGralMunicipios") = value
- End Set
- End Property
-
- Property GlobalDTGralPoblaciones() As DataTable
- Get
- GlobalDTGralPoblaciones = DirectCast(HttpContext.Current.Application("GlobalDTGralPoblaciones"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTGralPoblaciones") = value
- End Set
- End Property
- Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
-
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTGralCategorias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTGralCategorias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTGralCategorias = DirectCast(HttpContext.Current.Application("GlobalDTGralCategorias"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTGralCategorias") = value
- End Set
- End Property
- Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable
-
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTGralCategorias2 = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTGralCategorias2 = DirectCast(HttpContext.Current.Application("GlobalDTCategorias2"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTCategorias2") = value
- End Set
- End Property
-
- Property GlobalDTGralEscolaridades() As DataTable
- Get
- GlobalDTGralEscolaridades = DirectCast(HttpContext.Current.Application("GlobalDTGralEscolaridades"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTGralEscolaridades") = value
- End Set
- End Property
-
- Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTGralColectivas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTGralColectivas = DirectCast(HttpContext.Current.Application("GlobalDTGralColectivas"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTGralColectivas") = value
- End Set
- End Property
-
-#End Region
-
-#Region "***********************************************************************DT PROSPECTOS*************************************************************************************"
- Property GlobalDTProspectosSupervisores(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSupervisores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosSupervisores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosSupervisores = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSupervisores"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosSupervisores") = value
- End Set
- End Property
- Property GlobalDTProspectosCoordinadores(CveSupervisor As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveSupervisor <> -1 Then Str.AppendFormat(" {0} CveSupervisor = {1}", If(Str.Length > 0, "AND", ""), CveSupervisor)
- If Str.Length > 0 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosCoordinadores"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosCoordinadores = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProspectosCoordinadores = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCoordinadores"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosCoordinadores") = value
- End Set
- End Property
- Property GlobalDTProspectosApoyos(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosApoyos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosApoyos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyos"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosApoyos") = value
- End Set
- End Property
- Property GlobalDTProspectosClasificaciones(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosClasificaciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosClasificaciones"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosClasificaciones") = value
- End Set
- End Property
- Property GlobalDTProspectosEventosTipo(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEventosTipo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEventosTipo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosEventosTipo = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEventosTipo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosEventosTipo") = value
- End Set
- End Property
- Property GlobalDTProspectosEvento(CveEventoTipo As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveEventoTipo <> -1 Then Str.AppendFormat(" {0} CveEventoTipo = {1}", If(Str.Length > 0, "AND", ""), CveEventoTipo)
- If Str.Length > 0 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEvento"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEvento = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosEvento = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEvento"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosEvento") = value
- End Set
- End Property
- Property GlobalDTProspectosEstatus(CveEmpresa As Integer) As DataTable
- Get
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If Str.Length > 0 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEstatus"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEstatus = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosEstatus = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEstatus"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosEstatus") = value
- End Set
- End Property
- Property GlobalDTProspectosApoyosTipos(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosApoyosTipos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosApoyosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosApoyosTipos") = value
- End Set
- End Property
- Property GlobalDTProspectosApoyosTipos() As DataTable
- Get
- GlobalDTProspectosApoyosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosApoyosTipos") = value
- End Set
- End Property
- Property GlobalDTProspectosEncuestas(CveEmpresa As Integer) As DataTable
- Get
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
-
- If Str.Length > 0 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEncuestas = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProspectosEncuestas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestas"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosEncuestas") = value
- End Set
- End Property
- Property GlobalDTProspectosEncuestasPreguntas(CveEncuesta As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveEncuesta <> -1 Then Str.AppendFormat(" {0} CveEncuesta = {1}", If(Str.Length > 0, "AND", ""), CveEncuesta)
-
-
- If Str.Length > 0 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEncuestasPreguntas = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProspectosEncuestasPreguntas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas") = value
- End Set
- End Property
- Property GlobalDTProspectosEncuestasRespuestas(CvePregunta As Integer, CveEncuesta As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveEncuesta <> -1 Then Str.AppendFormat(" {0} CveEncuesta = {1}", If(Str.Length > 0, "AND", ""), CveEncuesta)
- If CvePregunta <> -1 Then Str.AppendFormat(" {0} CvePregunta = {1}", If(Str.Length > 0, "AND", ""), CvePregunta)
-
-
- If Str.Length > 0 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProspectosEncuestasRespuestas = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProspectosEncuestasRespuestas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas") = value
- End Set
- End Property
- Property GlobalDTProspectosTipos(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosTipos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosTipos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosTipos") = value
- End Set
- End Property
-
-#Region " DT PROSPECTOS SOLICITUDES"
- Property GlobalDTProspectosSolicitudes(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudes"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosSolicitudes = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosSolicitudes = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudes"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosSolicitudes") = value
- End Set
- End Property
- Property GlobalDTProspectosSolicitudesEstatus(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosSolicitudesEstatus = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosSolicitudesEstatus = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus") = value
- End Set
- End Property
- Property GlobalDTProspectosSolicitudesTipos(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosSolicitudesTipos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosSolicitudesTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable)
- End If
- End Get
-
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos") = value
- End Set
- End Property
- 'Property GlobalDTProspectosSolicitudesTipos() As DataTable
- ' Get
- ' GlobalDTProspectosSolicitudesTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos") = value
- ' End Set
- 'End Property
- Property GlobalDTProspectosSolicitudesApoyos(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProspectosSolicitudesApoyos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProspectosSolicitudesApoyos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos") = value
- End Set
- End Property
-
-#End Region
-#End Region
-
-#Region "**********************************************DT AMORTIZACIÓN CONTABLE PLAN DE DESARROLLO********************************************************************************"
-
-#Region "***********************************************************************DT AMORTIZACIÓN CONTABLE*********************************************************************************************"
-
- Property GlobalDTAC_RubrosIngreso() As DataTable
- Get
- GlobalDTAC_RubrosIngreso = DirectCast(HttpContext.Current.Application("GlobalDTAC_RubrosIngreso"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_RubrosIngreso") = value
- End Set
- End Property
- Property GlobalDTAC_FuentesRecaudacion(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTAC_FuentesRecaudacion = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_FuentesRecaudacion = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion") = value
- End Set
- End Property
-
- Property GlobalDTAC_FuentesFinanciamiento() As DataTable
- Get
- GlobalDTAC_FuentesFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento") = value
- End Set
- End Property
- Property GlobalDTAC_OG() As DataTable
- Get
- GlobalDTAC_OG = DirectCast(HttpContext.Current.Application("GlobalDTAC_OG"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_OG") = value
- End Set
- End Property
- 'Property GlobalDTAC_ClasificadorOG(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
- ' Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificadorOG"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- ' GlobalDTAC_ClasificadorOG = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTAC_ClasificadorOG = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificadorOG"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAC_ClasificadorOG") = value
- ' End Set
- 'End Property
- Property GlobalDTAC_Ubicaciones() As DataTable
- Get
- GlobalDTAC_Ubicaciones = DirectCast(HttpContext.Current.Application("GlobalDTAC_Ubicaciones"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_Ubicaciones") = value
- End Set
- End Property
- Property GlobalDTAC_UnidadesAdministrativas(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTAC_UnidadesAdministrativas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_UnidadesAdministrativas = DirectCast(HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas") = value
- End Set
- End Property
- Property GlobalDTAC_ClasificacionFuncional(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAC_ClasificacionFuncional = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_ClasificacionFuncional = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional") = value
- End Set
- End Property
- Property GlobalDTAC_ClasificacionGeografica(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAC_ClasificacionGeografica = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_ClasificacionGeografica = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica") = value
- End Set
- End Property
- Property GlobalDTAC_Cuentas() As DataTable
- Get
- GlobalDTAC_Cuentas = DirectCast(HttpContext.Current.Application("GlobalDTAC_Cuentas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_Cuentas") = value
- End Set
- End Property
- Property GlobalDTAC_Finalidad() As DataTable
- Get
- GlobalDTAC_Finalidad = DirectCast(HttpContext.Current.Application("GlobalDTAC_Finalidad"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_Finalidad") = value
- End Set
- End Property
- 'Property GlobalDTAC_FuenteFinanciamiento() As DataTable
- ' Get
- ' GlobalDTAC_FuenteFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuenteFinanciamiento"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAC_FuenteFinanciamiento") = value
- ' End Set
- 'End Property
- Property GlobalDTAC_FuentesFinanciamiento(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTAC_FuentesFinanciamiento = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_FuentesFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento") = value
- End Set
- End Property
- Property GlobalDTAC_FuentesFinanciamientoCONAC() As DataTable
- Get
- GlobalDTAC_FuentesFinanciamientoCONAC = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamientoCONAC"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamientoCONAC") = value
- End Set
- End Property
- Property GlobalDTAC_Funcion() As DataTable
- Get
- GlobalDTAC_Funcion = DirectCast(HttpContext.Current.Application("GlobalDTAC_Funcion"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_Funcion") = value
- End Set
- End Property
- Property GlobalDTAC_Programas() As DataTable
- Get
- GlobalDTAC_Programas = DirectCast(HttpContext.Current.Application("GlobalDTAC_Programas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_Programas") = value
- End Set
- End Property
- Property GlobalDTAC_ProgramasCONAC() As DataTable
- Get
- GlobalDTAC_ProgramasCONAC = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramasCONAC"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_ProgramasCONAC") = value
- End Set
- End Property
- Property GlobalDTAC_ProyectosProceso() As DataTable
- Get
- GlobalDTAC_ProyectosProceso = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProyectosProceso"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_ProyectosProceso") = value
- End Set
- End Property
- Property GlobalDTAC_SubFuncion() As DataTable
- Get
- GlobalDTAC_SubFuncion = DirectCast(HttpContext.Current.Application("GlobalDTAC_SubFuncion"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_SubFuncion") = value
- End Set
- End Property
- Property GlobalDTAC_SubProgramas() As DataTable
- Get
- GlobalDTAC_SubProgramas = DirectCast(HttpContext.Current.Application("GlobalDTAC_SubProgramas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_SubProgramas") = value
- End Set
- End Property
- Property GlobalDTAC_ClasificacionAdministrativa(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAC_ClasificacionAdministrativa = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_ClasificacionAdministrativa = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa") = value
- End Set
- End Property
- Property GlobalDTAC_TipoGasto() As DataTable
- Get
- GlobalDTAC_TipoGasto = DirectCast(HttpContext.Current.Application("GlobalDTAC_TipoGasto"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_TipoGasto") = value
- End Set
- End Property
-
- Property GlobalDTAC_ProgramaOperativo(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAC_ProgramaOperativo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_ProgramaOperativo = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo") = value
- End Set
- End Property
-
- Property GlobalDTAC_MatrizIngresos() As DataTable
- Get
- GlobalDTAC_MatrizIngresos = DirectCast(HttpContext.Current.Application("GlobalDTAC_MatrizIngresos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_MatrizIngresos") = value
- End Set
- End Property
-
- Property GlobalDTAC_MatrizEgresos() As DataTable
- Get
- GlobalDTAC_MatrizEgresos = DirectCast(HttpContext.Current.Application("GlobalDTAC_MatrizEgresos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_MatrizEgresos") = value
- End Set
- End Property
-
-
-#End Region
-
- Property GlobalDTAC_PD_EjeRector(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_EjeRector"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTAC_PD_EjeRector = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_PD_EjeRector = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_EjeRector"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_PD_EjeRector") = value
- End Set
- End Property
-
- Property GlobalDTAC_PD_Programas(CveEjeRector As Integer) As DataTable
- Get
- If CveEjeRector <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Programas"), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows)
- GlobalDTAC_PD_Programas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_PD_Programas = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Programas"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_PD_Programas") = value
- End Set
- End Property
-
- Property GlobalDTAC_PD_Estrategias(CveProgramas As Integer) As DataTable
- Get
- If CveProgramas <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Estrategias"), DataTable), String.Format("CvePrograma = {0}", CveProgramas), "", DataViewRowState.CurrentRows)
- GlobalDTAC_PD_Estrategias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_PD_Estrategias = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Estrategias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_PD_Estrategias") = value
- End Set
- End Property
-
- Property GlobalDTAC_PD_LineasAccion(CveEstrategias As Integer) As DataTable
- Get
- If CveEstrategias <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion"), DataTable), String.Format("CveEstrategia = {0}", CveEstrategias), "", DataViewRowState.CurrentRows)
- GlobalDTAC_PD_LineasAccion = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_PD_LineasAccion = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion") = value
- End Set
- End Property
-
- Property GlobalDTAC_PD_Metas(CveLineasAccion As Integer) As DataTable
- Get
- If CveLineasAccion <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Metas"), DataTable), String.Format("CveLineaAccion = {0}", CveLineasAccion), "", DataViewRowState.CurrentRows)
- GlobalDTAC_PD_Metas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAC_PD_Metas = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Metas"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAC_PD_Metas") = value
- End Set
- End Property
-#End Region
-
-#Region "***********************************************************************GLOBAL DT ORDENES DE COMPRA***********************************************************************"
- Property GlobalDTOCEstatus(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTOCEstatus = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTOCEstatus = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatus"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTOCEstatus") = value
- End Set
- End Property
-
- Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable
- Get
-
- Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
-
- Dim ObjOC As New ClsOC
- If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then
- HttpContext.Current.Application(AppNombre) = ObjOC.DtResultados
- Else
- HttpContext.Current.Application(AppNombre) = Nothing
- End If
-
- ObjOC.Dispose()
-
- End If
-
- Dim filtro As New StringBuilder
- filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa)
- If CveUsuario > 0 Then
- filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario)
- End If
- If Tipo <> "" Then
- filtro.AppendFormat(" AND Tipo='{0}'", Tipo)
- End If
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTOCEstatusUsuarios = Dv.ToTable
- Dv.Dispose()
-
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
-
-
-
-
-
- 'Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
- ' Dim filtro As New StringBuilder
- ' filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa)
- ' If CveUsuario > 0 Then
- ' filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario)
- ' End If
- ' If Tipo <> "" Then
- ' filtro.AppendFormat(" AND Tipo='{0}'", Tipo)
- ' End If
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTOCEstatusUsuarios = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTOCEstatusUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTOCEstatusUsuarios") = value
- ' End Set
- 'End Property
-
-
-#End Region
-
-#Region "F I N A N Z A S "
- Property GlobalDTFinan_RazonesFinancieras() As DataTable
- Get
- GlobalDTFinan_RazonesFinancieras = DirectCast(HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras") = value
- End Set
- End Property
-#End Region
-
-
-#Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************"
- Property GlobalDTContaPlantillasPolizas(CveEmpresa As Integer, Optional TipoPlantilla As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Or TipoPlantilla <> -1 Then
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- If TipoPlantilla <> -1 Then Str.AppendFormat(" AND TipoPlantilla = {0}", TipoPlantilla)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizas"), DataTable), Str.ToString.Substring(5), "", DataViewRowState.CurrentRows)
- GlobalDTContaPlantillasPolizas = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaPlantillasPolizas = DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizas"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTContaPlantillasPolizas") = value
- End Set
- End Property
-
- Property GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza As Integer) As DataTable
- Get
- If CvePlantillaPoliza <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows)
- GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaPlantillasPolizasDetalle = DirectCast(HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTContaPlantillasPolizasDetalle") = value
- End Set
- End Property
-
-
-
- Property GlobalDTContaConceptosContables(CvePlantillaPoliza As Integer) As DataTable
- Get
- If CvePlantillaPoliza <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows)
- GlobalDTContaConceptosContables = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTContaConceptosContables") = value
- End Set
- End Property
-#End Region
-
-#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
- Property GlobalDTAsistenciaDetalle() As DataTable
- Get
- GlobalDTAsistenciaDetalle = DirectCast(HttpContext.Current.Application("GlobalDTAsistenciaDetalle"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAsistenciaDetalle") = value
- End Set
- End Property
- Property GlobalDTAsistenciasInasistencias() As DataTable
- Get
- GlobalDTAsistenciasInasistencias = DirectCast(HttpContext.Current.Application("GlobalDTAsistenciasInasistencias"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAsistenciasInasistencias") = value
- End Set
- End Property
- Property GlobalDTEstatusPersonal() As DataTable
- Get
- GlobalDTEstatusPersonal = DirectCast(HttpContext.Current.Application("GlobalDTEstatusPersonal"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusPersonal") = value
- End Set
- End Property
-
- Property GlobalDTRHPersonal(CveEmpresa As Integer) As DataTable
- Get
- Dim ObjPersonal As New ClsRH
- ObjPersonal.GetPersonal(-1, CveEmpresa)
- GlobalDTRHPersonal = ObjPersonal.DtResultados
- ObjPersonal.Dispose()
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTRHPersonal") = value
- End Set
- End Property
-
-
- Property GlobalDTDepartamentos() As DataTable
- Get
- GlobalDTDepartamentos = DirectCast(HttpContext.Current.Application("GlobalDTDepartamentos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTDepartamentos") = value
- End Set
- End Property
- Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTRHPuestos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTRHPuestos = DirectCast(HttpContext.Current.Application("GlobalDTRHPuestos"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTRHPuestos") = value
- End Set
- End Property
- Property GlobalDTEscolaridad() As DataTable
- Get
- GlobalDTEscolaridad = DirectCast(HttpContext.Current.Application("GlobalDTEscolaridad"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEscolaridad") = value
- End Set
- End Property
- Property GlobalDTEstadoCivil() As DataTable
- Get
- GlobalDTEstadoCivil = DirectCast(HttpContext.Current.Application("GlobalDTEstadoCivil"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstadoCivil") = value
- End Set
- End Property
- Property GlobalDTDocumentos() As DataTable
- Get
- GlobalDTDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTDocumentos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTDocumentos") = value
- End Set
- End Property
- Property GlobalDTGenero() As DataTable
- Get
- GlobalDTGenero = DirectCast(HttpContext.Current.Application("GlobalDTGenero"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTGenero") = value
- End Set
- End Property
- Property GlobalDTMotivoBaja() As DataTable
- Get
- GlobalDTMotivoBaja = DirectCast(HttpContext.Current.Application("GlobalDTMotivoBaja"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMotivoBaja") = value
- End Set
- End Property
- Property GlobalDTTiposContrato() As DataTable
- Get
- GlobalDTTiposContrato = DirectCast(HttpContext.Current.Application("GlobalDTTiposContrato"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTiposContrato") = value
- End Set
- End Property
- Property GlobalDTRutas() As DataTable
- Get
- GlobalDTRutas = DirectCast(HttpContext.Current.Application("GlobalDTRutas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTRutas") = value
- End Set
- End Property
- Property GlobalDTTurno() As DataTable
- Get
- GlobalDTTurno = DirectCast(HttpContext.Current.Application("GlobalDTTurno"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTurno") = value
- End Set
- End Property
- Property GlobalDTJornadas() As DataTable
- Get
- GlobalDTJornadas = DirectCast(HttpContext.Current.Application("GlobalDTJornadas"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTJornadas") = value
- End Set
- End Property
- Property GlobalDTMotivosHorasExtras() As DataTable
- Get
- GlobalDTMotivosHorasExtras = DirectCast(HttpContext.Current.Application("GlobalDTMotivosHorasExtras"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMotivosHorasExtras") = value
- End Set
- End Property
- Property GlobalDTTipoBuzon() As DataTable
- Get
- GlobalDTTipoBuzon = DirectCast(HttpContext.Current.Application("GlobalDTTipoBuzon"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoBuzon") = value
- End Set
- End Property
-#End Region
-
-#Region "*********** D T - C O M B U S T I B L E S ***********"
-
-
-
- Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As New StringBuilder
- StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCombustibles"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTCombustibles = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTCombustibles = DirectCast(HttpContext.Current.Application("GlobalDTCombustibles"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTCombustibles") = value
- End Set
- End Property
-
- Property GlobalDTCombustiblesTipos(Optional CveCombustibleTipo As Integer = -1) As DataTable
- Get
-
- If CveCombustibleTipo <> -1 Then
-
- Dim StrSQL As New StringBuilder
- If CveCombustibleTipo <> -1 Then StrSQL.AppendFormat("CveCombustibleTipo = {0}", CveCombustibleTipo)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCombustiblesTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTCombustiblesTipos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTCombustiblesTipos = DirectCast(HttpContext.Current.Application("GlobalDTCombustiblesTipos"), DataTable)
- End If
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTCombustiblesTipos") = value
- End Set
- End Property
-#End Region
-
-#Region "*********** D T - M A N T E N I M I E N T O S ***********"
-
- Property GlobalDTMantenimientosTipos() As DataTable
- Get
- GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value
- End Set
- End Property
-
- Property GlobalDTMantenimientos() As DataTable
- Get
- GlobalDTMantenimientos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMantenimientos") = value
- End Set
- End Property
-
- Property GlobalDTMantenimientosTipos(Optional CveMantenimientoTipo As Integer = -1) As DataTable
- Get
-
- If CveMantenimientoTipo <> -1 Then
-
- Dim StrSQL As New StringBuilder
- If CveMantenimientoTipo <> -1 Then StrSQL.AppendFormat("CveMantenimientoTipo = {0}", CveMantenimientoTipo)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTMantenimientosTipos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable)
- End If
- End Get
- Set(ByVal value As DataTable)
-
- HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value
- End Set
- End Property
-
-#End Region
-
-
-#Region "*********** D T - T A L L E R E S ***********"
-
- Property GlobalDTTalleresTipos() As DataTable
- Get
- GlobalDTTalleresTipos = DirectCast(HttpContext.Current.Application("GlobalDTTalleresTipos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTalleresTipos") = value
- End Set
- End Property
-
- Property GlobalDTTalleres() As DataTable
- Get
- GlobalDTTalleres = DirectCast(HttpContext.Current.Application("GlobalDTTalleres"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTalleres") = value
- End Set
- End Property
-
-#End Region
-
-#Region "*********** D T - D I S T R I B U I D O R E S ***********"
-
- Property GlobalDTDistribuidoresTipos() As DataTable
- Get
- GlobalDTDistribuidoresTipos = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidoresTipos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTDistribuidoresTipos") = value
- End Set
- End Property
-
- Property GlobalDTDistribuidores() As DataTable
- Get
- GlobalDTDistribuidores = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidores"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTDistribuidores") = value
- End Set
- End Property
-
-#End Region
-
-
- Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTOIRevision = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTOIRevision = DirectCast(HttpContext.Current.Application("GlobalDTOIRevision"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTOIRevision") = value
- End Set
- End Property
- Property GlobalDTOIAgendaTipo() As DataTable
- Get
- GlobalDTOIAgendaTipo = DirectCast(HttpContext.Current.Application("GlobalDTOIAgendaTipo"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTOIAgendaTipo") = value
- End Set
- End Property
- Property GlobalDTOIAgenda() As DataTable
- Get
- GlobalDTOIAgenda = DirectCast(HttpContext.Current.Application("GlobalDTOIAgenda"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTOIAgenda") = value
- End Set
- End Property
- Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTVtaCondicionesEntrega = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTVtaCondicionesEntrega = DirectCast(HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega") = value
- End Set
- End Property
- Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable
-
- Get
- If CveEmpresa <> -1 Then
- Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
- GlobalDTPaqueteriaGuiaTipos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTPaqueteriaGuiaTipos = DirectCast(HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos") = value
- End Set
- End Property
- Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,
- Optional PorcentajeIVA As Double = -1) As DataTable
-
- Get
- Dim Str As StringBuilder = New StringBuilder()
- If CveEmpresa <> -1 Or CveClasicacionPorcentaje <> -1 Or CveClasicacion <> -1 Or PorcentajeIVA <> -1 Then
- If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveClasicacionPorcentaje <> -1 Then Str.AppendFormat(" {0} CveClasicacionPorcentaje = {1}", If(Str.Length > 0, "AND", ""), CveClasicacionPorcentaje)
- If CveClasicacion <> -1 Then Str.AppendFormat(" {0} CveClasicacion = {1}", If(Str.Length > 0, "AND", ""), CveClasicacion)
- If PorcentajeIVA <> -1 Then Str.AppendFormat(" {0} PorcentajeIVA = {1}", If(Str.Length > 0, "AND", ""), PorcentajeIVA)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionPorcentaje"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionPorcentaje = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionPorcentaje = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionPorcentaje"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionPorcentaje") = value
- End Set
- End Property
- Property GlobalDTPaqueterias() As DataTable
- Get
- GlobalDTPaqueterias = DirectCast(HttpContext.Current.Application("GlobalDTPaqueterias"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTPaqueterias") = value
- End Set
- End Property
-
-#End Region
End Class
\ No newline at end of file
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb
index f651eac3c..78e3472d1 100644
--- a/Bancos/DepositosCaja.aspx.vb
+++ b/Bancos/DepositosCaja.aspx.vb
@@ -267,6 +267,16 @@ Partial Class Bancos_DepositosCaja
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco)
End If
+ If CveSubProyecto <= 0 Then 'sino se seleccionó del combo, busca en el listado el primero
+
+ For Each Gvr As GridViewRow In GvFacturas.Rows
+ If Gvr.FCCheckBox("ChkFactura").Checked Then
+ CveSubProyecto = Gvr.DataKey("CveSubProyecto").ToEntero
+ Exit For
+ End If
+ Next
+ End If
+
If FolioIE <= 0 Then
OcurrioError = True
End If
diff --git a/Bancos/OtrosIE.aspx.vb b/Bancos/OtrosIE.aspx.vb
index cb99507d6..09a79ba60 100644
--- a/Bancos/OtrosIE.aspx.vb
+++ b/Bancos/OtrosIE.aspx.vb
@@ -201,7 +201,7 @@ Partial Class Bancos_OtrosIE
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
- Dim DT As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros("", "Orden")
+ Dim DT As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
Dim Cuenta As String = ""
Dim IdCuenta As Integer = 0
Dim CodigoCuenta As String = ""
diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb
index cbfc816d9..25d3d9559 100644
--- a/Bancos/PolizaCheque.aspx.vb
+++ b/Bancos/PolizaCheque.aspx.vb
@@ -387,7 +387,7 @@ Partial Class Bancos_PolizaCheque
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
- Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
+ Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
Dim Cuenta As String = ""
Dim IdCuenta As Integer = 0
Dim CodigoCuenta As String = ""
diff --git a/Bancos/RepComplementoPago.aspx.vb b/Bancos/RepComplementoPago.aspx.vb
index 3f96cf6d8..77615c98a 100644
--- a/Bancos/RepComplementoPago.aspx.vb
+++ b/Bancos/RepComplementoPago.aspx.vb
@@ -447,7 +447,7 @@ Partial Class Bancos_RepComplementoPago
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs)
' GvD.ExportToExcelG("ReporteComplementos", "Reporte Complementos", UsuarioActual)
- 'GvD.ExportToExcelx("ReporteComplementos.xlsx")
+ 'GvD.ExportToExcelX("ReporteComplementos.xlsx")
' GvD.ExportToExcel("ReporteComplementos.xlsx")
diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb
index d0fc990bf..411c89859 100644
--- a/Bancos/RepEgresosSinComprobante.aspx.vb
+++ b/Bancos/RepEgresosSinComprobante.aspx.vb
@@ -31,11 +31,11 @@ Partial Class Bancos_RepEgresosSinComprobante
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
- DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa, "Nombre")
+ DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre")
DdlUsuarioResponsable.DataBind()
If UsuarioActual.TienePermisoProceso(91) Then
- DdlUsuarioRegistro.DataSource = GlobalDTUsuarios.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa), "Nombre")
+ DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre")
DdlUsuarioRegistro.DataBind()
DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1"))
Else
diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb
index 7e53e652a..f0720faa8 100644
--- a/Bancos/RepProgramarRecursos.aspx.vb
+++ b/Bancos/RepProgramarRecursos.aspx.vb
@@ -109,9 +109,9 @@ Partial Class Bancos_RepProgramarRecursos
DdlProveedores.ddl.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.ddl.DataBind()
DdlProveedores.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
- End If
-
- DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
+ End If
+
+ DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa)
DdlUsuarioResponsable.DataBind()
DdlProveedoresClasificaciones.DataSource = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa)
@@ -644,14 +644,14 @@ Partial Class Bancos_RepProgramarRecursos
CargaUsuariosProgramaron()
UPPFiltros.Update()
- Dim ObjUsuarios As New ClsSisUsuarios
- If ObjUsuarios.GetUsuariosEmpresas(-1) Then
- Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
- Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0")
- Else
- Application("GlobalDTUsuarios") = Nothing
- End If
- ObjUsuarios.Dispose()
+ 'Dim ObjUsuarios As New ClsSisUsuarios
+ 'If ObjUsuarios.GetUsuariosEmpresas(-1, -1) Then
+ ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
+ ' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0")
+ 'Else
+ ' Application("GlobalDTUsuarios") = Nothing
+ 'End If
+ 'ObjUsuarios.Dispose()
End Sub
Private Sub EnviaCorreoNotificacion()
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
diff --git a/Bancos/RepProveedoresPagos.aspx.vb b/Bancos/RepProveedoresPagos.aspx.vb
index 14f731d5c..b4494650f 100644
--- a/Bancos/RepProveedoresPagos.aspx.vb
+++ b/Bancos/RepProveedoresPagos.aspx.vb
@@ -42,7 +42,7 @@ Partial Class Bancos_RepProveedoresPagos
DdlProveedores.SelectedValue = "-1"
- DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa), "Nombre")
+ DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre")
DdlUsuarioResponsable.DataBind()
DdlProveedoresClasificaciones.DataSource = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa)
diff --git a/Bancos/Temporal/RepVotos.aspx.vb b/Bancos/Temporal/RepVotos.aspx.vb
index c009dd186..fb81fce91 100644
--- a/Bancos/Temporal/RepVotos.aspx.vb
+++ b/Bancos/Temporal/RepVotos.aspx.vb
@@ -97,11 +97,11 @@ Partial Class Temporal_RepVotos
End Sub
Private Sub ImgExcelHombres_Click(sender As Object, e As EventArgs) Handles ImgExcelHombres.Click
- GvMasculino.ExportToExcelx("Reporte de Hombres")
+ GvMasculino.ExportToExcelX("Reporte de Hombres")
End Sub
Private Sub ImgExcelMujeres_Click(sender As Object, e As EventArgs) Handles ImgExcelMujeres.Click
- GvFemenino.ExportToExcelx("Reporte de Mujeres")
+ GvFemenino.ExportToExcelX("Reporte de Mujeres")
End Sub
#End Region
diff --git a/CGame/CatCargosFijos.aspx.cs b/CGame/CatCargosFijos.aspx.cs
index 3c5b50256..c282f539e 100644
--- a/CGame/CatCargosFijos.aspx.cs
+++ b/CGame/CatCargosFijos.aspx.cs
@@ -54,7 +54,7 @@ public partial class CGame_CatCargosFijos : ClsPaginas
protected void LnkAgregarCargoFijo_Click(object sender, EventArgs e)
{
- this.RegistraScript("$('#ModalAgregarCargoFijo').modal();");
+ RegistraScript("$('#ModalAgregarCargoFijo').modal();");
LimpiaModal();
BtnAddCargoFijo.Text = "Agregar";
Modalidad = "A";
@@ -70,7 +70,7 @@ public partial class CGame_CatCargosFijos : ClsPaginas
ClsCGame ObjCGame = new ClsCGame();
if (ObjCGame.RemoveCargoFijo(CveCargoFijo))
{
- this.RegistraScript("$('#ModalAgregarCargoFijo').modal('hide');");
+ RegistraScript("$('#ModalAgregarCargoFijo').modal('hide');");
CargaCargosFijos();
Alert("Eliminado Correctamente.");
}
@@ -90,7 +90,7 @@ public partial class CGame_CatCargosFijos : ClsPaginas
DdlMoneda.SelectedValueExist(gvRow.DataKey("CveMoneda"));
ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus"));
CambioTipo();
- this.RegistraScript("$('#ModalAgregarCargoFijo').modal();");
+ RegistraScript("$('#ModalAgregarCargoFijo').modal();");
DivEstatus.Visible = true;
BtnAddCargoFijo.Text = "Actualizar";
UpModalCargoFijo.Update();
@@ -148,7 +148,7 @@ public partial class CGame_CatCargosFijos : ClsPaginas
}
if (!Error)
{
- this.RegistraScript("$('#ModalAgregarCargoFijo').modal('hide');");
+ RegistraScript("$('#ModalAgregarCargoFijo').modal('hide');");
CargaCargosFijos();
if (Modalidad=="A") { Alert("Agregado Correctamente."); } else if (Modalidad == "U") { Alert("Actualizado Correctamente."); }
}
diff --git a/CGame/CatConceptoGastoCorte.aspx.cs b/CGame/CatConceptoGastoCorte.aspx.cs
index 2cc6a8976..374eb4602 100644
--- a/CGame/CatConceptoGastoCorte.aspx.cs
+++ b/CGame/CatConceptoGastoCorte.aspx.cs
@@ -28,7 +28,7 @@ public partial class CGame_CatConceptoGastoCorte : ClsPaginas
protected void LnkAgregarConcepto_Click(object sender, EventArgs e)
{
- this.RegistraScript("$('#DModalConcepto').modal();");
LimpiaConcepto();
BtnConceptoAdd.Visible = true;
BtnConceptoEdit.Visible = false;
+ RegistraScript("$('#DModalConcepto').modal();");
LimpiaConcepto();
BtnConceptoAdd.Visible = true;
BtnConceptoEdit.Visible = false;
DivEstatus.Visible = false;
UpModal.Update();
}
@@ -58,16 +58,16 @@ public partial class CGame_CatConceptoGastoCorte : ClsPaginas
protected void LnkEditar_Click(object sender, EventArgs e)
{
LimpiaConcepto();
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
- CveConceptoGastoCorte = gvRow.DataKey("CveConceptoGastoCorte").ToEntero();
TxtConcepto.Text = gvRow.DataKey("ConceptoGastoCorte");
ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus"));
this.RegistraScript("$('#DModalConcepto').modal();");
BtnConceptoAdd.Visible = false;
BtnConceptoEdit.Visible = true;
DivEstatus.Visible = true;
UpModal.Update();
+ CveConceptoGastoCorte = gvRow.DataKey("CveConceptoGastoCorte").ToEntero();
TxtConcepto.Text = gvRow.DataKey("ConceptoGastoCorte");
ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus"));
RegistraScript("$('#DModalConcepto').modal();");
BtnConceptoAdd.Visible = false;
BtnConceptoEdit.Visible = true;
DivEstatus.Visible = true;
UpModal.Update();
}
protected void BtnConceptoAdd_Click(object sender, EventArgs e)
{
- ClsCGame ObjCgame = new ClsCGame();
bool Continuar = ObjCgame.AddConceptoGastoCorte(TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCgame.Dispose();
if (Continuar)
{
this.RegistraScript("$('#DModalConcepto').modal('hide');");
LimpiaConcepto();
UpModal.Update();
Alert("El cocnepto se ha agregado");
CargaConcepto();
}
+ ClsCGame ObjCgame = new ClsCGame();
bool Continuar = ObjCgame.AddConceptoGastoCorte(TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCgame.Dispose();
if (Continuar)
{
RegistraScript("$('#DModalConcepto').modal('hide');");
LimpiaConcepto();
UpModal.Update();
Alert("El cocnepto se ha agregado");
CargaConcepto();
}
}
protected void BtnConceptoEdit_Click(object sender, EventArgs e)
{
- ClsCGame ObjCGame = new ClsCGame();
bool Continuar = ObjCGame.UpdateConceptoGastoCorte(CveConceptoGastoCorte, TxtConcepto.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCGame.Dispose();
if (Continuar)
{
this.RegistraScript("$('#DModalConcepto').modal('hide');");
LimpiaConcepto();
UpModal.Update();
Alert("El concepto se ha actualizado");
CargaConcepto();
}
+ ClsCGame ObjCGame = new ClsCGame();
bool Continuar = ObjCGame.UpdateConceptoGastoCorte(CveConceptoGastoCorte, TxtConcepto.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCGame.Dispose();
if (Continuar)
{
RegistraScript("$('#DModalConcepto').modal('hide');");
LimpiaConcepto();
UpModal.Update();
Alert("El concepto se ha actualizado");
CargaConcepto();
}
}
}
\ No newline at end of file
diff --git a/CGame/CatHuerta.aspx.cs b/CGame/CatHuerta.aspx.cs
index 721d5e777..1a180f79d 100644
--- a/CGame/CatHuerta.aspx.cs
+++ b/CGame/CatHuerta.aspx.cs
@@ -8,13 +8,13 @@
DdlProveedor.DataSource = ObjProv.DtResultados;
DdlProveedor.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlProveedor.DataBind();
- }
ObjProv.Dispose();
}
protected void LimpiaHuerta()
{
TxtHuerhuerta.Text= "";
TxtImporte.Text = "";
TxtCostoXTonelada.Text = "";
DdlProveedor.SelectedIndex = 0;
DdlTipoCobro.SelectedIndex = 0;
UPModalHuer.Update();
}
protected void LnkEditarHuer_Click(object sender, EventArgs e)
{
LimpiaHuerta();
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
CveHuerta = gvRow.DataKey("CveHuerta").ToEntero();
TxtHuerhuerta.Text = gvRow.DataKey("Huerta");
TxtImporte.Text = gvRow.DataKey("Importe");
TxtCostoXTonelada.Text = gvRow.DataKey("CostoXTonelada");
DdlProveedor.SelectedValueExist(gvRow.DataKey("CveProveedor").ToEntero());
DdlTipoCobro.SelectedValueExist(gvRow.DataKey("TipoCobro").ToEntero());
ChkHuerestatus.Checked= Convert.ToBoolean(gvRow.DataKey("Estatus"));
this.RegistraScript("$('#DModalHuerta').modal();");
BtnHuerADD.Visible=false;
BtnHuerEdit.Visible=true;
DivEstatus.Visible = true;
UPModalHuer.Update();
}
protected void LnkAgregarHuer_Click(object sender, EventArgs e)
{
this.RegistraScript("$('#DModalHuerta').modal();");
LimpiaHuerta();
BtnHuerADD.Visible=true;
BtnHuerEdit.Visible=false;
DivEstatus.Visible = false;
UPModalHuer.Update();
}
protected void BtnHuerADD_Click(object sender, EventArgs e)
{
if (DdlProveedor.SelectedValue=="-1")
+ }
ObjProv.Dispose();
}
protected void LimpiaHuerta()
{
TxtHuerhuerta.Text= "";
TxtImporte.Text = "";
TxtCostoXTonelada.Text = "";
DdlProveedor.SelectedIndex = 0;
DdlTipoCobro.SelectedIndex = 0;
UPModalHuer.Update();
}
protected void LnkEditarHuer_Click(object sender, EventArgs e)
{
LimpiaHuerta();
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
CveHuerta = gvRow.DataKey("CveHuerta").ToEntero();
TxtHuerhuerta.Text = gvRow.DataKey("Huerta");
TxtImporte.Text = gvRow.DataKey("Importe");
TxtCostoXTonelada.Text = gvRow.DataKey("CostoXTonelada");
DdlProveedor.SelectedValueExist(gvRow.DataKey("CveProveedor").ToEntero());
DdlTipoCobro.SelectedValueExist(gvRow.DataKey("TipoCobro").ToEntero());
ChkHuerestatus.Checked= Convert.ToBoolean(gvRow.DataKey("Estatus"));
RegistraScript("$('#DModalHuerta').modal();");
BtnHuerADD.Visible=false;
BtnHuerEdit.Visible=true;
DivEstatus.Visible = true;
UPModalHuer.Update();
}
protected void LnkAgregarHuer_Click(object sender, EventArgs e)
{
RegistraScript("$('#DModalHuerta').modal();");
LimpiaHuerta();
BtnHuerADD.Visible=true;
BtnHuerEdit.Visible=false;
DivEstatus.Visible = false;
UPModalHuer.Update();
}
protected void BtnHuerADD_Click(object sender, EventArgs e)
{
if (DdlProveedor.SelectedValue=="-1")
{
Alert("Tiene que seleccionar un proveedor.");
return;
- }
ClsCGame ObjHuer =new ClsCGame();
bool Continuar = ObjHuer.AddHuerta(TxtHuerhuerta.Text, DdlProveedor.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,DdlTipoCobro.SelectedValue.ToEntero(),TxtImporte.Text.ToDouble(), TxtCostoXTonelada.Text.ToDouble());
ObjHuer.Dispose();
if(Continuar)
{
this.RegistraScript("$('#DModalHuerta').modal('hide');");
LimpiaHuerta();
UPModalHuer.Update();
Alert("La Huerta se ha agregado");
- CargaHuerta();
}
}
protected void BtnHuerEdit_Click(object sender, EventArgs e)
{
ClsCGame ObjHuer =new ClsCGame();
bool Continuar = ObjHuer.UpdateHuerta(CveHuerta, TxtHuerhuerta.Text, DdlProveedor.SelectedValue.ToEntero(), ChkHuerestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTipoCobro.SelectedValue.ToEntero(), TxtImporte.Text.ToDouble(), TxtCostoXTonelada.Text.ToDouble());
ObjHuer.Dispose();
if(Continuar)
{
this.RegistraScript("$('#DModalHuerta').modal('hide');");
LimpiaHuerta();
UPModalHuer.Update();
Alert("La Huerta se ha actualizado");
CargaHuerta();
}
}
protected void LnkEliminarHuer_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
ClsCGame ObjHuer = new ClsCGame();
bool Continuar = ObjHuer.RemoveHuerta(gvRow.DataKey("CveHuerta").ToEntero());
ObjHuer.Dispose();
if(Continuar)
{
CargaHuerta();
Alert("La Huerta se ha eliminado");
}
}
+ }
ClsCGame ObjHuer =new ClsCGame();
bool Continuar = ObjHuer.AddHuerta(TxtHuerhuerta.Text, DdlProveedor.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,DdlTipoCobro.SelectedValue.ToEntero(),TxtImporte.Text.ToDouble(), TxtCostoXTonelada.Text.ToDouble());
ObjHuer.Dispose();
if(Continuar)
{
RegistraScript("$('#DModalHuerta').modal('hide');");
LimpiaHuerta();
UPModalHuer.Update();
Alert("La Huerta se ha agregado");
+ CargaHuerta();
}
}
protected void BtnHuerEdit_Click(object sender, EventArgs e)
{
ClsCGame ObjHuer =new ClsCGame();
bool Continuar = ObjHuer.UpdateHuerta(CveHuerta, TxtHuerhuerta.Text, DdlProveedor.SelectedValue.ToEntero(), ChkHuerestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTipoCobro.SelectedValue.ToEntero(), TxtImporte.Text.ToDouble(), TxtCostoXTonelada.Text.ToDouble());
ObjHuer.Dispose();
if(Continuar)
{
RegistraScript("$('#DModalHuerta').modal('hide');");
LimpiaHuerta();
UPModalHuer.Update();
Alert("La Huerta se ha actualizado");
CargaHuerta();
}
}
protected void LnkEliminarHuer_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
ClsCGame ObjHuer = new ClsCGame();
bool Continuar = ObjHuer.RemoveHuerta(gvRow.DataKey("CveHuerta").ToEntero());
ObjHuer.Dispose();
if(Continuar)
{
CargaHuerta();
Alert("La Huerta se ha eliminado");
}
}
protected void GvHuerta_RowDataBound(object sender, GridViewRowEventArgs e)
{
diff --git a/CGame/CatMotivosMerma.aspx.cs b/CGame/CatMotivosMerma.aspx.cs
index 8e41e4b86..a370b4f6e 100644
--- a/CGame/CatMotivosMerma.aspx.cs
+++ b/CGame/CatMotivosMerma.aspx.cs
@@ -3,8 +3,8 @@
GVMotivosMerma.DataSource = ObjMoti.DtResultados;
GVMotivosMerma.DataBind();
}
- ObjMoti.Dispose();
upDatosMoti.Update();
}
protected void LimpiaMotivosMerma()
{
TxtMotimotivo.Text= "";
UPModalMoti.Update();
}
protected void LnkEditarMoti_Click(object sender, EventArgs e)
{
LimpiaMotivosMerma();
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
CveMotivo = gvRow.DataKey("CveMotivo").ToEntero();
TxtMotimotivo.Text= gvRow.DataKey("Motivo");
ChkMotiestatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus"));
this.RegistraScript("$('#DModalMotivosMerma').modal();");
BtnMotiADD.Visible=false;
BtnMotiEdit.Visible=true;
DivEstatus.Visible = true;
UPModalMoti.Update();
}
protected void LnkAgregarMoti_Click(object sender, EventArgs e)
{
this.RegistraScript("$('#DModalMotivosMerma').modal();");
LimpiaMotivosMerma();
BtnMotiADD.Visible=true;
BtnMotiEdit.Visible=false;
- DivEstatus.Visible = false;
UPModalMoti.Update();
}
protected void BtnMotiADD_Click(object sender, EventArgs e)
{
ClsCGame ObjMoti =new ClsCGame();
bool Continuar = ObjMoti.AddMotivoMerma(TxtMotimotivo.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjMoti.Dispose();
if(Continuar)
{
this.RegistraScript("$('#DModalMotivosMerma').modal('hide');");
LimpiaMotivosMerma();
UPModalMoti.Update();
Alert("El Motivo de Merma se ha agregado");
CargaMotivosMerma();
}
}
protected void BtnMotiEdit_Click(object sender, EventArgs e)
{
ClsCGame ObjMoti =new ClsCGame();
bool Continuar = ObjMoti.UpdateMotivoMerma(CveMotivo, TxtMotimotivo.Text, ChkMotiestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjMoti.Dispose();
if(Continuar)
{
this.RegistraScript("$('#DModalMotivosMerma').modal('hide');");
LimpiaMotivosMerma();
UPModalMoti.Update();
Alert("El Motivo de Merma se ha actualizado");
CargaMotivosMerma();
}
}
protected void LnkEliminarMoti_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
ClsCGame ObjMoti = new ClsCGame();
bool Continuar = ObjMoti.RemoveMotivoMerma(gvRow.DataKey("CveMotivo").ToEntero());
ObjMoti.Dispose();
if(Continuar)
{
CargaMotivosMerma();
Alert("El Motivo de Merma se ha eliminado");
}
}
+ ObjMoti.Dispose();
upDatosMoti.Update();
}
protected void LimpiaMotivosMerma()
{
TxtMotimotivo.Text= "";
UPModalMoti.Update();
}
protected void LnkEditarMoti_Click(object sender, EventArgs e)
{
LimpiaMotivosMerma();
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
CveMotivo = gvRow.DataKey("CveMotivo").ToEntero();
TxtMotimotivo.Text= gvRow.DataKey("Motivo");
ChkMotiestatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus"));
RegistraScript("$('#DModalMotivosMerma').modal();");
BtnMotiADD.Visible=false;
BtnMotiEdit.Visible=true;
DivEstatus.Visible = true;
UPModalMoti.Update();
}
protected void LnkAgregarMoti_Click(object sender, EventArgs e)
{
RegistraScript("$('#DModalMotivosMerma').modal();");
LimpiaMotivosMerma();
BtnMotiADD.Visible=true;
BtnMotiEdit.Visible=false;
+ DivEstatus.Visible = false;
UPModalMoti.Update();
}
protected void BtnMotiADD_Click(object sender, EventArgs e)
{
ClsCGame ObjMoti =new ClsCGame();
bool Continuar = ObjMoti.AddMotivoMerma(TxtMotimotivo.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjMoti.Dispose();
if(Continuar)
{
RegistraScript("$('#DModalMotivosMerma').modal('hide');");
LimpiaMotivosMerma();
UPModalMoti.Update();
Alert("El Motivo de Merma se ha agregado");
CargaMotivosMerma();
}
}
protected void BtnMotiEdit_Click(object sender, EventArgs e)
{
ClsCGame ObjMoti =new ClsCGame();
bool Continuar = ObjMoti.UpdateMotivoMerma(CveMotivo, TxtMotimotivo.Text, ChkMotiestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjMoti.Dispose();
if(Continuar)
{
RegistraScript("$('#DModalMotivosMerma').modal('hide');");
LimpiaMotivosMerma();
UPModalMoti.Update();
Alert("El Motivo de Merma se ha actualizado");
CargaMotivosMerma();
}
}
protected void LnkEliminarMoti_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
ClsCGame ObjMoti = new ClsCGame();
bool Continuar = ObjMoti.RemoveMotivoMerma(gvRow.DataKey("CveMotivo").ToEntero());
ObjMoti.Dispose();
if(Continuar)
{
CargaMotivosMerma();
Alert("El Motivo de Merma se ha eliminado");
}
}
protected void GvMotivoMerma_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
diff --git a/CGame/CatProductos.aspx.cs b/CGame/CatProductos.aspx.cs
index 07e1af4bb..b2f9c8cd6 100644
--- a/CGame/CatProductos.aspx.cs
+++ b/CGame/CatProductos.aspx.cs
@@ -48,7 +48,7 @@ public partial class CATProductos : ClsPaginas
CvePS = gvRow.DataKey("CvePS").ToEntero();
TxtProdpS.Text = gvRow.DataKey("PS");
ChkProdestatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus"));
- this.RegistraScript("$('#DModalProductos').modal();");
+ RegistraScript("$('#DModalProductos').modal();");
BtnProdADD.Visible = false;
BtnProdEdit.Visible = true;
DivEstatus.Visible = true;
@@ -56,7 +56,7 @@ public partial class CATProductos : ClsPaginas
}
protected void LnkAgregarProd_Click(object sender, EventArgs e)
{
- this.RegistraScript("$('#DModalProductos').modal();");
+ RegistraScript("$('#DModalProductos').modal();");
LimpiaProductos();
BtnProdADD.Visible=true;
BtnProdEdit.Visible=false;
@@ -71,7 +71,7 @@ public partial class CATProductos : ClsPaginas
ObjCGame.Dispose();
if (Continuar)
{
- this.RegistraScript("$('#DModalProductos').modal('hide');");
+ RegistraScript("$('#DModalProductos').modal('hide');");
LimpiaProductos();
UPModalProd.Update();
Alert("El Producto se ha agregado");
@@ -86,7 +86,7 @@ public partial class CATProductos : ClsPaginas
ObjCGame.Dispose();
if (Continuar)
{
- this.RegistraScript("$('#DModalProductos').modal('hide');");
+ RegistraScript("$('#DModalProductos').modal('hide');");
LimpiaProductos();
UPModalProd.Update();
Alert("El Producto se ha actualizado");
diff --git a/CGame/CatScat.aspx.cs b/CGame/CatScat.aspx.cs
index 930f9a37f..c78f4e94e 100644
--- a/CGame/CatScat.aspx.cs
+++ b/CGame/CatScat.aspx.cs
@@ -26,7 +26,7 @@ private int CveScat
protected void LnkAgregarScat_Click(object sender, EventArgs e)
{
- this.RegistraScript("$('#DModalScat').modal();");
LimpiaScat();
BtnScatAdd.Visible = true;
BtnScatEdit.Visible = false;
+ RegistraScript("$('#DModalScat').modal();");
LimpiaScat();
BtnScatAdd.Visible = true;
BtnScatEdit.Visible = false;
DivEstatus.Visible = false;
UpModal.Update();
}
@@ -51,7 +51,7 @@ private int CveScat
protected void LnkEditar_Click(object sender, EventArgs e)
{
LimpiaScat();
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
- CveScat = gvRow.DataKey("CveScat").ToEntero();
TxtScat.Text = gvRow.DataKey("Scat");
ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus"));
this.RegistraScript("$('#DModalScat').modal();");
BtnScatAdd.Visible = false;
BtnScatEdit.Visible = true;
DivEstatus.Visible = true;
UpModal.Update();
+ CveScat = gvRow.DataKey("CveScat").ToEntero();
TxtScat.Text = gvRow.DataKey("Scat");
ChkEstatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus"));
RegistraScript("$('#DModalScat').modal();");
BtnScatAdd.Visible = false;
BtnScatEdit.Visible = true;
DivEstatus.Visible = true;
UpModal.Update();
}
protected void imgD_Click(object sender, EventArgs e)
@@ -61,11 +61,11 @@ private int CveScat
protected void BtnScatAdd_Click(object sender, EventArgs e)
{
- ClsCGame ObjCgame = new ClsCGame();
bool Continuar = ObjCgame.AddScat(TxtScat.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCgame.Dispose();
if (Continuar)
{
this.RegistraScript("$('#DModalScat').modal('hide');");
LimpiaScat();
UpModal.Update();
Alert("El Scat se ha agregado");
CargaScat();
}
+ ClsCGame ObjCgame = new ClsCGame();
bool Continuar = ObjCgame.AddScat(TxtScat.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCgame.Dispose();
if (Continuar)
{
RegistraScript("$('#DModalScat').modal('hide');");
LimpiaScat();
UpModal.Update();
Alert("El Scat se ha agregado");
CargaScat();
}
}
protected void BtnScatEdit_Click(object sender, EventArgs e)
{
- ClsCGame ObjCGame = new ClsCGame();
bool Continuar = ObjCGame.UpdateScat(CveScat, TxtScat.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCGame.Dispose();
if (Continuar)
{
this.RegistraScript("$('#DModalScat').modal('hide');");
LimpiaScat();
UpModal.Update();
Alert("El Scat se ha actualizado");
CargaScat();
}
+ ClsCGame ObjCGame = new ClsCGame();
bool Continuar = ObjCGame.UpdateScat(CveScat, TxtScat.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCGame.Dispose();
if (Continuar)
{
RegistraScript("$('#DModalScat').modal('hide');");
LimpiaScat();
UpModal.Update();
Alert("El Scat se ha actualizado");
CargaScat();
}
}
}
\ No newline at end of file
diff --git a/CGame/CatTipoProducto.aspx.cs b/CGame/CatTipoProducto.aspx.cs
index 93c295089..44ce45243 100644
--- a/CGame/CatTipoProducto.aspx.cs
+++ b/CGame/CatTipoProducto.aspx.cs
@@ -7,13 +7,13 @@
}
ObjCGame.Dispose();
upDatosTipo.Update();
}
protected void LimpiaTipoProducto()
{
TxtTipotipoProducto.Text= "";
UPModalTipo.Update();
}
protected void LnkEditarTipo_Click(object sender, EventArgs e)
{
LimpiaTipoProducto();
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
- CveTipoProducto = gvRow.DataKey("CveTipoProducto").ToEntero();
TxtTipotipoProducto.Text = gvRow.DataKey("TipoProducto");
ChkTipoestatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus"));
this.RegistraScript("$('#DModalTipoProducto').modal();");
BtnTipoADD.Visible = false;
BtnTipoEdit.Visible = true;
DivEstatus.Visible = true;
UPModalTipo.Update();
}
protected void LnkAgregarTipo_Click(object sender, EventArgs e)
{
this.RegistraScript("$('#DModalTipoProducto').modal();");
LimpiaTipoProducto();
BtnTipoADD.Visible=true;
BtnTipoEdit.Visible=false;
+ CveTipoProducto = gvRow.DataKey("CveTipoProducto").ToEntero();
TxtTipotipoProducto.Text = gvRow.DataKey("TipoProducto");
ChkTipoestatus.Checked = Convert.ToBoolean(gvRow.DataKey("Estatus"));
RegistraScript("$('#DModalTipoProducto').modal();");
BtnTipoADD.Visible = false;
BtnTipoEdit.Visible = true;
DivEstatus.Visible = true;
UPModalTipo.Update();
}
protected void LnkAgregarTipo_Click(object sender, EventArgs e)
{
RegistraScript("$('#DModalTipoProducto').modal();");
LimpiaTipoProducto();
BtnTipoADD.Visible=true;
BtnTipoEdit.Visible=false;
DivEstatus.Visible = false;
UPModalTipo.Update();
}
protected void BtnTipoADD_Click(object sender, EventArgs e)
{
- ClsCGame ObjCGame = new ClsCGame();
bool Continuar = ObjCGame.AddTipoProducto(TxtTipotipoProducto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCGame.Dispose();
if (Continuar)
{
this.RegistraScript("$('#DModalTipoProducto').modal('hide');");
LimpiaTipoProducto();
UPModalTipo.Update();
Alert("El Tipo de producto se ha agregado");
CargaTipoProducto();
}
}
protected void BtnTipoEdit_Click(object sender, EventArgs e)
{
+ ClsCGame ObjCGame = new ClsCGame();
bool Continuar = ObjCGame.AddTipoProducto(TxtTipotipoProducto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCGame.Dispose();
if (Continuar)
{
RegistraScript("$('#DModalTipoProducto').modal('hide');");
LimpiaTipoProducto();
UPModalTipo.Update();
Alert("El Tipo de producto se ha agregado");
CargaTipoProducto();
}
}
protected void BtnTipoEdit_Click(object sender, EventArgs e)
{
- ClsCGame ObjCGame = new ClsCGame();
bool Continuar = ObjCGame.UpdateTipoProducto(CveTipoProducto, TxtTipotipoProducto.Text, ChkTipoestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCGame.Dispose();
if (Continuar)
{
this.RegistraScript("$('#DModalTipoProducto').modal('hide');");
LimpiaTipoProducto();
UPModalTipo.Update();
Alert("El Tipo de producto se ha actualizado");
CargaTipoProducto();
}
}
protected void LnkEliminarTipo_Click(object sender, EventArgs e)
{
+ ClsCGame ObjCGame = new ClsCGame();
bool Continuar = ObjCGame.UpdateTipoProducto(CveTipoProducto, TxtTipotipoProducto.Text, ChkTipoestatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjCGame.Dispose();
if (Continuar)
{
RegistraScript("$('#DModalTipoProducto').modal('hide');");
LimpiaTipoProducto();
UPModalTipo.Update();
Alert("El Tipo de producto se ha actualizado");
CargaTipoProducto();
}
}
protected void LnkEliminarTipo_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
ClsCGame ObjCGame = new ClsCGame();
bool Continuar = ObjCGame.RemovePS(gvRow.DataKey("CveTipoProducto").ToEntero());
ObjCGame.Dispose();
if (Continuar)
{
CargaTipoProducto();
Alert("El Tipo de producto se ha eliminado");
}
}
protected void GVTipoProducto_RowDataBound(object sender, GridViewRowEventArgs e)
{
diff --git a/CGame/Empaque.aspx.cs b/CGame/Empaque.aspx.cs
index 38f0b7e1e..de1fa8c1b 100644
--- a/CGame/Empaque.aspx.cs
+++ b/CGame/Empaque.aspx.cs
@@ -819,12 +819,12 @@ public partial class Empaque : ClsPaginas
CargaGvResultado();
UpModalAdd.Update();
UpResultado.Update();
- this.RegistraScript("$('#DivResultado').modal();");
+ RegistraScript("$('#DivResultado').modal();");
}
protected void LnkAgregarResultado_Click(object sender, EventArgs e)
{
Modalidad = "A";
- this.RegistraScript("$('#DivResultado').modal();");
+ RegistraScript("$('#DivResultado').modal();");
LimpiaModal();
BtnOPADD.Text = "Agregar";
CargaGvResultado();
@@ -904,7 +904,7 @@ public partial class Empaque : ClsPaginas
ChkTipoEtiqueta.Checked, DdlCalidad.SelectedValue.ToEntero(), DdlTipoCaja.SelectedValue.ToEntero(), TxtPeso.Text.ToDouble(),
DdlPS.SelectedItem.Text, DdlTamaño.SelectedItem.Text, DdlCalidad.SelectedItem.Text, DdlTipoCaja.SelectedItem.Text, DdlTipoEmpaque.SelectedItem.Text, DdlTipoEmpaque.SelectedValue.ToEntero(), DdlTipoMaduracion.SelectedValue.ToEntero(), DdlTipoProducto.SelectedValue.ToEntero(), DdlTipoMaduracion.SelectedItem.Text, DdlTipoProducto.SelectedItem.Text);
}
- this.RegistraScript("$('#DivResultado').modal('hide');");
+ RegistraScript("$('#DivResultado').modal('hide');");
GvResultado.DataSource = DtResultado;
GvResultado.DataBind();
UpResultado.Update();
diff --git a/CGame/EntradaMateriaPrima.aspx.cs b/CGame/EntradaMateriaPrima.aspx.cs
index c71986c8d..54d0fb485 100644
--- a/CGame/EntradaMateriaPrima.aspx.cs
+++ b/CGame/EntradaMateriaPrima.aspx.cs
@@ -156,11 +156,11 @@ public partial class CATCorte : ClsPaginas
{
CargaOrdenCorte(gvRow.DataKey("CveOrdenCorte").ToEntero());
DdlOrdenCorte.SelectedValueExist(gvRow.DataKey("CveOrdenCorte").ToEntero());
TxtFecha.Text = gvRow.DataKey("Fecha");
TxtPeso.Text = gvRow.DataKey("Peso");
TxtObservacion.Text = gvRow.DataKey("Observacion");
TxtTicketBascula.Text = gvRow.DataKey("TicketBascula");
Adjunto = gvRow.DataKey("Adjunto");
- TxtPesoMerma.Text = gvRow.DataKey("PesoMerma");
TxtModalAdjuntoArchivo.Text = "";
DdlMotivo.SelectedValueExist(gvRow.DataKey("CveMotivo").ToEntero());
CargaFletes(gvRow.DataKey("CveFlete").ToEntero());
DdlFlete.SelectedValueExist(gvRow.DataKey("CveFlete").ToEntero());
DdlEmpaque.SelectedValueExist(gvRow.DataKey("CveEmpaque").ToEntero());
if (gvRow.DataKey("Adjunto").ToString() != "") { LnkDescargar.Visible = true; }
this.RegistraScript("$('#DModalCorte').modal();");
BtnCortADD.Visible = false;
BtnCortEdit.Visible = true;
UPModalCort.Update();
}
protected void LnkAgregarCort_Click(object sender, EventArgs e)
{
Agregar();
}
+ TxtPesoMerma.Text = gvRow.DataKey("PesoMerma");
TxtModalAdjuntoArchivo.Text = "";
DdlMotivo.SelectedValueExist(gvRow.DataKey("CveMotivo").ToEntero());
CargaFletes(gvRow.DataKey("CveFlete").ToEntero());
DdlFlete.SelectedValueExist(gvRow.DataKey("CveFlete").ToEntero());
DdlEmpaque.SelectedValueExist(gvRow.DataKey("CveEmpaque").ToEntero());
if (gvRow.DataKey("Adjunto").ToString() != "") { LnkDescargar.Visible = true; }
RegistraScript("$('#DModalCorte').modal();");
BtnCortADD.Visible = false;
BtnCortEdit.Visible = true;
UPModalCort.Update();
}
protected void LnkAgregarCort_Click(object sender, EventArgs e)
{
Agregar();
}
protected void Agregar()
{
- this.RegistraScript("$('#DModalCorte').modal();");
LimpiaCorte();
+ RegistraScript("$('#DModalCorte').modal();");
LimpiaCorte();
if (CveOrdenCorte > 0) { DdlOrdenCorte.SelectedValueExist(CveOrdenCorte); }
BtnCortADD.Visible = true;
BtnCortEdit.Visible = false;
LnkDescargar.Visible = false;
@@ -168,7 +168,7 @@ public partial class CATCorte : ClsPaginas
{
}
protected void LnkAgregarBitacora_Click(object sender, EventArgs e)
{
- this.RegistraScript("$('#DModalBitacora').modal();");
+ RegistraScript("$('#DModalBitacora').modal();");
TxtComentario.Text = "";
UpModalBitacora.Update();
}
protected void BtnCortADD_Click(object sender, EventArgs e)
{
@@ -192,7 +192,7 @@ public partial class CATCorte : ClsPaginas
{
{
GuardarAdjunto();
}
- this.RegistraScript("$('#DModalCorte').modal('hide');");
+ RegistraScript("$('#DModalCorte').modal('hide');");
if (CveOrdenCorte > 0)
{
Alert("La entrada de materia prima se ha agregado correctamente", TipoMensaje.MsgInformacion, $"document.location.href=\"/CGame/RepOrdenCorteDetalle.aspx?CveOrdenCorte={CveOrdenCorte}\"");
@@ -228,7 +228,7 @@ public partial class CATCorte : ClsPaginas
{
{
GuardarAdjunto();
}
- this.RegistraScript("$('#DModalCorte').modal('hide');");
+ RegistraScript("$('#DModalCorte').modal('hide');");
CargaCorte();
Alert("La entrada de materia prima se ha actualizado correctamente");
}
@@ -276,7 +276,7 @@ public partial class CATCorte : ClsPaginas
{
Alert("La bitacora fue agregada correctamente");
}
ObjCGame.Dispose();
- this.RegistraScript("$('#DModalBitacora').modal('hide');");
+ RegistraScript("$('#DModalBitacora').modal('hide');");
CargaBitacora();
}
diff --git a/CGame/Fletes.aspx.cs b/CGame/Fletes.aspx.cs
index e412033b0..12d1cad18 100644
--- a/CGame/Fletes.aspx.cs
+++ b/CGame/Fletes.aspx.cs
@@ -393,7 +393,7 @@ public partial class CGame_Fletes : ClsPaginas
if (gvRow.DataKey("Adjunto").ToString() != "-1") { LnkDescargar.Visible = true; }
Modalidad = "U";
BtnAddFlete.Text = "Actualizar";
- this.RegistraScript("$('#DModalFlete').modal();","asd");
+ RegistraScript("$('#DModalFlete').modal();","asd");
UpModalFleteAdd.Update();
}
@@ -409,7 +409,7 @@ public partial class CGame_Fletes : ClsPaginas
BtnAddFlete.Text = "Agregar";
if (CveOrdenCorteOpcion > 0) { DdlOrdenCorte.SelectedValueExist(CveOrdenCorteOpcion); CargaFleteHuertaEmpaque(); DdlTipo.SelectedValue = "1"; }
if (CveOrdenProduccionOpcion > 0) { DdlOrdenProduccion.SelectedValueExist(CveOrdenProduccionOpcion); DdlTipo.SelectedValue = "2"; }
- this.RegistraScript("$('#DModalFlete').modal();");
+ RegistraScript("$('#DModalFlete').modal();");
UpModalFleteAdd.Update();
}
protected void BtnAddFlete_Click(object sender, EventArgs e)
@@ -465,7 +465,7 @@ public partial class CGame_Fletes : ClsPaginas
{
_CveFlete = ObjCGame.CveFlete;
GuardarAdjunto();
- this.RegistraScript("$('#DModalFlete').modal('hide');");
+ RegistraScript("$('#DModalFlete').modal('hide');");
}
else
{
@@ -538,7 +538,7 @@ public partial class CGame_Fletes : ClsPaginas
_CveFlete = CveFlete;
Alert("El Flete fue actualizado correctamente");
GuardarAdjunto();
- this.RegistraScript("$('#DModalFlete').modal('hide');");
+ RegistraScript("$('#DModalFlete').modal('hide');");
}
else
{
@@ -917,7 +917,7 @@ public partial class CGame_Fletes : ClsPaginas
{
try
{
- //GvFlete.ExportToExcelx("Fletes");
+ //GvFlete.ExportToExcelX("Fletes");
ExportToExcelG(GvFlete,"Fletes", "Fletes", UsuarioActual);
}
catch (Exception ex)
diff --git a/CGame/GenerarOrdenCorte.aspx.cs b/CGame/GenerarOrdenCorte.aspx.cs
index c7eb97a4b..52917b5e7 100644
--- a/CGame/GenerarOrdenCorte.aspx.cs
+++ b/CGame/GenerarOrdenCorte.aspx.cs
@@ -137,8 +137,8 @@ public partial class CGame_GenerarOrdenCorte : ClsPaginas
}
if (SiSelecciono || RblTipoOC.SelectedValue.ToEntero()==2)
{
- this.RegistraScript("recorreGrilla();", "recorre");
- this.RegistraScript("$('#DivModalOC').modal();");
+ RegistraScript("recorreGrilla();", "recorre");
+ RegistraScript("$('#DivModalOC').modal();");
LimpiaModal();
UpAccion.Update();
}
@@ -187,9 +187,9 @@ public partial class CGame_GenerarOrdenCorte : ClsPaginas
ObjCGame.Commit();
EnviarCorreo(CveOrdenCorte);
Alert("Se genero la orden de corte correctamente con el folio " + Folio + ".", TipoMensaje.MsgInformacion);
- this.RegistraScript("$('#DivModalOC').modal('hide');");
+ RegistraScript("$('#DivModalOC').modal('hide');");
CargaOrdenProduccionDetalle();
- this.RegistraScript("recorreGrilla();", "recorre");
+ RegistraScript("recorreGrilla();", "recorre");
}
else
{
@@ -276,7 +276,7 @@ public partial class CGame_GenerarOrdenCorte : ClsPaginas
GvRow.FCCheckBox("ChkOC").Checked = true;
}
}
- this.RegistraScript("recorreGrilla();");
+ RegistraScript("recorreGrilla();");
}
diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs
index 7606eebda..53d1ec98b 100644
--- a/CRM/Acercamiento.aspx.cs
+++ b/CRM/Acercamiento.aspx.cs
@@ -1046,7 +1046,7 @@ public partial class CRM_Acercamiento : ClsPaginas
BtnRegistrarCierreCancelacion.Text = "Actualizar";
}
- this.RegistraScript("$('#ModalCierreMotivoRechazo').modal();");
+ RegistraScript("$('#ModalCierreMotivoRechazo').modal();");
UpCierreMotivoRechazo.Update();
}
protected void EliminarFile(object sender, EventArgs e)
@@ -1103,7 +1103,7 @@ public partial class CRM_Acercamiento : ClsPaginas
CargaDatos();
CargaEtapasBitacora();
- this.RegistraScript("$('#ModalCierreMotivoRechazo').modal('hide');");
+ RegistraScript("$('#ModalCierreMotivoRechazo').modal('hide');");
}
#endregion
@@ -1726,7 +1726,7 @@ public partial class CRM_Acercamiento : ClsPaginas
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
string Lat = GvRow.DataKey("Lat");
string Long = GvRow.DataKey("Long");
- this.RegistraScript(String.Format("initMap(); CreaMarcador({0}, {1}, '{2}', '{3}'); $('#ModalVerUbicacion').modal();", Lat, Long, "0", "Info"));
+ RegistraScript(String.Format("initMap(); CreaMarcador({0}, {1}, '{2}', '{3}'); $('#ModalVerUbicacion').modal();", Lat, Long, "0", "Info"));
}
#endregion
diff --git a/CRM/CatEtapasProceso.aspx.cs b/CRM/CatEtapasProceso.aspx.cs
index 335d51abe..7c3eb5552 100644
--- a/CRM/CatEtapasProceso.aspx.cs
+++ b/CRM/CatEtapasProceso.aspx.cs
@@ -210,7 +210,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
UPModal.Update();
- this.RegistraScript("$('#DivModal').modal();");
+ RegistraScript("$('#DivModal').modal();");
}
protected void LnkEditar_Click(object sender, EventArgs e)
@@ -244,7 +244,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
UPModal.Update();
- this.RegistraScript("$('#DivModal').modal();");
+ RegistraScript("$('#DivModal').modal();");
}
private void bloquearEtapasAnteriores(int CveTipoEtapa)
@@ -323,7 +323,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
ObjCRM.Dispose();
limpiarCamposModal();
- this.RegistraScript("$('#DivModal').modal('hide');");
+ RegistraScript("$('#DivModal').modal('hide');");
CargaDatos(-1);
DdlFiltroProceso.SelectedValueExist("-1");
}
diff --git a/CRM/CatMediosCaptacion.aspx.cs b/CRM/CatMediosCaptacion.aspx.cs
index 42c14f659..98716e116 100644
--- a/CRM/CatMediosCaptacion.aspx.cs
+++ b/CRM/CatMediosCaptacion.aspx.cs
@@ -126,7 +126,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
limpiarCamposModal();
UPModal.Update();
- this.RegistraScript("$('#DivModal').modal();");
+ RegistraScript("$('#DivModal').modal();");
}
protected void GVDatos_RowDeleting(object sender, GridViewDeleteEventArgs e)
@@ -189,7 +189,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
DdlTipoProceso.SelectedValue = GvRow.DataKey("CveTipoProceso").ToString();
UPModal.Update();
- this.RegistraScript("$('#DivModal').modal();");
+ RegistraScript("$('#DivModal').modal();");
}
protected void BtnGuardar_Click(object sender, EventArgs e)
@@ -219,7 +219,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
ObjCRM.Dispose();
limpiarCamposModal();
- this.RegistraScript("$('#DivModal').modal('hide');");
+ RegistraScript("$('#DivModal').modal('hide');");
CargaDatos();
}
#endregion
diff --git a/CRM/CatProbabilidadAcercamiento.aspx.cs b/CRM/CatProbabilidadAcercamiento.aspx.cs
index 01a2b57b5..33bf7da58 100644
--- a/CRM/CatProbabilidadAcercamiento.aspx.cs
+++ b/CRM/CatProbabilidadAcercamiento.aspx.cs
@@ -129,7 +129,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
limpiarCamposModal();
UPModal.Update();
- this.RegistraScript("$('#DivModal').modal();");
+ RegistraScript("$('#DivModal').modal();");
}
protected void LnkEditar_Click(object sender, EventArgs e)
@@ -146,7 +146,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
DdlTipoProceso.SelectedValue = GvRow.DataKey("CveTipoProceso").ToString();
UPModal.Update();
- this.RegistraScript("$('#DivModal').modal();");
+ RegistraScript("$('#DivModal').modal();");
}
protected void BtnGuardar_Click(object sender, EventArgs e)
@@ -176,7 +176,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
ObjCRM.Dispose();
limpiarCamposModal();
- this.RegistraScript("$('#DivModal').modal('hide');");
+ RegistraScript("$('#DivModal').modal('hide');");
CargaDatos();
}
diff --git a/CRM/CatRechazoMotivo.aspx.cs b/CRM/CatRechazoMotivo.aspx.cs
index 230664a97..dd2ccae6f 100644
--- a/CRM/CatRechazoMotivo.aspx.cs
+++ b/CRM/CatRechazoMotivo.aspx.cs
@@ -127,7 +127,7 @@ public partial class CRM_CatRechazoMotivo : ClsPaginas
limpiarCamposModal();
UPModal.Update();
- this.RegistraScript("$('#DivModal').modal();");
+ RegistraScript("$('#DivModal').modal();");
}
protected void LnkEditar_Click(object sender, EventArgs e)
{
@@ -145,7 +145,7 @@ public partial class CRM_CatRechazoMotivo : ClsPaginas
UPModal.Update();
- this.RegistraScript("$('#DivModal').modal();");
+ RegistraScript("$('#DivModal').modal();");
}
protected void BtnGuardar_Click(object sender, EventArgs e)
@@ -176,7 +176,7 @@ public partial class CRM_CatRechazoMotivo : ClsPaginas
ObjCRM.Dispose();
limpiarCamposModal();
- this.RegistraScript("$('#DivModal').modal('hide');");
+ RegistraScript("$('#DivModal').modal('hide');");
CargaDatos();
}
diff --git a/CRM/CatTipoProceso.aspx.cs b/CRM/CatTipoProceso.aspx.cs
index 70f473b07..bc92beb33 100644
--- a/CRM/CatTipoProceso.aspx.cs
+++ b/CRM/CatTipoProceso.aspx.cs
@@ -206,7 +206,7 @@ public partial class CRM_CatTipoProceso : ClsPaginas
limpiarCamposModal();
UPModalTipoProceso.Update();
- this.RegistraScript("$('#DivModalTipoProceso').modal();");
+ RegistraScript("$('#DivModalTipoProceso').modal();");
}
protected void LnkEditar_Click(object sender, EventArgs e)
@@ -228,7 +228,7 @@ public partial class CRM_CatTipoProceso : ClsPaginas
UPModalTipoProceso.Update();
- this.RegistraScript("$('#DivModalTipoProceso').modal();");
+ RegistraScript("$('#DivModalTipoProceso').modal();");
}
protected void BtnGuardar_Click(object sender, EventArgs e)
@@ -260,7 +260,7 @@ public partial class CRM_CatTipoProceso : ClsPaginas
ObjCRM.Dispose();
limpiarCamposModal();
- this.RegistraScript("$('#DivModalTipoProceso').modal('hide');");
+ RegistraScript("$('#DivModalTipoProceso').modal('hide');");
CargaDatos();
}
diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs
index 5b7fb8098..3b5dcd835 100644
--- a/CRM/EmpresaCRM.aspx.cs
+++ b/CRM/EmpresaCRM.aspx.cs
@@ -1082,7 +1082,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
CargaGridTipoContacto();
CargaContactoSuperior(-1);
- this.RegistraScript("$('#DivModalContacto').modal();");
+ RegistraScript("$('#DivModalContacto').modal();");
}
protected void LnkEditarContacto_Click(object sender, EventArgs e)
@@ -1111,7 +1111,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
UPModalContacto.Update();
- this.RegistraScript("$('#DivModalContacto').modal();");
+ RegistraScript("$('#DivModalContacto').modal();");
}
protected void BtnGuardarContacto_Click(object sender, EventArgs e)
@@ -1235,7 +1235,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
}
limpiarCamposModalContato();
- this.RegistraScript("$('#DivModalContacto').modal('hide');");
+ RegistraScript("$('#DivModalContacto').modal('hide');");
UpContactos.Update();
}
@@ -1465,7 +1465,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
//protected void LnkAgregarEvento_Click(object sender, EventArgs e)
//{
- // this.RegistraScript(String.Format("AbrirVentana('/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveEmpresaCRM={0}&TB_iframe=true&height=370&width=600');", CveEmpresaCRM));
+ // RegistraScript(String.Format("AbrirVentana('/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveEmpresaCRM={0}&TB_iframe=true&height=370&width=600');", CveEmpresaCRM));
//}
#endregion
@@ -1740,7 +1740,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
CargaMetodosCaptacion();
InicializaAcercamientos();
limpiarCamposModalAcercamiento();
- this.RegistraScript("$('#DivModalAltaAcercamiento').modal();");
+ RegistraScript("$('#DivModalAltaAcercamiento').modal();");
UpAltaAcercamiento.Update();
//Confirmacion("Se le redireccionara para realizar el Registro del Acercamiento, ¿Desea continuar?", "", "document.location.href=\"/CRM/Acercamiento.aspx\"", "");
}
@@ -1844,7 +1844,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
ObjCRM.Dispose();
ObjBitacora.Dispose();
- this.RegistraScript("$('#DivModalAltaAcercamiento').modal('hide');");
+ RegistraScript("$('#DivModalAltaAcercamiento').modal('hide');");
UPAcercamientos.Update();
diff --git a/CRM/RepAgendasBitacoras.aspx.cs b/CRM/RepAgendasBitacoras.aspx.cs
index 3a460798c..8f2242b97 100644
--- a/CRM/RepAgendasBitacoras.aspx.cs
+++ b/CRM/RepAgendasBitacoras.aspx.cs
@@ -103,6 +103,6 @@ public partial class CRM_AgendasBitacoras : ClsPaginas
protected void LnkExcel_Click(object sender, EventArgs e)
{
- GVDatos.ExportToExcelx("RepAgendaBiracora.xls");
+ GVDatos.ExportToExcelX("RepAgendaBiracora");
}
}
\ No newline at end of file
diff --git a/Compras/CatProveedores.aspx.vb b/Compras/CatProveedores.aspx.vb
index a46ae19af..1d3b0b87c 100644
--- a/Compras/CatProveedores.aspx.vb
+++ b/Compras/CatProveedores.aspx.vb
@@ -22,7 +22,7 @@ Partial Class Compras_CatProveedores
End Sub
Private Sub InicializaValores()
- DdlResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
+ DdlResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa)
DdlResponsable.DataBind()
DdlResponsable.Items.Insert(0, New ListItem("Todos", "-1"))
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 6f698f90a..2c13b4900 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -2777,6 +2777,11 @@ Partial Class Compras_Compras
LBContabilizarAC.Visible = True
End If
End If
+
+ If UsuarioActual.Empresa.TipoContabilidad = 1 Then
+ trContabilizada.Visible = False
+ End If
+
UPPDescontablizar.Update()
TxtFechaPago.Text = dr("FechaVencimiento").ToString.ToDate.ToShortDateString
@@ -6645,7 +6650,16 @@ Partial Class Compras_Compras
Else
If Not CveCompraRefacturacion > 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, ConceptoContabilizacion, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+
+ Dim CveSubProyecto240 As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
+
+ If CveSubProyecto240 <= 0 Then
+ Alert("Debe de asignar un sub proyecto o centro de costos", TipoMensaje.MsgAdvertencia)
+ ErrorPrepoliza = True
+ Exit For
+ End If
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, ConceptoContabilizacion, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto240) Then
ErrorPrepoliza = True
End If
End If
diff --git a/Compras/EvaluacionProveedor.aspx.vb b/Compras/EvaluacionProveedor.aspx.vb
index 460ed861b..517bedcec 100644
--- a/Compras/EvaluacionProveedor.aspx.vb
+++ b/Compras/EvaluacionProveedor.aspx.vb
@@ -118,7 +118,7 @@ Partial Class Compras_EvaluacionProveedor
TxtSerieFolio.Text = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString()
End If
End If
- If ObjCompras.GetCompraDetalle(CveCompra) Then
+ If ObjCompras.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then
Dim StrPS As New StringBuilder()
For Each Row As DataRow In ObjCompras.DtResultados.Rows
If ObjCompras.DtResultados.Rows.Count > 1 Then
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index 6c4530de0..9283bbf74 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -717,7 +717,15 @@ Partial Class Compras_Proveedores
Try
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0)
- XMLDoc.Load(UsuarioActual.Empresa.Ruta & "Compras\" & dr("RFCDe").ToString & "\" & dr("XML").ToString)
+
+
+ Dim SXML As String = File.ReadAllText(UsuarioActual.Empresa.Ruta & "Compras\" & dr("RFCDe").ToString & "\" & dr("XML").ToString)
+ 'SXML = SXML.TrimStart(vbCr, vbLf, vbNullChar)
+ 'SXML = SXML.TrimEnd(vbCr, vbLf, vbNullChar)
+ SXML = SXML.Trim(New Char() {""c})
+ SXML = SXML.Replace("o;?", "")
+
+ XMLDoc.LoadXml(SXML)
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
@@ -2386,7 +2394,7 @@ Partial Class Compras_Proveedores
End If
UPPSucursales.Update()
- Me.RegistraScript("$('#divAgregarSucursal').modal('hide');")
+ RegistraScript("$('#divAgregarSucursal').modal('hide');")
LimpiaModalAgregarSucursal()
End Sub
Private Sub OcultaDiv()
@@ -2520,7 +2528,7 @@ Partial Class Compras_Proveedores
DivPContactosSucursal.Visible = True
UpAgregarSucursal.Update()
- Me.RegistraScript("$('#divAgregarSucursal').modal('show');")
+ RegistraScript("$('#divAgregarSucursal').modal('show');")
End Sub
Protected Sub LnkAgregarSucursal_Click(sender As Object, e As EventArgs)
@@ -2532,7 +2540,7 @@ Partial Class Compras_Proveedores
End If
DivPContactosSucursal.Visible = False
LimpiaModalAgregarSucursal()
- Me.RegistraScript("$('#divAgregarSucursal').modal('show');")
+ RegistraScript("$('#divAgregarSucursal').modal('show');")
End Sub
Protected Sub LimpiaModalAgregarSucursal()
@@ -3868,7 +3876,7 @@ Partial Class Compras_Proveedores
lista.Add(New CrystalParametro("SaldoDisponible", (TxtLimiteCredito.Text.ToDouble - dr("Saldo").ToString.ToDouble).ToString.FormatoNumero))
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
lista.Add(New CrystalParametro("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
-
+
'Dim params As New List(Of ReportParameter)
Dim dtnc As New DataTable
Dim ObjCompra As New ClsCompras()
@@ -4900,7 +4908,7 @@ Partial Class Compras_Proveedores
EsEditar = 0
limpiarCamposModalAgregarContacto()
- Me.RegistraScript("$('#DivAgregarContactoProveedor').modal();")
+ RegistraScript("$('#DivAgregarContactoProveedor').modal();")
End Sub
Protected Sub imgEditarContactoProv_Click(sender As Object, e As EventArgs)
@@ -4923,7 +4931,7 @@ Partial Class Compras_Proveedores
UpAgregarContatoProveedor.Update()
- Me.RegistraScript("$('#DivAgregarContactoProveedor').modal('show');")
+ RegistraScript("$('#DivAgregarContactoProveedor').modal('show');")
End Sub
@@ -4969,7 +4977,7 @@ Partial Class Compras_Proveedores
EsContactoSucursal = 1
EsEditar = 0
limpiarCamposModalAgregarContacto()
- Me.RegistraScript("$('#DivAgregarContactoProveedor').modal('show');")
+ RegistraScript("$('#DivAgregarContactoProveedor').modal('show');")
End Sub
Protected Sub imgEditarContactoProvSuc_Click(sender As Object, e As EventArgs)
@@ -4993,7 +5001,7 @@ Partial Class Compras_Proveedores
UpAgregarContatoProveedor.Update()
- Me.RegistraScript("$('#DivAgregarContactoProveedor').modal('show');")
+ RegistraScript("$('#DivAgregarContactoProveedor').modal('show');")
End Sub
Protected Sub GVContactosProveedorSucursal_RowDeleting(sender As Object, e As GridViewDeleteEventArgs)
@@ -5122,7 +5130,7 @@ Partial Class Compras_Proveedores
End If
- Me.RegistraScript("$('#DivAgregarContactoProveedor').modal('hide');")
+ RegistraScript("$('#DivAgregarContactoProveedor').modal('hide');")
limpiarCamposModalAgregarContacto()
End Sub
@@ -5139,11 +5147,12 @@ Partial Class Compras_Proveedores
objUsuario.Dispose()
End Sub
Public Sub CargaGlobal()
- Dim ObjUsuarios As New ClsSisUsuarios
- If ObjUsuarios.GetUsuariosEmpresas(-1) Then
- Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
- End If
- ObjUsuarios.Dispose()
+ 'Dim ObjUsuarios As New ClsSisUsuarios
+ 'If ObjUsuarios.GetUsuariosEmpresas(-1) Then
+ ' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
+ 'End If
+ 'ObjUsuarios.Dispose()
+ GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
End Sub
Protected Sub GvUsuarios_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvUsuarios.RowDataBound
diff --git a/Compras/RepCompras.aspx.vb b/Compras/RepCompras.aspx.vb
index f4a943bd6..6a76475dc 100644
--- a/Compras/RepCompras.aspx.vb
+++ b/Compras/RepCompras.aspx.vb
@@ -143,7 +143,7 @@ Partial Class Compras_RepCompras
DdlTipoGasto.DataBind()
'CargaUsuarios
- DdlUsuario.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
+ DdlUsuario.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa)
DdlUsuario.DataBind()
'Carga Usuarios Captura
diff --git a/Compras/RepComprasDetalle.aspx.vb b/Compras/RepComprasDetalle.aspx.vb
index 69b15621a..9a536acb4 100644
--- a/Compras/RepComprasDetalle.aspx.vb
+++ b/Compras/RepComprasDetalle.aspx.vb
@@ -253,7 +253,7 @@ Partial Class Compras_RepComprasDetalle
DdlProveedores.SelectedValue = "-1"
'CargaUsuarios
- DdlUsuario.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
+ DdlUsuario.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa)
DdlUsuario.DataBind()
'Carga Usuario Capturo
diff --git a/Compras/RepGastosFijos.aspx.cs b/Compras/RepGastosFijos.aspx.cs
index 0a9bc0d1a..d9d6c30bc 100644
--- a/Compras/RepGastosFijos.aspx.cs
+++ b/Compras/RepGastosFijos.aspx.cs
@@ -145,7 +145,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas
RecurrenciaTipo: RecurrenciaTipo, Frecuencia: Frecuencia, Mes: Mes, RecurrenciaFin: RecurrenciaFin.ToString(), CveTipoEvento: CveTipoEvento, Importe: Importe))
{
LimpiaModal();
- this.RegistraScript("$('#DvModalGasto').modal('hide');");
+ RegistraScript("$('#DvModalGasto').modal('hide');");
Alert("El Evento Gasto Mensual se guardó correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
}
}
@@ -155,7 +155,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas
RecurrenciaTipo: RecurrenciaTipo, Frecuencia: Frecuencia, Mes: Mes, RecurrenciaFin: RecurrenciaFin.ToString(), Importe: Importe))
{
LimpiaModal();
- this.RegistraScript("$('#DvModalGasto').modal('hide');");
+ RegistraScript("$('#DvModalGasto').modal('hide');");
Alert("El Evento Gasto Mensual se ha Actualizado correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
}
}
@@ -179,7 +179,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas
{
LimpiaModal();
UPModalGasto.Update();
- this.RegistraScript("$('#DvModalGasto').modal();");
+ RegistraScript("$('#DvModalGasto').modal();");
}
protected void LnkEditar_Click(object sender, EventArgs e)
@@ -201,7 +201,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas
UPModalGasto.Update();
- this.RegistraScript("$('#DvModalGasto').modal();");
+ RegistraScript("$('#DvModalGasto').modal();");
}
#endregion
diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb
index 07fcbdc6d..cfe4b89ee 100644
--- a/Compras/eFacturas.aspx.vb
+++ b/Compras/eFacturas.aspx.vb
@@ -748,10 +748,10 @@ Partial Class Compras_eFacturas
txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString
Destino = String.Format("{0}Compras\", UsuarioActual.Empresa.Ruta)
- Ejecutable = "C:\Proyectos\wwwSIG\Utilerias\ADSUtilerias.exe"
+ Ejecutable = "F:\Proyectos\wwwSIG\Utilerias\ADSUtilerias.exe"
Form.DefaultButton = BtnConsultar.UniqueID
- DdlResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
+ DdlResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa)
DdlResponsable.DataBind()
DdlResponsable.Items.Insert(0, New ListItem("Todos", "-1"))
@@ -2528,7 +2528,7 @@ Partial Class Compras_eFacturas
TabPanel.ActiveTabIndex = 0
cargasolicitudes()
- Me.RegistraScript("$('#ModalViewSolicitudes').modal();")
+ RegistraScript("$('#ModalViewSolicitudes').modal();")
End Sub
@@ -2553,9 +2553,9 @@ Partial Class Compras_eFacturas
' 'If Continuar Then
' ' txtFechaIAdd.Text = ""
' ' txtFechaFAdd.Text = ""
- ' ' Me.RegistraScript("$('#DModalSolicitudesNominas').modal('hide');")
+ ' ' RegistraScript("$('#DModalSolicitudesNominas').modal('hide');")
' ' cargasolicitudes()
- ' ' Me.Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion)
+ ' ' Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion)
' 'End If
' Dim idSolicitudCFDI As Integer = 0
@@ -2640,7 +2640,7 @@ Partial Class Compras_eFacturas
' If Continuar Then
' txtFechaIAdd.Text = ""
' txtFechaFAdd.Text = ""
- ' Me.RegistraScript("$('#ModalViewSolicitudes').modal('hide');")
+ ' RegistraScript("$('#ModalViewSolicitudes').modal('hide');")
' cargasolicitudes()
' End If
@@ -2705,7 +2705,7 @@ Partial Class Compras_eFacturas
txtFechaIAdd.Text = ""
txtFechaFAdd.Text = ""
ChkMetaDatos.Checked = False
- Me.RegistraScript("$('#ModalAgregarSolicitud').modal('hide');")
+ RegistraScript("$('#ModalAgregarSolicitud').modal('hide');")
cargasolicitudes()
End If
End Sub
@@ -2869,7 +2869,7 @@ Partial Class Compras_eFacturas
txtFechaFAdd.Text = ""
ChkMetaDatos.Checked = False
UPModalViewSolicitudesAgregar.Update()
- Me.RegistraScript("$('#ModalAgregarSolicitud').modal('show');")
+ RegistraScript("$('#ModalAgregarSolicitud').modal('show');")
End Sub
Protected Sub GVSolicitudesNominas_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb
index 111ae7686..21da35698 100644
--- a/Contabilidad/PopUpAuxiliar.aspx.vb
+++ b/Contabilidad/PopUpAuxiliar.aspx.vb
@@ -225,13 +225,21 @@ Partial Class PopUpAuxiliar
e.Row.FCLinkButton("LnkDesAplicar").CommandName = "DesAplicarCompra"
e.Row.FCLinkButton("imgD").Visible = False
If e.Row.DBCampo("CveConceptoContable").Contiene("272") Then
- e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveCompraAmortizacion"))
+ e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}|{3}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveIE"))
Else
- e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra"))
+ e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}|{3}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompraAmortizacion"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE"))
End If
- End If
- If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
+ ElseIf e.Row.DBCampo("CveConceptoContable").Contiene("21") Then 'desaplicar anticipo de compra
+
+ e.Row.FCLinkButton("LnkDesAplicar").Visible = True
+ e.Row.FCLinkButton("LnkDesAplicar").CommandName = "DesAplicarAnticipoCompra"
+ e.Row.FCLinkButton("imgD").Visible = False
+ e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveCompra"), e.Row.DBCampo("CveIE"))
+
+ End If
+
+ If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}"
'If e.Row.DBCampo("CveReferencia").ToEntero > 0 Then
' e.Row.Cells(10).Text = ""
@@ -519,6 +527,40 @@ Partial Class PopUpAuxiliar
End If
+ If e.CommandName = "DesAplicarAnticipoCompra" Then
+
+ Dim CvePrePoliza, CveCompra, CveIE As Integer
+ Dim TieneError = False
+
+ Dim St As String() = e.CommandArgument.ToString.Split("|"c)
+ If St.Length > 0 Then
+ CvePrePoliza = St(0).ToEntero
+ CveCompra = St(1).ToEntero
+ CveIE = St(2).ToEntero
+ End If
+
+ If CvePrePoliza > 0 Then
+ Dim Conta As New ClsContabilidad()
+ Conta.IniciaTransacSQL()
+
+ If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
+ TieneError = True
+ End If
+
+ If Not TieneError AndAlso Not Conta.DesAplicarPago(CvePrePoliza, 21, CveCompra, CveIE) Then
+ TieneError = True
+ End If
+
+ If Not TieneError Then
+ Conta.Commit()
+ Alert("Pago Desaplicado.", TipoMensaje.ToastInformacion)
+ Else
+ Conta.RollBack()
+ Alert("Pago no fue desaplicado.", TipoMensaje.ToastError)
+ End If
+ End If
+
+ End If
End Sub
End Class
diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb
index 88ea2a459..c39b56c1a 100644
--- a/Contabilidad/RegPrePoliza.aspx.vb
+++ b/Contabilidad/RegPrePoliza.aspx.vb
@@ -825,7 +825,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero()
- Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
+ Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
Dim Cuenta As String = ""
Dim IdCuenta As Integer = 0
Dim CodigoCuenta As String = ""
@@ -2108,7 +2108,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim worksheet = workbook.Worksheets.Add(DdlPlantilla2.SelectedItem.Text.Substring(1, 30))
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero()
- Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
+ Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
Dim DtExcel As DataTable = (From row As DataRow In Dt.Rows
Select New With
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index 0edfc89d0..d8eee866b 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -808,7 +808,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
- Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
+ Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa)
Dim Cuenta As String = ""
@@ -2314,7 +2314,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero
'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa)
- Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
+ Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
Dim DtExcel As DataTable = (From row As DataRow In Dt.Rows
diff --git a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb
index 1cdf2c6dc..84f411697 100644
--- a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb
+++ b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb
@@ -339,7 +339,7 @@ Partial Class AC_RepAnexoCatalogoSegmento
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
'GvDatos.ExportToExcelG("RepAnexoCatalogoSegmento", "RepAnexoCatalogoSegmento", UsuarioActual)
- GvDatos.ExportToExcelx("RepAnexoCatalogoSegmento")
+ GvDatos.ExportToExcelX("RepAnexoCatalogoSegmento")
End Sub
'Private Sub ImprimirReporte(Optional Formato As String = "PDF")
' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
diff --git a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc
index c783cb174..8fbc653f0 100644
--- a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc
+++ b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc
@@ -3035,32 +3035,36 @@
ReportParameter1
-
=Sum(iif(Fields!Tipo.Value.ToString() = "A" OR Fields!Tipo.Value.ToString() = "B" OR Fields!Tipo.Value.ToString() = "C" OR Cint(Fields!TipoCuenta.Value) = 9 , Fields!ImporteActual.Value, 0) , "DataSet1")
- =Sum(iif(Fields!Tipo.Value.ToString() = "A" OR Fields!Tipo.Value.ToString() = "B" OR Fields!Tipo.Value.ToString() = "C" OR Cint(Fields!TipoCuenta.Value) = 9 , Fields!ImporteAnterior.Value, 0) , "DataSet1")
+ =Sum( iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE" OR Cint(Fields!TipoCuenta.value) = 9 , Fields!ImporteAnterior.Value, 0), "DataSet1")
- =Sum(iif(Fields!Tipo.Value.ToString() = "D" AND Cint(Fields!TipoCuenta.Value) = 3 , Fields!ImporteActual.Value, 0) , "DataSet1")
+ =Sum( iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" OR Fields!Sup.Value = "Pasivo a corto plazo",
+Fields!ImporteActual.Value, 0), "DataSet1")
- =Sum(iif(Fields!Tipo.Value.ToString() = "D" AND Cint(Fields!TipoCuenta.Value) = 3 , Fields!ImporteAnterior.Value, 0) , "DataSet1")
+ =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Fields!ImporteAnterior.Value, 0),"DataSet1")true=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1")
- =Sum(iif(Fields!Tipo.Value.ToString() = "F" AND (Cint(Fields!TipoCuenta.Value) = 5 OR Cint(Fields!TipoCuenta.Value) = 6 OR Cint(Fields!TipoCuenta.Value) = 7 OR Cint(Fields!TipoCuenta.Value) = 8) , Fields!ImporteActual.Value, 0) , "DataSet1")
+ =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL"
+OR Fields!Sup.Value = "CAPITAL CONTABLE"
+OR Fields!Sup.Value = "Capital Social"
+OR Fields!Sup.Value = "Capital",
+Fields!ImporteActual.Value, 0),"DataSet1")=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteAnterior.Value, 0),"DataSet1")
- =Sum(iif(Fields!Tipo.Value.ToString() = "F" AND (Cint(Fields!TipoCuenta.Value) = 5 OR Cint(Fields!TipoCuenta.Value) = 6 OR Cint(Fields!TipoCuenta.Value) = 7 OR Cint(Fields!TipoCuenta.Value) = 8) , Fields!ImporteAnterior.Value, 0) , "DataSet1")
+ =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1")=Variables!TotalPasivoActual.Value+Variables!TotalPatrimonioHActual.Value
diff --git a/Contratos/CatRefrendos.aspx.cs b/Contratos/CatRefrendos.aspx.cs
index 802ec036c..f649ef7dc 100644
--- a/Contratos/CatRefrendos.aspx.cs
+++ b/Contratos/CatRefrendos.aspx.cs
@@ -321,7 +321,7 @@ public partial class Contratos_CatRefrendos : ClsPaginas
UPModalRefrendo.Update();
- this.RegistraScript("$('#DvModalRefrendo').modal();");
+ RegistraScript("$('#DvModalRefrendo').modal();");
}
protected void imgE_Click(object sender, EventArgs e)
@@ -382,7 +382,7 @@ public partial class Contratos_CatRefrendos : ClsPaginas
UPModalRefrendo.Update();
- this.RegistraScript("$('#DvModalRefrendo').modal();");
+ RegistraScript("$('#DvModalRefrendo').modal();");
}
protected void BtnGuardarRefrendo_Click(object sender, EventArgs e)
@@ -445,7 +445,7 @@ public partial class Contratos_CatRefrendos : ClsPaginas
ObjContrato.Dispose();
limpiarCamposModal();
- this.RegistraScript("$('#DvModalRefrendo').modal('hide');");
+ RegistraScript("$('#DvModalRefrendo').modal('hide');");
CargaDatos();
}
diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb
index 413d9a730..d2c3340ef 100644
--- a/Contratos/Contrato.aspx.vb
+++ b/Contratos/Contrato.aspx.vb
@@ -4238,7 +4238,7 @@ Partial Class Contratos_Default
LnkDescargar.Visible = False
BtnGuardarFianza.Text = "Guardar"
UPModalFianza.Update()
- Me.RegistraScript("$('#DvModalFianza').modal();")
+ RegistraScript("$('#DvModalFianza').modal();")
GvFianzas.DataSource = DtTmpFianzas
GvFianzas.DataBind()
UpGvFianzas.Update()
@@ -4285,7 +4285,7 @@ Partial Class Contratos_Default
UpGvFianzas.Update()
LimpiarCamposModalFianzas()
- Me.RegistraScript("$('#DvModalFianza').modal('hide');")
+ RegistraScript("$('#DvModalFianza').modal('hide');")
End Sub
@@ -4361,7 +4361,7 @@ Partial Class Contratos_Default
txth4Fianza.InnerText = "Editar Fianza"
BtnGuardarFianza.Text = "Actualizar"
UPModalFianza.Update()
- Me.RegistraScript("$('#DvModalFianza').modal();")
+ RegistraScript("$('#DvModalFianza').modal();")
GvFianzas.DataSource = DtTmpFianzas
GvFianzas.DataBind()
UpGvFianzas.Update()
diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb
index 24f5cf339..69ebddbdd 100644
--- a/Contratos/ContratoObra.aspx.vb
+++ b/Contratos/ContratoObra.aspx.vb
@@ -3945,7 +3945,7 @@ Partial Class Contratos_ContratoObra
LnkDescargar.Visible = False
'BtnGuardarFianza.Text = "Guardar"
UPModalFianza.Update()
- Me.RegistraScript("$('#DvModalFianza').modal();")
+ RegistraScript("$('#DvModalFianza').modal();")
End Sub
@@ -3995,7 +3995,7 @@ Partial Class Contratos_ContratoObra
txth4Fianza.InnerText = "Editar Fianza"
UPModalFianza.Update()
- Me.RegistraScript("$('#DvModalFianza').modal();")
+ RegistraScript("$('#DvModalFianza').modal();")
End Sub
Protected Sub CreaDtTmpFianzas()
diff --git a/CxC/GestionCobranza.aspx.vb b/CxC/GestionCobranza.aspx.vb
index 183098cf2..836c147bf 100644
--- a/CxC/GestionCobranza.aspx.vb
+++ b/CxC/GestionCobranza.aspx.vb
@@ -57,11 +57,11 @@ Partial Class Ventas_GestionCobranza
DdlResponsableCobranza.DataBind()
DdlResponsableCobranza.Items.Insert(0, New ListItem("Todos", "-1"))
- DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa)
+ DdlCobranzaEstatus.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa)
DdlCobranzaEstatus.DataBind()
DdlCobranzaEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
- DdlCobranzaEstatusEdit.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa)
+ DdlCobranzaEstatusEdit.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa)
DdlCobranzaEstatusEdit.DataBind()
If ObjVentas.GetCobranzaTurnoEstatus(-1, UsuarioActual.CveEmpresa) Then
diff --git a/CxC/RepCxC.aspx b/CxC/RepCxC.aspx
index e66c3446e..8b9913fba 100644
--- a/CxC/RepCxC.aspx
+++ b/CxC/RepCxC.aspx
@@ -365,7 +365,7 @@
Contrato:
-
+
diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb
index f6030f5be..02e642962 100644
--- a/CxC/RepCxC.aspx.vb
+++ b/CxC/RepCxC.aspx.vb
@@ -4,7 +4,8 @@ Option Strict On
Imports System.Data
Imports System.IO
Imports Extensiones
-Imports Microsoft.Reporting.WebForms
+Imports Microsoft.Reporting.WebForms
+
Partial Class RepCxC
Inherits ClsPaginas
@@ -152,7 +153,7 @@ Partial Class RepCxC
txtCorteA.Text = $"31/12/{Now.Year}"
'Carga Cobranza Estatus
- DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa)
+ DdlCobranzaEstatus.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa)
DdlCobranzaEstatus.DataBind()
DdlCobranzaEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
@@ -181,9 +182,9 @@ Partial Class RepCxC
Private Sub CargaContratos()
Dim ObjContratos As New ClsContratos
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente:=-1) Then
- DdlContrato.DataSource = ObjContratos.DtResultados
- End If
-
+ DdlContrato.DataSource = ObjContratos.DtResultados
+ End If
+ divContrato.Visible = True
ObjContratos.Dispose()
DdlContrato.DataBind()
diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx
index e13c957ac..694f59a17 100644
--- a/CxC/RepCxCDetalle.aspx
+++ b/CxC/RepCxCDetalle.aspx
@@ -348,7 +348,7 @@