Files
SIG/AC/RepPresupuestoIngresosDetalle.aspx.vb
JORGE LUIS CAUDILLO ESPARZA c35cf91883 Commit inicial Ventas Productivo
2019-08-14 16:40:54 -07:00

89 lines
3.0 KiB
VB.net

Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class AC_RepPresupuestoIngresosDetalle
Inherits ClsPaginas
Private Property DtDatos As DataTable
Get
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DtDatos") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim ErrorParametros = True
Dim MomentoContable = -1
Dim FuenteRecaudacion = -1, RubroIngreso = -1
Dim FI, FF As Date
If Request("MM") IsNot Nothing AndAlso IsNumeric(Request("MM")) Then
If Request("FR") IsNot Nothing AndAlso Request("FR").ToString.Length > 0 Then
If Request("RI") IsNot Nothing AndAlso Request("RI").ToString.Length > 0 Then
If Request("FeF") IsNot Nothing AndAlso Request("FeF").ToString.Length = 10 AndAlso Request("FeF").ToDate > "01/01/1000".ToDate Then
If Request("FeI") IsNot Nothing AndAlso Request("FeI").ToString.Length = 10 AndAlso Request("FeI").ToDate > "01/01/1000".ToDate Then
MomentoContable = Request("MM").ToEntero
FuenteRecaudacion = Request("FR").ToEntero
RubroIngreso = Request("RI").ToEntero
FI = Request("FeI").ToDate
FF = Request("FeF").ToDate
ErrorParametros = False
End If
End If
End If
End If
End If
If Not ErrorParametros Then
CargaDatos(MomentoContable, FuenteRecaudacion, RubroIngreso, FI, FF)
End If
End If
End Sub
Private Sub CargaDatos(MomentoContable As Integer, FuenteRecaudacion As Integer, RubroIngreso As Integer, FI As Date, FF As Date)
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
If ObjConta.GetRepPresupuestosIngresosSaldosDetalle(MomentoContable, FuenteRecaudacion, RubroIngreso, FI, FF) Then
DtDatos = ObjConta.DtResultados
Else
DtDatos = Nothing
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
End If
ObjConta.Dispose()
If DtDatos.Rows.Count > 0 Then
CargaGrid()
End If
End Sub
Private Sub CargaGrid()
GvDatos.DataSource = DtDatos ' DtDatos
GvDatos.DataBind()
UpDatos.Update()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Referencia") = "Total:" Then
e.Row.Font.Bold = True
End If
End If
End Sub
End Class