-- se quito GlobalDTFolios

This commit is contained in:
rrene
2020-05-30 15:33:13 -07:00
parent e8031755ee
commit 28351c58e0
7 changed files with 129 additions and 114 deletions

View File

@@ -6684,14 +6684,6 @@ Namespace Modelos
HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value
End Set End Set
End Property End Property
Property GlobalDTFolios() As DataTable
Get
GlobalDTFolios = DirectCast(HttpContext.Current.Application("GlobalDTFolios"), DataTable)
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTFolios") = value
End Set
End Property
Property GlobalDTEstatusFactura() As DataTable Property GlobalDTEstatusFactura() As DataTable
Get Get
GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable) GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable)

View File

@@ -1606,14 +1606,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value
End Set End Set
End Property End Property
Property GlobalDTFolios() As DataTable
Get
GlobalDTFolios = DirectCast(HttpContext.Current.Application("GlobalDTFolios"), DataTable)
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTFolios") = value
End Set
End Property
Property GlobalDTEstatusFactura() As DataTable Property GlobalDTEstatusFactura() As DataTable
Get Get
GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable) GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable)

View File

@@ -19,6 +19,15 @@ Partial Class Contratos_FacturacionMasiva
ViewState("DTCicloComercial") = value ViewState("DTCicloComercial") = value
End Set End Set
End Property End Property
Private Property FolioVigentes As Boolean
Get
Return CType(ViewState("FolioVigentes"), Boolean)
End Get
Set(value As Boolean)
ViewState("FolioVigentes") = value
End Set
End Property
Private Property Mensaje As String Private Property Mensaje As String
Get Get
Return CType(ViewState("Mensaje"), String) Return CType(ViewState("Mensaje"), String)
@@ -100,6 +109,7 @@ Partial Class Contratos_FacturacionMasiva
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
FolioVigentes = False
CargaCombos() CargaCombos()
txtFechaI.Text = DateTime.Today.ToString("d") txtFechaI.Text = DateTime.Today.ToString("d")
txtFechaF.Text = DateTime.Today.ToString("d") txtFechaF.Text = DateTime.Today.ToString("d")
@@ -118,6 +128,8 @@ Partial Class Contratos_FacturacionMasiva
DdlSucursal.DataBind() DdlSucursal.DataBind()
End Sub End Sub
Private Sub CargaDatos(CveContrato As Integer, CveCliente As Integer) Private Sub CargaDatos(CveContrato As Integer, CveCliente As Integer)
ValidaFolio()
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
If ObjContratos.CicloComercialGet(CveContrato, CveCliente, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, DdlSucursal.SelectedValue.ToEntero) Then If ObjContratos.CicloComercialGet(CveContrato, CveCliente, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, DdlSucursal.SelectedValue.ToEntero) Then
DTCicloComercial = ObjContratos.DtResultados().FiltraParametros($"FueFacturado = 0") DTCicloComercial = ObjContratos.DtResultados().FiltraParametros($"FueFacturado = 0")
@@ -127,9 +139,21 @@ Partial Class Contratos_FacturacionMasiva
GvCiclosComerciales.DataBind() GvCiclosComerciales.DataBind()
UpGv.Update() UpGv.Update()
End Sub End Sub
Private Sub ValidaFolio()
Dim ObjFolios As New ClsGralFolios
If ObjFolios.GetFolios("Ing", UsuarioActual.CveEmpresa) Then
If ObjFolios.DtResultados.Rows.Count > 0 Then
FolioVigentes = True
End If
End If
ObjFolios.Dispose()
End Sub
Protected Sub GvCiclosComerciales_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCiclosComerciales.RowDataBound Protected Sub GvCiclosComerciales_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCiclosComerciales.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If GlobalDTFolios().FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto")} AND TipoDocto = 'Ing' ").Rows.Count = 0 Then '' Pendiente de aplicar validacion
If Not FolioVigentes Then
e.Row.FCCheckBox("chkDis").Enabled = False e.Row.FCCheckBox("chkDis").Enabled = False
e.Row.FCCheckBox("chkDis").ToolTip = "La sucursal vinculada con este contrato no tiene folios" e.Row.FCCheckBox("chkDis").ToolTip = "La sucursal vinculada con este contrato no tiene folios"
End If End If

