-- se quito GlobalDTFolios
This commit is contained in:
@@ -19,6 +19,15 @@ Partial Class Contratos_FacturacionMasiva
|
||||
ViewState("DTCicloComercial") = value
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
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
|
||||
If Not IsPostBack Then
|
||||
FolioVigentes = False
|
||||
CargaCombos()
|
||||
txtFechaI.Text = DateTime.Today.ToString("d")
|
||||
txtFechaF.Text = DateTime.Today.ToString("d")
|
||||
@@ -118,6 +128,8 @@ Partial Class Contratos_FacturacionMasiva
|
||||
DdlSucursal.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaDatos(CveContrato As Integer, CveCliente As Integer)
|
||||
ValidaFolio()
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.CicloComercialGet(CveContrato, CveCliente, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, DdlSucursal.SelectedValue.ToEntero) Then
|
||||
DTCicloComercial = ObjContratos.DtResultados().FiltraParametros($"FueFacturado = 0")
|
||||
@@ -127,9 +139,21 @@ Partial Class Contratos_FacturacionMasiva
|
||||
GvCiclosComerciales.DataBind()
|
||||
UpGv.Update()
|
||||
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
|
||||
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").ToolTip = "La sucursal vinculada con este contrato no tiene folios"
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user