79 lines
2.5 KiB
VB.net
79 lines
2.5 KiB
VB.net
Imports System.Data.SqlClient
|
|
Imports System.Text
|
|
Imports System.Web
|
|
Imports System.Linq
|
|
Imports System.Collections.Generic
|
|
Imports System.Data
|
|
|
|
Imports System.Web.UI.WebControls
|
|
Imports Extensiones
|
|
|
|
Partial Class RepGastos
|
|
Inherits ClsPaginas
|
|
|
|
#Region "Propiedades"
|
|
Private Property RfechaInicio() As DateTime
|
|
Get
|
|
Return If(IsNothing(ViewState("RfechaInicio")), DateTime.MinValue, (ViewState("RfechaInicio")))
|
|
End Get
|
|
Set
|
|
ViewState("RfechaInicio") = Value
|
|
End Set
|
|
End Property
|
|
Private Property RfechaFin() As DateTime
|
|
Get
|
|
Return If(IsNothing(ViewState("RfechaFin")), DateTime.MinValue, (ViewState("RfechaFin")))
|
|
End Get
|
|
Set
|
|
ViewState("RfechaFin") = Value
|
|
End Set
|
|
End Property
|
|
|
|
#End Region
|
|
|
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
If Not IsPostBack Then
|
|
TxtPA_VfechaInicio.Text = FirstDayOfMonth(Now).ToShortDateString
|
|
TxtPA_VfechaFin.Text = LastDayOfMonth(Now).ToShortDateString
|
|
|
|
CargaPA_Vta_ReporteGastosCentroCostoGet()
|
|
End If
|
|
End Sub
|
|
|
|
Protected Sub CargaPA_Vta_ReporteGastosCentroCostoGet()
|
|
Dim ObjCompras As New ClsCompras
|
|
|
|
If ObjCompras.GetReporteGastosCentroCosto(UsuarioActual.CveEmpresa, RfechaInicio, RfechaFin) Then
|
|
GVPA_Vta_ReporteGastosCentroCostoGet.DataSource = ObjCompras.DtResultados
|
|
GVPA_Vta_ReporteGastosCentroCostoGet.DataBind()
|
|
upDatosPA_V.Update()
|
|
End If
|
|
|
|
ObjCompras.Dispose()
|
|
End Sub
|
|
|
|
Protected Sub LimpiaPA_Vta_ReporteGastosCentroCostoGet()
|
|
TxtPA_VfechaInicio.Text = ""
|
|
TxtPA_VfechaFin.Text = ""
|
|
UPModalPA_V.Update()
|
|
End Sub
|
|
|
|
Protected Sub BtnPA_VFiltrar_Click(sender As Object, e As System.EventArgs)
|
|
|
|
RfechaInicio = TxtPA_VfechaInicio.Text.ToDate()
|
|
RfechaFin = TxtPA_VfechaFin.Text.ToDate()
|
|
|
|
CargaPA_Vta_ReporteGastosCentroCostoGet()
|
|
|
|
RegistraScript("$('#DModalPA_Vta_ReporteGastosCentroCostoGet').modal('hide');")
|
|
End Sub
|
|
|
|
Private Sub GVPA_Vta_ReporteGastosCentroCostoGet_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVPA_Vta_ReporteGastosCentroCostoGet.RowDataBound
|
|
|
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
If e.Row.DBCampo("Clasificacion") = "" Then
|
|
e.Row.CssClass = "Totales"
|
|
End If
|
|
End If
|
|
End Sub
|
|
End Class |