View File

@@ -27,6 +27,14 @@ Partial Class Contratos_FacturacionMasiva
ViewState("Mensaje") = value ViewState("Mensaje") = value
End Set End Set
End Property End Property
Private Property FolioVigentes As Boolean
Get
Return CType(ViewState("FolioVigentes"), Boolean)
End Get
Set(value As Boolean)
ViewState("FolioVigentes") = value
End Set
End Property
Private Property ErrorList As List(Of String) Private Property ErrorList As List(Of String)
Get Get
Return CType(ViewState("ErrorList"), List(Of String)) Return CType(ViewState("ErrorList"), List(Of String))
@@ -79,6 +87,7 @@ Partial Class Contratos_FacturacionMasiva
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
FolioVigentes = False
CargaCombos() CargaCombos()
txtFechaI.Text = DateTime.Today.ToString("d") txtFechaI.Text = DateTime.Today.ToString("d")
txtFechaF.Text = DateTime.Today.ToString("d") txtFechaF.Text = DateTime.Today.ToString("d")
@@ -97,6 +106,7 @@ Partial Class Contratos_FacturacionMasiva
DdlSucursal.DataBind() DdlSucursal.DataBind()
End Sub End Sub
Private Sub CargaDatos(CveContrato As Integer, CveCliente As Integer) Private Sub CargaDatos(CveContrato As Integer, CveCliente As Integer)
ValidaFolio()
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
If ObjContratos.CicloComercialGet(CveContrato, CveCliente, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, DdlSucursal.SelectedValue.ToEntero) Then If ObjContratos.CicloComercialGet(CveContrato, CveCliente, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, DdlSucursal.SelectedValue.ToEntero) Then
DTCicloComercial = ObjContratos.DtResultados().FiltraParametros($"FueFacturado = 0") DTCicloComercial = ObjContratos.DtResultados().FiltraParametros($"FueFacturado = 0")
@@ -106,9 +116,20 @@ Partial Class Contratos_FacturacionMasiva
GvCiclosComerciales.DataBind() GvCiclosComerciales.DataBind()
UpGv.Update() UpGv.Update()
End Sub End Sub
Private Sub ValidaFolio()
Dim ObjFolios As New ClsGralFolios
If ObjFolios.GetFolios("Ing", UsuarioActual.CveEmpresa) Then
If ObjFolios.DtResultados.Rows.Count > 0 Then
FolioVigentes = True
End If
End If
ObjFolios.Dispose()
End Sub
Protected Sub GvCiclosComerciales_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCiclosComerciales.RowDataBound Protected Sub GvCiclosComerciales_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCiclosComerciales.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If GlobalDTFolios().FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto")} AND TipoDocto = 'Ing' ").Rows.Count = 0 Then If Not FolioVigentes Then
e.Row.FCCheckBox("chkDis").Enabled = False e.Row.FCCheckBox("chkDis").Enabled = False
e.Row.FCCheckBox("chkDis").ToolTip = "La sucursal vinculada con este contrato no tiene folios" e.Row.FCCheckBox("chkDis").ToolTip = "La sucursal vinculada con este contrato no tiene folios"
End If End If

View File

