Option Explicit On Option Strict On Imports Extensiones Partial Class RH_RepBuzonCalidad Inherits ClsPaginas Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then CargaCombos() End If End Sub Private Sub CargaCombos() 'CargaClientes Dim ObjClientes As New ClsClientes If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then DdlClientes.DataSource = ObjClientes.DtResultados Else DdlClientes.DataSource = Nothing End If ObjClientes.Dispose() DdlClientes.DataBind() 'Tipos de Buzón DdlTipoBuzon.DataSource = GlobalDTTipoBuzon DdlTipoBuzon.DataBind() End Sub Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click CargaDatos() UPDatos.Update() End Sub Private Sub CargaDatos() Dim ObjBuzon As New ClsRH() Dim FechaI, FechaF As String FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") If ObjBuzon.GetBuzonCalidad(DdlClientes.SelectedValue.ToEntero, DdlTipoBuzon.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, FechaI, FechaF, UsuarioActual.CveEmpresa) Then GvDatos.DataSource = ObjBuzon.DtResultados Else GvDatos.DataSource = Nothing End If ObjBuzon.Dispose() GvDatos.DataBind() End Sub Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowIndex = 0 Then e.Row.Cells(0).ColumnSpan = 2 e.Row.Cells(1).Visible = False e.Row.CssClass = "Totales" e.Row.FCLiteral("LtlGrupo").Text = "Total : " & e.Row.DBCampo("Cantidad") e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left ElseIf e.Row.DBCampo("CvePersonal") = String.Empty Then e.Row.Cells(0).ColumnSpan = 2 e.Row.Cells(1).Visible = False e.Row.CssClass = "SubTotales" 'e.Row.FCLiteral("LtlGrupo").Text = e.Row.DBCampo("Sucursal") & " : " & e.Row.DBCampo("Cantidad") e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left Else ' If System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & e.Row.DBCampo("CvePersonal") & ".png") Then e.Row.FCImage("ImgPersonal").ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & e.Row.DBCampo("CvePersonal") & ".png" End If e.Row.Cells(0).Visible = False e.Row.FCLiteral("LtlPersonal").Text = "" & e.Row.DBCampo("Personal") & "" e.Row.FCLiteral("LtlCliente").Text = "" & e.Row.DBCampo("Cliente") & "" End If End If End Sub Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString) End Sub End Class