Proveedores Abonar, se quitan validaciones de cuentas depósitos en Pago por grupos

This commit is contained in:
Rakcsle Supertramp
2020-04-06 12:55:35 -07:00
parent 49a0b83290
commit 268d1f56ed
4 changed files with 174 additions and 86 deletions

View File

@@ -2514,16 +2514,18 @@ Partial Class Bancos_ProveedoresAbonar
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'")
DdlCuentaDeposito.DataSource = Dep.DtResultados '.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'")
Else
Alert("El proveedor no tiene cuentas deposito registradas.")
End If
If Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
BtnIEGuardar.Enabled = False
Alert("El proveedor no tiene ninguna cuenta deposito registrada ante el sistema BBVA BANCOMER", TipoMensaje.MsgAdvertencia)
End If
'If Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then
' trCuentaDeposito.Visible = True
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
'Else
' BtnIEGuardar.Enabled = False
' Alert("El proveedor no tiene ninguna cuenta deposito registrada ", TipoMensaje.MsgAdvertencia)
'End If
Else
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")

View File

@@ -558,7 +558,7 @@
<asp:UpdatePanel ID="UpDatosAnualH" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:GridView ID="GvIngresosAnualH" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresosAnualH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<asp:GridView ID="GvIngresosAnualH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto,CountDinamico" OnRowDataBound="GvIngresosAnualH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
@@ -597,6 +597,32 @@
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<%-- <asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" DataNavigateUrlFields="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto" DataNavigateUrlFormatString="/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" Target="_blank" />--%>
<%--<asp:TemplateField HeaderText="Período Actual">
<ItemTemplate>
@@ -617,7 +643,7 @@
</asp:GridView>
<br />
<br />
<asp:GridView ID="GvGastosAnualH" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastosAnualH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<asp:GridView ID="GvGastosAnualH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto,CountDinamico" OnRowDataBound="GvGastosAnualH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
@@ -631,7 +657,7 @@
<HeaderStyle HorizontalAlign="Left" Width="400px" />
</asp:TemplateField>
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
@@ -678,7 +704,7 @@
</asp:GridView>
<br />
<br />
<asp:GridView ID="GvTotalesAnualH" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvTotalesAnualH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<asp:GridView ID="GvTotalesAnualH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto,CountDinamico" OnRowDataBound="GvTotalesAnualH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
@@ -692,6 +718,8 @@
<ItemStyle HorizontalAlign="Left" Width="400px" />
</asp:TemplateField>
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
@@ -771,7 +799,7 @@
<asp:UpdatePanel ID="UpDatosSubProyectoH" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:GridView ID="GvIngresosSubProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresosSubProyectoH_RowDataBound" ShowHeaderWhenEmpty="true"
<asp:GridView ID="GvIngresosSubProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto,CountDinamico" OnRowDataBound="GvIngresosSubProyectoH_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>
@@ -842,7 +870,7 @@
</asp:GridView>
<br />
<br />
<asp:GridView ID="GvGastosSubProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastosSubProyectoH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<asp:GridView ID="GvGastosSubProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto,CountDinamico" OnRowDataBound="GvGastosSubProyectoH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
@@ -913,7 +941,7 @@
</asp:GridView>
<br />
<br />
<asp:GridView ID="GvTotalesSubProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvTotalesSubProyectoH_RowDataBound" ShowHeader="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<asp:GridView ID="GvTotalesSubProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto,CountDinamico" OnRowDataBound="GvTotalesSubProyectoH_RowDataBound" ShowHeader="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>

View File

