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 @@
<%-- ********** Datos ********** --%>
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
@@ -185,7 +197,7 @@