@@ -91,7 +91,7 @@ Partial Class CatFolios
Dim ObjFolios As New ClsGralFolios Dim ObjFolios As New ClsGralFolios
If ObjFolios.GetFolios() Then If ObjFolios.GetFolios() Then
ViewState("DTFolios") = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTFolios") = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTFolios = ObjFolios.DtResultados
GvDatos.DataSource = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GvDatos.DataSource = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GvDatos.DataBind() GvDatos.DataBind()
Else Else
@@ -153,7 +153,7 @@ Partial Class CatFolios
If ObjFolios.RemoveFolios(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then If ObjFolios.RemoveFolios(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
GvDatos.EditIndex = -1 GvDatos.EditIndex = -1
ViewState("DTFolios") = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTFolios") = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTFolios = ObjFolios.DtResultados
Alert("La Aprobación de Folios se eliminó correctamente.", TipoMensaje.MsgInformacion) Alert("La Aprobación de Folios se eliminó correctamente.", TipoMensaje.MsgInformacion)
End If End If
ObjFolios.Dispose() ObjFolios.Dispose()
@@ -194,7 +194,7 @@ Partial Class CatFolios
Session("FileUpload") = "" Session("FileUpload") = ""
Alert("La nueva Aprobación de Folios se guardó/editó correctamente.", TipoMensaje.MsgInformacion) Alert("La nueva Aprobación de Folios se guardó/editó correctamente.", TipoMensaje.MsgInformacion)
GlobalDTFolios = ObjFolios.DtResultados
ViewState("DTFolios") = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTFolios") = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)

View File

@@ -21,7 +21,6 @@
<asp:ListItem Text="ProyectosUsuarios" Value="GlobalDTProyectosUsuarios"></asp:ListItem> <asp:ListItem Text="ProyectosUsuarios" Value="GlobalDTProyectosUsuarios"></asp:ListItem>
<asp:ListItem Text="Sub Proyectos" Value="GlobalDTSubProyectos"></asp:ListItem> <asp:ListItem Text="Sub Proyectos" Value="GlobalDTSubProyectos"></asp:ListItem>
<asp:ListItem Text="Sub ProyectosUsuarios" Value="GlobalDTSubProyectosUsuarios"></asp:ListItem> <asp:ListItem Text="Sub ProyectosUsuarios" Value="GlobalDTSubProyectosUsuarios"></asp:ListItem>
<asp:ListItem Text="Folios" Value="GlobalDTFolios"></asp:ListItem>
<%-- <asp:ListItem Text="Sucursales" Value="GlobalDTSucursales"></asp:ListItem>--%> <%-- <asp:ListItem Text="Sucursales" Value="GlobalDTSucursales"></asp:ListItem>--%>
<asp:ListItem Text="Proveedores" Value="GlobalDTCompProveedores"></asp:ListItem> <asp:ListItem Text="Proveedores" Value="GlobalDTCompProveedores"></asp:ListItem>
<asp:ListItem Text="Métodos de Pago" Value="GlobalDTMetodosPago"></asp:ListItem> <asp:ListItem Text="Métodos de Pago" Value="GlobalDTMetodosPago"></asp:ListItem>

View File

@@ -24,8 +24,6 @@ Partial Class Sistemas_CatSesiones
CargaSubProyectos() CargaSubProyectos()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTSubProyectosUsuarios" Then ElseIf DdlVariable.SelectedItem.Value = "GlobalDTSubProyectosUsuarios" Then
CargaSubProyectos() CargaSubProyectos()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTFolios" Then
CargaFolios()
'ElseIf DdlVariable.SelectedItem.Value = "GlobalDTSucursales" Then 'ElseIf DdlVariable.SelectedItem.Value = "GlobalDTSucursales" Then
' CargaSucursales() ' CargaSucursales()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTCompProveedores" Then ElseIf DdlVariable.SelectedItem.Value = "GlobalDTCompProveedores" Then
@@ -341,18 +339,6 @@ Partial Class Sistemas_CatSesiones
'Fin Carga Proyectos 'Fin Carga Proyectos
End Sub End Sub
Private Sub CargaFolios()
'Carga Folios
Dim ObjFolios As New ClsGralFolios()
If ObjFolios.GetFolios() Then
Application("GlobalDTFolios") = ObjFolios.DtResultados
Else
Application("GlobalDTFolios") = Nothing
End If
ObjFolios.Dispose()
'Fin Carga Folios
End Sub
'Private Sub CargaSucursales() 'Private Sub CargaSucursales()
' 'Carga Sucursales ' 'Carga Sucursales
' Dim ObjSucursales As New ClsSucursales() ' Dim ObjSucursales As New ClsSucursales()