Option Explicit On Option Strict On Imports System.Data Imports Extensiones Partial Class Bancos_RepCobradoPagadoDetalle Inherits ClsPaginas Private Property Modalidad As Integer Get If ViewState("Modalidad") Is Nothing Then Return -1 Else Return DirectCast(ViewState("Modalidad"), Integer) End If End Get Set(value As Integer) ViewState("Modalidad") = value End Set End Property Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then InicializaValores() End If End Sub #Region "I N I C I A L I Z A V A L O R E S" Private Sub InicializaValores() If Request("FI") IsNot Nothing AndAlso Request("FI").Length > 0 Then txtFechaI.Text = Request("FI") End If If Request("FF") IsNot Nothing AndAlso Request("FF").Length > 0 Then txtFechaF.Text = Request("FF") End If Modalidad = Request("MOD").ToEntero 'If Request("MOD") IsNot Nothing AndAlso IsNumeric(Request("MOD")) AndAlso Request("MOD").ToEntero > 0 Then ' ' DdlModalidad.SelectedValue = Request("MOD") ' If Request("MOD").ToEntero = 1 Then ' GvDatos.Columns(1).HeaderText = "Fecha Venta" ' GvDatos.Columns(5).HeaderText = "Cobrado" ' ElseIf Request("MOD").ToEntero = 2 Then ' GvDatos.Columns(1).HeaderText = "Fecha Venta" ' GvDatos.Columns(5).HeaderText = "Cobrado" ' End If 'End If If Modalidad <> 0 Then CargaDatos() End If End Sub #End Region #Region " CARGA DATOS " Private Sub CargaDatos() Dim ObjMovtos As New ClsBancos() 'CxC Activas If ObjMovtos.GetCobradoPagadoDetalle(Modalidad, Request("Grupo").ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, Request("CveProyecto").ToEntero, Request("CveSubProyecto").ToEntero, Request("GPO"), Request("CveMoneda").ToEntero(), UsuarioActual.CveEmpresa, Request("TipoCambio").ToEntero, Request("TCEspecifico").ToDouble) Then GvDatos.DataSource = ObjMovtos.DtResultados End If ObjMovtos.Dispose() GvDatos.DataBind() UPDatos.Update() End Sub #End Region #Region "G V D A T O S" 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).Width = Unit.Pixel(250) ' e.Row.Cells(1).Width = Unit.Pixel(106) ' e.Row.Cells(2).Width = Unit.Pixel(106) ' e.Row.Cells(3).Width = Unit.Pixel(126) ' e.Row.Cells(4).Width = Unit.Pixel(106) ' e.Row.Cells(5).Width = Unit.Pixel(106) ' e.Row.Cells(6).Width = Unit.Pixel(106) ' e.Row.Cells(7).Width = Unit.Pixel(106) ' e.Row.CssClass = "Totales" ' e.Row.Style.Add("Color", "white") ' e.Row.FCHyperLink("HplFactura").NavigateUrl = $"/Ventas/Clientes.aspx?CveCliente={e.Row.DBCampo("CveCliente")}" 'End If 'If e.Row.DBCampo("CveVenta") = "" Then ' If e.Row.DBCampo("CveIE") <> "" Then ' e.Row.Cells(0).Text = String.Format("{0} - {1} - {2}", e.Row.DBCampo("Banco"), e.Row.DBCampo("NumCuenta"), e.Row.DBCampo("Moneda")) ' e.Row.FCLiteral("LtlFechaVenci").Text = e.Row.DBCampo("FechaDocumento").ToDate.ToShortDateString ' e.Row.FCHyperLink("HplCheque").Visible = True ' End If ' e.Row.BackColor = Drawing.Color.LightGray 'End If If e.Row.DataKey("Orden") = "" Then e.Row.CssClass = "Totales" e.Row.FCLiteral("LblFactura").Text = e.Row.DBCampo("GPO") ElseIf Modalidad = 2 Then e.Row.FCLiteral("LblFactura").Text = $"{e.Row.DBCampo("SerieFolio")}" ' e.Row.FCLiteral("LblProveedor").Text = $"{e.Row.DBCampo("ProveedorCliente")}" Else e.Row.FCLiteral("LblFactura").Text = $"{e.Row.DBCampo("SerieFolio")}" ' e.Row.FCLiteral("LblProveedor").Text = $"{e.Row.DBCampo("ProveedorCliente")}" End If End If End Sub #End Region End Class