-- pestaña de ER Hor por proyecto

This commit is contained in:
2024-07-13 17:05:24 -07:00
parent 958d27fd01
commit 20f372e608
3 changed files with 803 additions and 56 deletions

View File

@@ -6455,6 +6455,35 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function GetEstadosProyectoHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional VistaPorcentaje As Integer = 1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_EstadoResultadosProyectoHorizontal")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@Divisor", SqlDbType.Int).Value = Divisor
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje
End With
SqlAdapter.SelectCommand.CommandTimeout = 0
Try
SqlAdapter.Fill(DSet)
Retorno = True
Catch ex As Exception
Me.OnError("Ocurrió un error al obtener el Estado de resultados Proyectos horizontal", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
Public Function UpdateTraspasoPrepoliza(CveEmpresa As Integer, CveCuenta As Integer, CveCuentaNueva As Integer) As Boolean

View File

@@ -1578,6 +1578,307 @@
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabProyecto" runat="server" HeaderText="-" Visible="false">
<ContentTemplate>
<div class="">
<asp:UpdatePanel ID="UpDatosProyectoH" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:GridView ID="GvIngresosProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto,CountDinamico" OnRowDataBound="GvIngresosProyectoH_RowDataBound" ShowHeaderWhenEmpty="true"
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="1" data-heightmenos="300"
Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField HeaderStyle-HorizontalAlign="Left">
<HeaderTemplate>
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="INGRESOS Y OTROS BENEFICIOS"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
<asp:HyperLink ID="HLNombre" runat="server" Text='<%# Eval("Nombre")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" />
<HeaderStyle HorizontalAlign="Left" Width="291px" />
</asp:TemplateField>
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:TemplateField HeaderText="Acumulado">
<ItemTemplate>
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="%" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" >
<ItemTemplate>
<asp:Label ID="LblPorcentajeAcumulado" runat="server" Text='<%# Eval("PorcentajeAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%>
</Columns>
</asp:GridView>
<br />
<br />
<asp:GridView ID="GvGastosProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto,CountDinamico" OnRowDataBound="GvGastosProyectoH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemStyle HorizontalAlign="Left" />
<HeaderTemplate>
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="GASTOS Y OTRAS PÉRDIDAS"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" Width="400px" />
</asp:TemplateField>
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="115px" />
<%-- <asp:TemplateField HeaderText="Período Actual">
<ItemTemplate>
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>--%>
<%-- <asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%>
<asp:TemplateField HeaderText="Acumulado">
<ItemTemplate>
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
</Columns>
</asp:GridView>
<br />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -304,7 +304,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
End Property
Private Property CountDinamicoSubProyecto As Integer
Get
@@ -323,6 +322,67 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
#End Region
#Region " P R O Y E C T O H O R I Z O N T A L "
Private Property DtDatosProyectoH As DataTable
Get
DtDatosProyectoH = DirectCast(ViewState("DtDatosProyectoH"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DtDatosProyectoH") = value
End Set
End Property
Private Property DtIngresosProyectoH As DataTable
Get
DtIngresosProyectoH = DirectCast(ViewState("DtIngresosProyectoH"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DtIngresosProyectoH") = value
End Set
End Property
Private Property DtGastosProyectoH As DataTable
Get
DtGastosProyectoH = DirectCast(ViewState("DtGastosProyectoH"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DtGastosProyectoH") = value
End Set
End Property
Private Property DTTotalesProyectoH As DataTable
Get
DTTotalesProyectoH = DirectCast(ViewState("DTTotalesProyectoH"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DTTotalesProyectoH") = value
End Set
End Property
Private Property DTProyectosCabecerasH As DataTable
Get
DTProyectosCabecerasH = DirectCast(ViewState("DTProyectosCabecerasH"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DTProyectosCabecerasH") = value
End Set
End Property
Private Property CountDinamicoProyecto As Integer
Get
If ViewState("CountDinamicoProyecto") Is Nothing Then
Return 0
Else
Return ViewState("CountDinamicoProyecto").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CountDinamicoProyecto") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
@@ -347,13 +407,15 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
TotalActualMes = 0
TotalAnteriorMes = 0
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then
TabProyecto.Visible = True
TabProyecto.HeaderText = UsuarioActual.Empresa.Funcionalidad(307)
End If
CargaEjercicios()
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
TabSubProyecto.HeaderText = LblProyecto.Text & " " & LblSubProyecto.Text & " "
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual)
ValidaEjercicios()
@@ -370,9 +432,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
DVVistaPorcentaje.Visible = False
If Tab.ActiveTabIndex = 0 Then
'LiSubProyectoDdl.Visible = True
'LiSubProyectoLbl.Visible = True
LiEjercicioDdl.Visible = True
LiEjercicioLbl.Visible = True
@@ -390,19 +449,13 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
End If
If Tab.ActiveTabIndex = 1 Then
'LiSubProyectoDdl.Visible = True
'LiSubProyectoLbl.Visible = True
LiEjercicioDdl.Visible = True
LiEjercicioLbl.Visible = True
LiEjercicioDdl2.Visible = False
LiEjercicioLbl2.Visible = False
LiPeriodoDdl.Visible = True
LiPeriodoLbl.Visible = True
LiDivisorDdl.Visible = True
LiDivisorLbl.Visible = True
@@ -410,37 +463,25 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
LblTri.Visible = True
DVTri.Visible = True
LblVistaPorcentaje.Visible = True
DVVistaPorcentaje.Visible = True
End If
If Tab.ActiveTabIndex = 2 Then
ValidaEjercicios()
'LiSubProyectoDdl.Visible = True
'LiSubProyectoLbl.Visible = True
LiEjercicioDdl.Visible = True
LiEjercicioLbl.Visible = True
LiEjercicioDdl2.Visible = True
LiEjercicioLbl2.Visible = True
LiPeriodoDdl.Visible = False
LiPeriodoLbl.Visible = False
LiDivisorDdl.Visible = True
LiDivisorLbl.Visible = True
LblTri.Visible = False
DVTri.Visible = False
DdlPeriodo.SelectedValueExist(12)
LblVistaPorcentaje.Visible = True
DVVistaPorcentaje.Visible = True
@@ -452,25 +493,18 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
LiEjercicioDdl.Visible = True
LiEjercicioLbl.Visible = True
LiEjercicioDdl2.Visible = False
LiEjercicioLbl2.Visible = False
LiDivisorDdl.Visible = True
LiDivisorLbl.Visible = True
LblTri.Visible = False
DVTri.Visible = False
LiPeriodoDdl.Visible = True
LiPeriodoLbl.Visible = True
DdlPeriodo.SelectedValueExist(12)
LblVistaPorcentaje.Visible = True
DVVistaPorcentaje.Visible = True
End If
UpFiltros.Update()
@@ -487,25 +521,17 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Private Sub ValidaEjercicios()
Dim EInicio As Integer = DdlEjercicio.SelectedValue.ToEntero
If EInicio > DdlEjercicio2.SelectedValue.ToEntero Then
If DdlEjercicio2.Items.Count > 0 Then
DdlEjercicio2.SelectedIndex = DdlEjercicio2.Items.Count - 1
End If
Dim Fejerciosio As Integer = DdlEjercicio2.SelectedValue.ToEntero
If Not EInicio + 1 > Fejerciosio Then
DdlEjercicio2.SelectedValueExist(EInicio + 1)
End If
End If
UpFiltros.Update()
End Sub
@@ -559,15 +585,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
CargaDatosSubProyectoH()
End If
'PROYECTO
If Tab.ActiveTabIndex = 4 Then
CargaDatosProyectoH()
End If
End Sub
#Region "MES"
Private Sub CargaDatosMes()
FechaIMes = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
FechaFMes = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaIMes))).ToString("dd/MM/yyyy")
'Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero 'If(ReporteComplementario, DdlTipoReporte.SelectedValue.ToEntero, 1)
@@ -647,7 +674,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
DtGastosMes.Rows.Add(Row)
End If
GvIngresosMes.DataSource = DtIngresosMes
GvIngresosMes.DataBind()
@@ -658,12 +684,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
End Sub
Private Sub SumaTotales()
'Llena Lb´s Totales
If DdlDivisor.SelectedValue.ToEntero > 1 Then
LbTotalActual.Text = TotalActualMes.ToString("###,###,##0")
LbTotalAnterior.Text = TotalAnteriorMes.ToString("###,###,##0")
@@ -671,9 +694,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
LbTotalActual.Text = TotalActualMes.ToString("###,###,##0.00")
LbTotalAnterior.Text = TotalAnteriorMes.ToString("###,###,##0.00")
End If
LbTotalActual.ForeColor = If(TotalActualMes < 0, Drawing.Color.Red, Color.Black)
LbTotalAnterior.ForeColor = If(TotalAnteriorMes < 0, Drawing.Color.Red, Color.Black)
@@ -761,13 +781,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
#End Region
#End Region
#Region "M E S H O R I Z O N T A L"
Private Sub CargaDatosMesH()
@@ -1591,7 +1606,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
#End Region
#Region "Anual H O R I Z O N T A L"
Private Sub CargaDatosAnualH()
@@ -2457,8 +2471,411 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
End Sub
#End Region
#Region " P R O Y E C T O - H O R I Z O N T A L"
Private Sub CargaDatosProyectoH()
If ChkAcumulados.Checked Then
FechaIMes = $"01/01/{DdlEjercicio.SelectedValue}"
Else
FechaIMes = $"01/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}"
End If
FechaFMes = $"01/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}"
FechaFMes = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaFMes))).ToString("dd/MM/yyyy")
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero
CveProyecto = DdlProyecto.SelectedValue.ToEntero
Dim ObjConta As New ClsContabilidad
If ObjConta.GetEstadosProyectoHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, VistaPorcentaje:=DdlvistaPorcentaje.SelectedValue.ToEntero) Then
DTProyectosCabecerasH = ObjConta.DSResultados.Tables(0)
DtDatosProyectoH = ObjConta.DSResultados.Tables(1).FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
'se limpian los subproyectos con importe cero
Dim IndexData As Integer = 1
Dim ColumnasEliminar As New ArrayList
For Each dColumn As DataColumn In DtDatosProyectoH.Columns
'si el nombre es numerico, s la clave del subproyecto
If dColumn.ColumnName.ToEntero > 0 Then
If DtDatosProyectoH.MAX(String.Format("[{0}]", dColumn.ColumnName)).ToDecimal = 0 Then
ColumnasEliminar.Add(dColumn.ColumnName)
End If
End If
Next
If ColumnasEliminar.Count > 0 Then
For Each columna As String In ColumnasEliminar
DtDatosProyectoH.Columns.Remove(columna)
Dim drrs As DataRow() = DTProyectosCabecerasH.Select($"CveProyecto = {columna}") 'limpio los valores
For Each drt As DataRow In drrs
DTProyectosCabecerasH.Rows.Remove(drt)
Next
Next
End If
Else
DtDatosProyectoH = Nothing
Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
End If
ObjConta.Dispose()
If DtDatosProyectoH IsNot Nothing And DTProyectosCabecerasH IsNot Nothing Then
CargaGridsProyectoH()
End If
End Sub
Private Sub CargaGridsProyectoH()
DtIngresosProyectoH = DtDatosProyectoH.FiltraParametros("Tipo ='H' ")
DtGastosProyectoH = DtDatosProyectoH.FiltraParametros("Tipo ='G' ")
DTTotalesProyectoH = DtDatosProyectoH.Clone()
Dim Row As DataRow = DtIngresosProyectoH.NewRow
Dim TotalActual As Decimal = 0, TotalAnterior As Decimal = 0
Dim IndexData As Integer = 0
Dim IndexGv As Integer = 1
Dim IndexMax As Integer = 1
Dim IndexProyecto As Integer = 0
Dim IndexProyectoMax As Integer = DTProyectosCabecerasH.Rows.Count - 1
If IndexProyectoMax > GvIngresosProyectoH.Columns.Count - 2 Then
IndexProyectoMax = GvIngresosProyectoH.Columns.Count - 2
End If
Dim IndexTotales As Integer = 13 + IndexProyectoMax
If IndexTotales > DtIngresosProyectoH.Columns.Count - 2 Then
IndexTotales = DtIngresosProyectoH.Columns.Count - 2
End If
'34
Dim IDX_LIMPIAR As Integer = 1
For IDX_LIMPIAR = 1 To GvIngresosProyectoH.Columns.Count - 3
CType(GvIngresosProyectoH.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing
CType(GvIngresosProyectoH.Columns(IDX_LIMPIAR), BoundField).HeaderText = ""
GvIngresosProyectoH.Columns(IDX_LIMPIAR).Visible = False
Next
listaCampos.Clear()
Dim DTProcesaColumnas As DataTable = If(DtIngresosProyectoH.Rows.Count > 0, DtIngresosProyectoH, DtGastosProyectoH)
For Each dColumn As DataColumn In DTProcesaColumnas.Columns
If IndexData >= 13 Then
If IndexProyecto <= IndexProyectoMax Then
If GvIngresosProyectoH.Columns(IndexGv).GetType.Name = "BoundField" Then
CType(GvIngresosProyectoH.Columns(IndexGv), BoundField).DataField = dColumn.ColumnName
GvIngresosProyectoH.Columns(IndexGv).Visible = True
CType(GvGastosProyectoH.Columns(IndexGv), BoundField).DataField = dColumn.ColumnName
GvGastosProyectoH.Columns(IndexGv).Visible = True
If IndexProyecto <= IndexProyectoMax Then
Dim TxtSub As String = GlobalDTProyectos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Proyecto", $" CveProyecto={dColumn.ColumnName.ToEntero}")
CType(GvIngresosProyectoH.Columns(IndexGv), BoundField).HeaderText = TxtSub
CType(GvGastosProyectoH.Columns(IndexGv), BoundField).HeaderText = TxtSub
CType(GvIngresosProyectoH.Columns(IndexGv + 1), BoundField).HeaderText = "%"
CType(GvGastosProyectoH.Columns(IndexGv + 1), BoundField).HeaderText = "%"
If (dColumn.ColumnName.ToString.ToEntero > 0 Or dColumn.ColumnName = "SinProyecto") Then
CType(GvIngresosProyectoH.Columns(IndexGv + 1), BoundField).DataField = $"Porcentaje{dColumn.ColumnName}"
GvIngresosProyectoH.Columns(IndexGv + 1).Visible = True
CType(GvGastosProyectoH.Columns(IndexGv + 1), BoundField).DataField = $"Porcentaje{dColumn.ColumnName}"
GvGastosProyectoH.Columns(IndexGv + 1).Visible = True
End If
If dColumn.ColumnName = "SinProyecto" Then
GvIngresosProyectoH.Columns(IndexGv).Visible = False
GvIngresosProyectoH.Columns(IndexGv + 1).Visible = False
End If
End If
listaCampos.Add(New String() {dColumn.ColumnName.ToString(), DTProyectosCabecerasH.FiltroPrimeroValor("Proyecto", $"CveProyecto = {dColumn.ColumnName}")})
End If
Else
If IndexGv < GvIngresosProyectoH.Columns.Count Then
GvIngresosProyectoH.Columns(IndexGv).Visible = False
Else
Exit For
End If
End If
IndexGv = IndexGv + 2
IndexProyecto = IndexProyecto + 1
IndexMax = IndexMax + 1
End If
IndexData = IndexData + 1
If dColumn.ColumnName = "SinProyecto" Then
'Continue For
Exit For
End If
Next
If DtIngresosProyectoH.Rows.Count > 0 Then
For Each dr As DataRow In DtIngresosProyectoH.FiltraParametros("Not CtaMayor In (3,4)").Rows
TotalActual += dr("ImporteActual").ToString.ToDecimal
TotalAnterior += dr("ImporteAcumulado").ToString.ToDecimal
Next
IndexData = 13
For IndexData = 13 To IndexTotales
If DtIngresosProyectoH.Columns(IndexData).ColumnName.ToEntero > 0 Then 'filtro solo los que tienen número
Row.Item(IndexData) = DtIngresosProyectoH.SUM($"[{DtIngresosProyectoH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)")
If DtIngresosProyectoH.SUM($"[{DtIngresosProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") <> 0 Then
If DdlvistaPorcentaje.SelectedValue.ToEntero = 1 Then
Row.Item($"Porcentaje{DtIngresosProyectoH.Columns(IndexData).ColumnName}") = DtIngresosProyectoH.SUM($"[{DtIngresosProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtIngresosProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
Else
Dim TotalProyectoIngreso As Decimal = DtIngresosProyectoH.FiltroPrimeroValor($"{DtIngresosProyectoH.Columns(IndexData).ColumnName}").ToDecimal
Dim TotalCuentaIngreso As Decimal = DtIngresosProyectoH.SUMD($"[{DtIngresosProyectoH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)")
Row.Item($"Porcentaje{DtIngresosProyectoH.Columns(IndexData).ColumnName}") = TotalCuentaIngreso * 100 / TotalProyectoIngreso
End If
Else
Row.Item($"Porcentaje{DtIngresosProyectoH.Columns(IndexData).ColumnName}") = "0"
End If
End If
Next
Row.Item("Nombre") = "TOTAL INGRESOS "
Row.Item("ImporteActual") = DtIngresosProyectoH.SUM("ImporteActual", "Not CtaMayor In (3,4)") 'TotalActual.ToString
Row.Item("PorcentajeActual") = 100.0
Row.Item("ImporteAcumulado") = DtIngresosProyectoH.SUM("ImporteAcumulado", "Not CtaMayor In (3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1
Row.Item("CountDinamico") = DtIngresosProyectoH.MAX("CountDinamico")
CountDinamicoProyecto = DtIngresosProyectoH.MAX("CountDinamico").ToEntero
DtIngresosProyectoH.Rows.Add(Row)
Else
Row.Item("Nombre") = "INGRESOS "
Row.Item("ImporteActual") = "0.00"
Row.Item("ImporteAcumulado") = "0.00"
Row.Item("CtaMayor") = -1
DtIngresosProyectoH.Rows.Add(Row)
End If
DtIngresosProyectoH.Rows.Add(DtIngresosProyectoH.NewRow())
Dim T1 As Decimal = TotalActual, T2 As Decimal = TotalAnterior
TotalActual = 0
TotalAnterior = 0
Row = DtGastosProyectoH.NewRow
If DtIngresosProyectoH.Rows.Count > 0 Then
Row = DTTotalesProyectoH.NewRow
IndexData = 13
For IndexData = 13 To IndexTotales
If DtIngresosProyectoH.Columns(IndexData).ColumnName.ToEntero > 0 Then 'filtro solo los que tienen número
Dim TotalProyectoIngreso As Decimal = DtIngresosProyectoH.SUMD($"[{DtIngresosProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1, 3,4)")
Dim TotalProyectoEgreso As Decimal = DtGastosProyectoH.SUMD($"[{DtGastosProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1, 3,4)")
Row.Item(IndexData) = TotalProyectoIngreso - TotalProyectoEgreso
'Row.Item(IndexData) = DtIngresosProyectoH.SUM($"[{DtIngresosProyectoH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DtGastosProyectoH.SUM($"[{DtGastosProyectoH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)")
If TotalProyectoIngreso <> 0 Or TotalProyectoEgreso <> 0 Then
If DdlvistaPorcentaje.SelectedValue.ToEntero = 1 Then
Row.Item($"Porcentaje{DtIngresosProyectoH.Columns(IndexData).ColumnName}") = DtIngresosProyectoH.SUM($"[{DtIngresosProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1, 3,4)") * 100 / DtIngresosProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
Row.Item($"Porcentaje{DtIngresosProyectoH.Columns(IndexData).ColumnName}") = (TotalProyectoIngreso - TotalProyectoEgreso) * 100 / DtIngresosProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
Else
Row.Item($"Porcentaje{DtIngresosProyectoH.Columns(IndexData).ColumnName}") = (TotalProyectoIngreso - TotalProyectoEgreso) * 100 / TotalProyectoIngreso
End If
Else
Row.Item($"Porcentaje{DtIngresosProyectoH.Columns(IndexData).ColumnName}") = "0"
End If
End If
Next
Dim totalTemp As Decimal = DtIngresosProyectoH.SUMD($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)") - DtGastosProyectoH.SUMD($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)")
Row.Item("Nombre") = "Resultado del ejercicio"
Row.Item("ImporteAcumulado") = DtIngresosProyectoH.SUM($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)") - DtGastosProyectoH.SUM($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)")
Row.Item("CtaMayor") = -2
Row.Item("CountDinamico") = DtIngresosProyectoH.MAX("CountDinamico").ToString.ToEntero
If DtIngresosProyectoH.SUMD($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)") <> 0 Then
Row.Item("PorcentajeAcumulado") = (totalTemp * 100 / DtIngresosProyectoH.SUMD($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)"))
End If
DTTotalesProyectoH.Rows.Add(Row)
End If
DtIngresosProyectoH.Merge(DtGastosProyectoH)
DtIngresosProyectoH.Merge(DTTotalesProyectoH)
GvIngresosProyectoH.DataSource = DtIngresosProyectoH
GvIngresosProyectoH.DataBind()
UpDatosProyectoH.Update()
End Sub
'Private Sub SumaTotalesProyectoH()
' ''Llena Lb´s Totales
' ''*********************************************************************************
' 'LbTotalActual.Text = TotalActualMes.ToString.FormatoNumero
' 'LbTotalAnterior.Text = TotalAnteriorMes.ToString.FormatoNumero
' 'LbTotalActual.ForeColor = If(TotalActualMes < 0, Drawing.Color.Red, Color.Black)
' 'LbTotalAnterior.ForeColor = If(TotalAnteriorMes < 0, Drawing.Color.Red, Color.Black)
'End Sub
Protected Sub GvIngresosProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.FCHyperLink("Hypgrafica").Visible = If(e.Row.DBCampo("Nombre").ToString.Length > 0, True, False)
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
TotalActualMes += e.Row.DBCampo("ImporteActual").ToString.ToDouble
TotalAnteriorMes += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
e.Row.ControlStyle.Font.Bold = True
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
'e.Row.CssClass = "SubTotales3"
e.Row.ControlStyle.Font.Bold = True
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -2 Then
e.Row.ControlStyle.Font.Bold = True
e.Row.ControlStyle.Font.Size = 13
End If
Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
'setgraficaCC(e)
'Dim CveProyecto As Integer = e.Row.DataKey("CveProyecto").ToEntero
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoCC.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveProyecto={DdlProyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
Dim IndiceInicio As Integer = 1
Dim IndiceMax As Integer = 1 + CountDinamico
Dim FEchaMesFinal As Date = New Date(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, 1).LastDayOfMonth
If IndiceMax > GvIngresosProyectoH.Columns.Count - 3 Then
IndiceMax = GvIngresosProyectoH.Columns.Count - 3
End If
For IndiceInicio = 1 To IndiceMax
If GvGastosProyectoH.Columns(IndiceInicio).GetType.Name = "BoundField" Then
Dim CveProyectoInterno As String = CType(GvGastosProyectoH.Columns(IndiceInicio), BoundField).DataField
Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
If CveProyectoInterno.ToEntero > 0 Then
e.Row.Cells(IndiceInicio).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString}&FI={e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString}&ER=1&CveProyecto={CveProyectoInterno}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
End If
End If
Next IndiceInicio
e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoCC.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveProyecto={DdlProyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
Dim IndiceInicio As Integer = 1
Dim IndiceMax As Integer = 1 + CountDinamico
If IndiceMax > GvIngresosProyectoH.Columns.Count - 3 Then
IndiceMax = GvIngresosProyectoH.Columns.Count - 3
End If
For IndiceInicio = 1 To IndiceMax
Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
e.Row.Cells(IndiceInicio).Text = $"<div { If(Importe < 0, "style='color:Red;'", "style='color:#000000;'") } ><strong>{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</strong></div>"
Next IndiceInicio
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -2 Then
Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
Dim IndiceInicio As Integer = 1
Dim IndiceMax As Integer = 1 + CountDinamico
If IndiceMax > GvIngresosProyectoH.Columns.Count - 3 Then
IndiceMax = GvIngresosProyectoH.Columns.Count - 3
End If
For IndiceInicio = 1 To IndiceMax
Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
e.Row.Cells(IndiceInicio).Text = $"<div { If(Importe < 0, "style='color:Red;'", "style='color:#000000;'") } ><strong>{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</strong></div>"
Next IndiceInicio
End If
e.Row.FCHyperLink("HLAnterior").Text = If(DdlDivisor.SelectedValue.ToEntero > 1, e.Row.DBCampo("ImporteAcumulado").ToString.ToDecimal.ToString("###,###,##0"), e.Row.DBCampo("ImporteAcumulado").ToString.ToDecimal.ToString("###,###,##0.00"))
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
End If
End If
End Sub
Protected Sub GvGastosProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
'setgraficaCC(e)
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
TotalActualMes -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
TotalAnteriorMes -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
e.Row.ControlStyle.Font.Bold = True
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
'e.Row.CssClass = "SubTotales"
e.Row.ControlStyle.Font.Bold = True
End If
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
End If
Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
Dim IndiceInicio As Integer = 1
Dim IndiceMax As Integer = 1 + CountDinamico
For IndiceInicio = 1 To IndiceMax Step 2
Dim Anio As String = CType(GvGastosAnualH.Columns(IndiceInicio), BoundField).DataField
Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
e.Row.Cells(IndiceInicio).ForeColor = Color.Red
Next IndiceInicio
End If
End Sub
Protected Sub GvTotalesProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.Header Then
' e.Row.Attributes.Add("style", "display:none")
End If
If e.Row.RowType = DataControlRowType.DataRow Then
'setgraficaCC(e)
e.Row.Attributes.Add("style", "Font-weight: bold")
Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
Dim IndiceInicio As Integer = 1
Dim IndiceMax As Integer = 1 + CountDinamico
For IndiceInicio = 1 To IndiceMax Step 2
Dim Anio As String = CType(GvGastosAnualH.Columns(IndiceInicio), BoundField).DataField
Dim Importe As Decimal = e.Row.Cells(IndiceInicio).Text.ToDecimal
e.Row.Cells(IndiceInicio).Text = $"<label { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") }>{If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00"))}</label>"
Next IndiceInicio
End If
End Sub
Public Sub setgraficaProyCC(e As GridViewRowEventArgs)
Dim lista As New List(Of Object)
Dim colorindex As Integer = 0
For Each campo As String() In listaCampos
'Dim valorCampo As Decimal = If(e.Row.DBCampo(campo(0)).ToDecimal() < 0, (e.Row.DBCampo(campo(0)).ToDecimal() * -1), e.Row.DBCampo(campo(0)).ToDecimal())
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
colorindex = colorindex + 1
If colorindex >= listacolores.Count Then
colorindex = 0
End If
Next
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
End Sub
#End Region
#Region "DESCARGA EXCEL"