Imports Extensiones Partial Class Contabilidad_DiarioVentas Inherits ClsPaginas Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then Dim Conta As New ClsContabilidad If Conta.GetDiarioVentas(UsuarioActual.CveEmpresa) Then GvD.DataSource = Conta.DtResultados End If Conta.Dispose() GvD.DataBind() End If End Sub Protected Sub GvD_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowCreated If e.Row.RowType = DataControlRowType.Header Then e.Row.Cells(0).Width = Unit.Pixel(350) e.Row.Cells(1).Width = Unit.Pixel(70) e.Row.Cells(2).Width = Unit.Pixel(100) e.Row.Cells(3).Width = Unit.Pixel(150) e.Row.Cells(4).Width = Unit.Pixel(80) e.Row.Cells(4).Width = Unit.Pixel(70) End If If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.DBCampo("CvePS") = "" Then e.Row.Height = Unit.Pixel(22) e.Row.CssClass = "SubTotales" Else 'e.Row.Cells(1).ColumnSpan = 2 'e.Row.Cells.RemoveAt() e.Row.Cells(5).ColumnSpan = 4 e.Row.Cells.RemoveAt(6) : e.Row.Cells.RemoveAt(6) : e.Row.Cells.RemoveAt(6) End If End If End Sub Protected Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.DBCampo("CvePS") = "" Then e.Row.Cells(6).Text = e.Row.DBCampo("RetIVA").FormatoNumero e.Row.Cells(7).Text = e.Row.DBCampo("RetISR").FormatoNumero e.Row.Cells(8).Text = e.Row.DBCampo("Total").FormatoNumero Else e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right e.Row.Cells(1).Text = e.Row.DBCampo("Proyecto") e.Row.Cells(2).Text = e.Row.DBCampo("SubProyecto") e.Row.Cells(3).Text = "" e.Row.Cells(4).Text = e.Row.DBCampo("SubTotalPS").FormatoNumero e.Row.FCDropDownList("DdlM").Visible = True e.Row.FCLiteral("LtlIVA").Visible = False End If End If End Sub End Class