From d907501341b7d09e2c432c3ef0f848b5aba03b15 Mon Sep 17 00:00:00 2001 From: jnunez Date: Sun, 2 Jun 2019 05:36:32 +0000 Subject: [PATCH] git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C494 --- .../FOPI/webforms/FOR/wfrCicloVida.aspx.cs | 2 + AYA.FROPI/FOPI/webforms/FOR/wfrCierre.aspx.cs | 2 + .../FOPI/webforms/FOR/wfrEvaluacion.aspx | 110 +++++++++-------- .../FOPI/webforms/FOR/wfrEvaluacion.aspx.cs | 2 + .../FOPI/webforms/FOR/wfrFinanciamiento.aspx | 10 +- .../webforms/FOR/wfrFinanciamiento.aspx.cs | 30 ++++- .../FOPI/webforms/FOR/wfrFormulario.aspx.cs | 2 + .../FOR/wfrInfoComplementaria.aspx.cs | 2 + .../FOPI/webforms/FOR/wfrInfoGeneral.aspx.cs | 2 + AYA.FROPI/FOPI/webforms/FOR/wfrPartidas.aspx | 116 ++++++++++-------- .../FOPI/webforms/FOR/wfrPartidas.aspx.cs | 32 ++++- .../FOPI/webforms/FOR/wfrRecurso.aspx.cs | 2 + 12 files changed, 201 insertions(+), 111 deletions(-) diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrCicloVida.aspx.cs b/AYA.FROPI/FOPI/webforms/FOR/wfrCicloVida.aspx.cs index 314bf1b84..750c6b31e 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrCicloVida.aspx.cs +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrCicloVida.aspx.cs @@ -118,6 +118,8 @@ public partial class webforms_FOR_wfrCicloVida : General llenarGridEtapas(); } + + ScriptManager.RegisterStartupScript(Page, typeof(Page), "Check", "validarEstado()", true); } catch (Exception ex) { diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrCierre.aspx.cs b/AYA.FROPI/FOPI/webforms/FOR/wfrCierre.aspx.cs index 7ecdf67f4..8f747413b 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrCierre.aspx.cs +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrCierre.aspx.cs @@ -117,6 +117,8 @@ public partial class webforms_FOR_wfrCierre : General llenarGrvLecciones(); llenarGrvComentarios(); } + + ScriptManager.RegisterStartupScript(Page, typeof(Page), "Check", "validarEstado()", true); } catch (Exception ex) { diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrEvaluacion.aspx b/AYA.FROPI/FOPI/webforms/FOR/wfrEvaluacion.aspx index 3ee0f795a..6ab6417fe 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrEvaluacion.aspx +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrEvaluacion.aspx @@ -58,7 +58,7 @@ <%-- ********** Menu tipo Nav Bar********** --%>
- Evaluación del Proyecto - <%-- ********** Datos ********** --%> +
+ +
- <%-- Analisis Riesgo o Desastre --%> -
+
-
+

Análisis de Riesgo a Desastres

-
+
-
+
-
+
-
+
-
+
-
+
@@ -131,35 +132,39 @@
- <%-- Analisis Ambiental --%> -
+
+ + +
+
-
+

Análisis Ambiental

-
+
-
+
-
+
-
+
+
-
+
-
+
@@ -167,10 +172,10 @@
-
+
-
+
@@ -180,45 +185,46 @@
+
<%-- Evaluación Financiera --%> -
+
-
+

Evaluación Financiera

-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -228,35 +234,35 @@
<%-- Evaluación Costos --%> -
+
-
+

Evaluación de Costos

-
+
-
+
-
+
-
+
-
+
-
+
@@ -266,51 +272,51 @@
<%-- Evaluación Económico Social --%> -
+
-
+

Evaluación Económico - Social

-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrEvaluacion.aspx.cs b/AYA.FROPI/FOPI/webforms/FOR/wfrEvaluacion.aspx.cs index cf83c6060..3489a080b 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrEvaluacion.aspx.cs +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrEvaluacion.aspx.cs @@ -103,6 +103,8 @@ public partial class webforms_FOR_wfrEvaluacion : General mostrarDatos(); } + + ScriptManager.RegisterStartupScript(Page, typeof(Page), "Check", "validarEstado()", true); } catch (Exception ex) { diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrFinanciamiento.aspx b/AYA.FROPI/FOPI/webforms/FOR/wfrFinanciamiento.aspx index 34a26ec1c..c695b332c 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrFinanciamiento.aspx +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrFinanciamiento.aspx @@ -96,7 +96,9 @@
-
+
+
+
@@ -223,11 +225,15 @@
+
-
+
+
+
+
diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrFinanciamiento.aspx.cs b/AYA.FROPI/FOPI/webforms/FOR/wfrFinanciamiento.aspx.cs index 72ca90170..c27424b5a 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrFinanciamiento.aspx.cs +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrFinanciamiento.aspx.cs @@ -36,6 +36,7 @@ using AyABL.ADM; using AyABL.AGP; using AyABL.FNP; using System.Web.UI.HtmlControls; +using AyABL.PPP; public partial class webforms_FOR_wfrFinanciamiento : General { @@ -85,6 +86,7 @@ public partial class webforms_FOR_wfrFinanciamiento : General FinanciamientoBL objFinanciamientoBL; EndeudamientoBL objEndeudamientoBL; ProyectoBL objProyectoBL; + DistribucionPartidaBL objDistribucionPartidaBL; #endregion @@ -125,6 +127,8 @@ public partial class webforms_FOR_wfrFinanciamiento : General llenarDDLDesembolsoF(); } + + ScriptManager.RegisterStartupScript(Page, typeof(Page), "Check", "validarEstado()", true); } catch (Exception ex) { @@ -1389,16 +1393,31 @@ public partial class webforms_FOR_wfrFinanciamiento : General //Limpiar el datagrid detalleGRVDatos(null, grvTotalFinanciamiento); + objDistribucionPartidaBL = new DistribucionPartidaBL(); objFinanciamientoBL = new FinanciamientoBL(); + objFinanciamientoBL.objFinanciamientoEL.Proyecto = Int32.Parse(Session["PKPROYECTO"].ToString()); + objDistribucionPartidaBL.objDistribucionPartidaEL.Proyecto = Int32.Parse(Session["PKPROYECTO"].ToString()); DataSet dsRecursos = objFinanciamientoBL.getTotalFinanciamiento(); + DataSet dsPartidas = objDistribucionPartidaBL.getTotalPartida(); if (dsRecursos.Tables.Count == 0) dsRecursos.Tables.Add(); detalleGRVDatos(dsRecursos, grvTotalFinanciamiento); - decimal vMontoTotal = 0M; + decimal vMontoTotalFinanciamiento = 0M; + decimal vMontoTotalPartidas = 0M; + + #region VERIFICAR MONTO PARTIDAS + if (dsPartidas != null || dsPartidas.Tables.Count > 0 || dsPartidas.Tables[0].Rows.Count > 0) + { + for (int i = 1; i <= dsPartidas.Tables[0].Columns.Count - 1; ++i) + { + vMontoTotalPartidas += Convert.ToDecimal(dsPartidas.Tables[0].Rows[0][i].ToString()); + } + } + #endregion if (grvTotalFinanciamiento.HeaderRow != null) { @@ -1408,7 +1427,7 @@ public partial class webforms_FOR_wfrFinanciamiento : General { for (int j = 1; j <= grvTotalFinanciamiento.Rows[i].Cells.Count - 1; ++j) { - vMontoTotal += Convert.ToDecimal(grvTotalFinanciamiento.Rows[i].Cells[j].Text); + vMontoTotalFinanciamiento += Convert.ToDecimal(grvTotalFinanciamiento.Rows[i].Cells[j].Text); if (grvTotalFinanciamiento.Rows[i].Cells[j].Text != "0.00") grvTotalFinanciamiento.Rows[i].Cells[j].Text = Decimal.Parse(grvTotalFinanciamiento.Rows[i].Cells[j].Text).ToString("###,###,###,###.#0"); @@ -1420,13 +1439,18 @@ public partial class webforms_FOR_wfrFinanciamiento : General } #region Mostrar Total + var vMontosCoinciden = vMontoTotalPartidas == vMontoTotalFinanciamiento; + grvTotalFinanciamiento.FooterRow.Cells[0].Text = "TOTAL"; grvTotalFinanciamiento.FooterRow.Cells[0].Font.Bold = true; grvTotalFinanciamiento.FooterRow.Cells[0].HorizontalAlign = HorizontalAlign.Left; - grvTotalFinanciamiento.FooterRow.Cells[1].Text = vMontoTotal.ToString("###,###,###,###.#0"); + grvTotalFinanciamiento.FooterRow.Cells[1].Text = vMontoTotalFinanciamiento.ToString("###,###,###,###.#0"); grvTotalFinanciamiento.FooterRow.Cells[1].Font.Bold = true; grvTotalFinanciamiento.FooterRow.Cells[1].HorizontalAlign = HorizontalAlign.Right; + grvTotalFinanciamiento.FooterRow.Cells[1].BackColor = vMontosCoinciden ? System.Drawing.Color.LightGreen : System.Drawing.Color.IndianRed; + grvTotalFinanciamiento.FooterRow.Cells[1].ForeColor = System.Drawing.Color.White; + grvTotalFinanciamiento.FooterRow.Cells[0].BorderStyle = BorderStyle.Solid; grvTotalFinanciamiento.FooterRow.Cells[1].BorderStyle = BorderStyle.Solid; diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrFormulario.aspx.cs b/AYA.FROPI/FOPI/webforms/FOR/wfrFormulario.aspx.cs index 27bb250fc..3a57173e7 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrFormulario.aspx.cs +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrFormulario.aspx.cs @@ -190,6 +190,8 @@ public partial class webforms_FOR_wfrFormulario : General llenarGridView(); mostrarFilaTabla(1); } + + ScriptManager.RegisterStartupScript(Page, typeof(Page), "Check", "validarEstado()", true); } catch (Exception ex) { diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrInfoComplementaria.aspx.cs b/AYA.FROPI/FOPI/webforms/FOR/wfrInfoComplementaria.aspx.cs index 2a609a09f..471df2d07 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrInfoComplementaria.aspx.cs +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrInfoComplementaria.aspx.cs @@ -103,6 +103,8 @@ public partial class webforms_FOR_wfrInfoComplementaria : General mostrarDatos(); } + + ScriptManager.RegisterStartupScript(Page, typeof(Page), "Check", "validarEstado()", true); } catch (Exception ex) { diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrInfoGeneral.aspx.cs b/AYA.FROPI/FOPI/webforms/FOR/wfrInfoGeneral.aspx.cs index 2e77e4525..feb323998 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrInfoGeneral.aspx.cs +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrInfoGeneral.aspx.cs @@ -131,6 +131,8 @@ public partial class webforms_FOR_wfrInfoGeneral : General llenarDDLAnio(); llenarGrvTipoCambio(); } + + ScriptManager.RegisterStartupScript(Page, typeof(Page), "Check", "validarEstado()", true); } catch (Exception ex) { diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrPartidas.aspx b/AYA.FROPI/FOPI/webforms/FOR/wfrPartidas.aspx index d094d45f2..3e216c185 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrPartidas.aspx +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrPartidas.aspx @@ -87,69 +87,81 @@ Distribución Partidas Presupuestarias
<%-- ********** Datos ********** --%> -
-
-
- +
+
+
+
+
+ +
-
-
-
- - - - - - - - - - -
-
-
-
-
- +
+
+ + + + + + + + + + +
+
+
+
+
+ +
-
- - + + +
-
-
-
-
- - - - - - - - -
-
-
-
-
- +
+
+
+ + + + + + + + +
+
+
+
+
+ +
-
- - + + +
+
- + +
+
+
+
+ +
+
+ @@ -185,7 +197,7 @@
-
+
@@ -195,7 +207,8 @@
-
+
+
@@ -222,9 +235,10 @@
+
-
+
diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrPartidas.aspx.cs b/AYA.FROPI/FOPI/webforms/FOR/wfrPartidas.aspx.cs index d3e973c10..4f2e92f0a 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrPartidas.aspx.cs +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrPartidas.aspx.cs @@ -37,6 +37,7 @@ using AyABL.RCS; using AyABL.PPP; using AyABL.AGP; using AyABL.ADM; +using AyABL.FNP; public partial class webforms_FOR_wfrPartidas : General { @@ -83,6 +84,8 @@ public partial class webforms_FOR_wfrPartidas : General ProyectoBL objProyectoBL; DistribucionPartidaBL objDistribucionPartidaBL; PartidaPresupuestariaBL objPartidaPresupuestariaBL; + FinanciamientoBL objFinanciamientoBL; + #endregion @@ -110,6 +113,8 @@ public partial class webforms_FOR_wfrPartidas : General llenarGrvPartidasTab(); llenarGRVTotalPartida(); } + + ScriptManager.RegisterStartupScript(Page, typeof(Page), "Check", "validarEstado()", true); } catch (Exception ex) { @@ -624,15 +629,31 @@ public partial class webforms_FOR_wfrPartidas : General try { objDistribucionPartidaBL = new DistribucionPartidaBL(); + objFinanciamientoBL = new FinanciamientoBL(); + objDistribucionPartidaBL.objDistribucionPartidaEL.Proyecto = Int32.Parse(Session["PKPROYECTO"].ToString()); + objFinanciamientoBL.objFinanciamientoEL.Proyecto = Int32.Parse(Session["PKPROYECTO"].ToString()); DataSet dsPartidas = objDistribucionPartidaBL.getTotalPartida(); + DataSet dsRecursos = objFinanciamientoBL.getTotalFinanciamiento(); if (dsPartidas.Tables.Count == 0) dsPartidas.Tables.Add(); detalleGRVDatos(dsPartidas, grvTotalPartidas); - decimal vMontoTotal = 0M; + + decimal vMontoTotalPartidas = 0M; + decimal vMontoTotalFinanciamiento = 0M; + + #region VERIFICAR MONTO FINANCIAMIENTO + if (dsRecursos != null || dsRecursos.Tables.Count > 0 || dsRecursos.Tables[0].Rows.Count > 0) + { + for (int i = 1; i <= dsRecursos.Tables[0].Columns.Count - 1; ++i) + { + vMontoTotalFinanciamiento += Convert.ToDecimal(dsRecursos.Tables[0].Rows[0][i].ToString()); + } + } + #endregion if (grvTotalPartidas.HeaderRow != null) { @@ -642,7 +663,7 @@ public partial class webforms_FOR_wfrPartidas : General { for (int j = 1; j <= grvTotalPartidas.Rows[i].Cells.Count - 1; ++j) { - vMontoTotal += Convert.ToDecimal(grvTotalPartidas.Rows[i].Cells[j].Text); + vMontoTotalPartidas += Convert.ToDecimal(grvTotalPartidas.Rows[i].Cells[j].Text); if (grvTotalPartidas.Rows[i].Cells[j].Text != "0.00") grvTotalPartidas.Rows[i].Cells[j].Text = Decimal.Parse(grvTotalPartidas.Rows[i].Cells[j].Text).ToString("###,###,###,###.#0"); @@ -655,14 +676,19 @@ public partial class webforms_FOR_wfrPartidas : General } #region Mostrar Total + var vMontosCoinciden = vMontoTotalPartidas == vMontoTotalFinanciamiento; + grvTotalPartidas.FooterRow.Cells[0].Text = "TOTAL"; grvTotalPartidas.FooterRow.Cells[0].Font.Bold = true; grvTotalPartidas.FooterRow.Cells[0].HorizontalAlign = HorizontalAlign.Left; - grvTotalPartidas.FooterRow.Cells[1].Text = vMontoTotal.ToString("###,###,###,###.#0"); + grvTotalPartidas.FooterRow.Cells[1].Text = vMontoTotalPartidas.ToString("###,###,###,###.#0"); grvTotalPartidas.FooterRow.Cells[1].Font.Bold = true; grvTotalPartidas.FooterRow.Cells[1].HorizontalAlign = HorizontalAlign.Right; + grvTotalPartidas.FooterRow.Cells[1].BackColor = vMontosCoinciden ? System.Drawing.Color.LightGreen : System.Drawing.Color.IndianRed; + grvTotalPartidas.FooterRow.Cells[1].ForeColor = System.Drawing.Color.White; + grvTotalPartidas.FooterRow.Cells[0].BorderStyle = BorderStyle.Solid; grvTotalPartidas.FooterRow.Cells[1].BorderStyle = BorderStyle.Solid; #endregion diff --git a/AYA.FROPI/FOPI/webforms/FOR/wfrRecurso.aspx.cs b/AYA.FROPI/FOPI/webforms/FOR/wfrRecurso.aspx.cs index 479e1d316..027f14b3c 100644 --- a/AYA.FROPI/FOPI/webforms/FOR/wfrRecurso.aspx.cs +++ b/AYA.FROPI/FOPI/webforms/FOR/wfrRecurso.aspx.cs @@ -99,6 +99,8 @@ public partial class webforms_FOR_wfrRecurso : General mostrarDatos(); } + + ScriptManager.RegisterStartupScript(Page, typeof(Page), "Check", "validarEstado()", true); } catch (Exception ex) {