Files
SIG/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb
2022-06-18 11:20:49 -07:00

75 lines
2.3 KiB
VB.net

Option Explicit On
Option Strict On
Imports Extensiones
Partial Class Acumuladores_RepIndicadorDiarioDetalle
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaParametrosDetalle()
End If
End Sub
#Region " CARGA DATOS INICIALES "
Private Sub CargaParametrosDetalle()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
Dim Partida As Integer = If(Request("Partida") IsNot Nothing AndAlso Request("Partida").ToEntero() > 0, Request("Partida").ToEntero(), -1)
DdlOpcion.SelectedValueExist(Partida.ToEntero)
Dim CveSubProyecto As Integer = If(Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero() > 0, Request("CveSubProyecto").ToEntero(), -1)
DdlSubProyecto.SelectedValueExist(CveSubProyecto)
txtFechaI.Text = If(Request("FI") IsNot Nothing AndAlso Request("FI").ToString <> "", Request("FI").ToString.ToDate, MinFecha).ToShortDateString
txtFechaF.Text = If(Request("FF") IsNot Nothing AndAlso Request("FF").ToString <> "", Request("FF").ToString.ToDate, MinFecha).ToShortDateString
CargaDatos(Partida)
End Sub
#End Region
#Region " CARGA DATOS "
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos(1)
UPDatos.Update()
End Sub
Private Sub CargaDatos(opcion As Integer)
Dim ObjAcum As New ClsAcumuladores()
Dim FechaI, FechaF As Date
FechaI = txtFechaI.Text.ToDate
FechaF = txtFechaF.Text.ToDate
If ObjAcum.GetRepIndicadorDiarioDetalle(FechaI, FechaF, DdlOpcion.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjAcum.DtResultados
Else
GvDatos.DataSource = Nothing
End If
ObjAcum.Dispose()
GvDatos.DataBind()
End Sub
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("SerieFolio") = "" Then
e.Row.CssClass = "SubTotales"
End If
End If
End Sub
#End Region
End Class