@@ -740,19 +740,33 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
e.Row.ControlStyle.Font.Bold = True
End If
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
'End If
'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
'End If
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
End If
'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
'End If
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
End If
End If
End If
End Sub
Protected Sub GvGastosMesH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
@@ -766,17 +780,29 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
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("CtaMayor").ToString.ToEntero > 0 Then
Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
End If
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
'End If
'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
'End If
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
End If
@@ -822,7 +848,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
If DtDatosAnualH IsNot Nothing Then
CargaGridsAnualH()
SumaTotalesAnualH()
End If
End Sub
@@ -855,12 +881,17 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
CType(GvIngresosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
CType(GvIngresosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
GvIngresosAnualH.Columns(IndexGv).Visible = True
'CType(GvIngresosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
'CType(GvIngresosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
GvIngresosAnualH.Columns(IndexGv).Visible = True
CType(GvTotalesAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
CType(GvTotalesAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
'CType(GvTotalesAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
'CType(GvTotalesAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
GvTotalesAnualH.Columns(IndexGv).Visible = True
IndexMax = IndexData
@@ -925,9 +956,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
If IndexData >= 13 Then
If dCoumn.ColumnName.ToEntero > 0 And dCoumn.ColumnName.ToEntero <= DdlEjercicio2.SelectedValue.ToEntero Then
'HyperLinkField
CType(GvGastosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
CType(GvGastosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
'CType(GvGastosAnualH.Columns(IndexGv), HyperLinkField).DataNavigateUrlFields = {"CveCuenta", "FechaInicial", "FechaFActual", "CveSubProyecto"}
'CType(GvGastosAnualH.Columns(IndexGv), HyperLinkField).DataNavigateUrlFormatString = "/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}"
'CType(GvGastosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
'CType(GvGastosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
GvGastosAnualH.Columns(IndexGv).Visible = True
IndexMax = IndexData
Else
@@ -944,14 +982,14 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Next
For Each dr As DataRow In DtGastosAnualH.FiltraParametros("NOT CtaMayor in (3,4)").Rows
For Each dr As DataRow In DtGastosAnualH.FiltraParametros("Not CtaMayor In (3,4)").Rows
TotalActual += dr("ImporteActual").ToString.ToDouble
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
Next
IndexData = 13
For IndexData = 13 To IndexMax
Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)")
Next
Row.Item("Nombre") = "TOTAL GASTOS"
@@ -973,28 +1011,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Row = DTTotalesAnualH.NewRow
'Row.Item("Enero") = DtIngresosAnualH.SUM("Enero", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Enero", "NOT CtaMayor in (3,4)")
'Row.Item("Febrero") = DtIngresosAnualH.SUM("Febrero", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Febrero", "NOT CtaMayor in (3,4)")
'Row.Item("Marzo") = DtIngresosAnualH.SUM("Marzo", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Marzo", "NOT CtaMayor in (3,4)")
'Row.Item("Abril") = DtIngresosAnualH.SUM("Abril", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Abril", "NOT CtaMayor in (3,4)")
'Row.Item("Mayo") = DtIngresosAnualH.SUM("Mayo", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Mayo", "NOT CtaMayor in (3,4)")
'Row.Item("Junio") = DtIngresosAnualH.SUM("Junio", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Junio", "NOT CtaMayor in (3,4)")
'Row.Item("Julio") = DtIngresosAnualH.SUM("Julio", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Julio", "NOT CtaMayor in (3,4)")
'Row.Item("Agosto") = DtIngresosAnualH.SUM("Agosto", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Agosto", "NOT CtaMayor in (3,4)")
'Row.Item("Septiembre") = DtIngresosAnualH.SUM("Septiembre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Septiembre", "NOT CtaMayor in (3,4)")
'Row.Item("Octubre") = DtIngresosAnualH.SUM("Octubre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Octubre", "NOT CtaMayor in (3,4)")
'Row.Item("Noviembre") = DtIngresosAnualH.SUM("Noviembre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Noviembre", "NOT CtaMayor in (3,4)")
'Row.Item("Diciembre") = DtIngresosAnualH.SUM("Diciembre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Diciembre", "NOT CtaMayor in (3,4)")
IndexData = 13
For IndexData = 13 To IndexMax
Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)")
Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)")
Next
Row.Item("Nombre") = "Resultados del Ejercicio:"
Row.Item("Nombre") = "Resultados del Ejercicio"
'Row.Item("ImporteActual") = TotalActual.ToString
'Row.Item("PorcentajeActual") = "100.00"
Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosAnualH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)") - DtGastosAnualH.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)")
'Row.Item("PorcentajeAcumulado") = "100.00"
'Row.Item("CtaMayor") = -1
@@ -1015,21 +1041,13 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
End Sub
Private Sub SumaTotalesAnualH()
''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 GvIngresosAnualH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
TotalActualMes += e.Row.DBCampo("ImporteActual").ToString.ToDouble
TotalAnteriorMes += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
@@ -1041,14 +1059,25 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
e.Row.ControlStyle.Font.Bold = True
End If
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
'End If
'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
'End If
Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
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
Dim Anio As String = CType(GvGastosAnualH.Columns(IndiceInicio), BoundField).DataField
Dim Importe As String = e.Row.Cells(IndiceInicio).Text
e.Row.Cells(IndiceInicio).Text = $"<a target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{Anio}&FI=01/01/{Anio}&ER=1&CveSubProyecto={CveSubProyecto}' >{Importe}</a>"
Next IndiceInicio
e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{DdlEjercicio2.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyecto}"
End If
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
@@ -1069,14 +1098,22 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
e.Row.ControlStyle.Font.Bold = True
End If
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
'End If
Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
' e.Row.FCHyperLink("HLActual").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
Dim Anio As String = CType(GvGastosAnualH.Columns(IndiceInicio), BoundField).DataField
Dim Importe As String = e.Row.Cells(IndiceInicio).Text
e.Row.Cells(IndiceInicio).Text = $"<a target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{Anio}&FI=01/01/{Anio}&ER=1&CveSubProyecto={CveSubProyecto}' >{Importe}</a>"
Next IndiceInicio
e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{DdlEjercicio2.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyecto}"
End If
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
@@ -1339,14 +1376,31 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
e.Row.ControlStyle.Font.Size = 13
End If
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
'End If
'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
'End If
Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
'Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
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
For IndiceInicio = 1 To IndiceMax
Dim CveSubProyectoIntermo As String = CType(GvGastosSubProyectoH.Columns(IndiceInicio), BoundField).DataField
Dim Importe As String = e.Row.Cells(IndiceInicio).Text
e.Row.Cells(IndiceInicio).Text = $"<a target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={FEchaMesFinal.ToString("dd/MM/yyyy")}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyectoIntermo}' >{Importe}</a>"
Next IndiceInicio
e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={FEchaMesFinal.ToString("dd/MM/yyyy")}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={-1}"
End If
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red

View File

@@ -44,6 +44,10 @@