From 03bb0a9a501f1b3ebf6a50c2b21fac7c65a72950 Mon Sep 17 00:00:00 2001 From: kledezma Date: Tue, 9 Feb 2021 20:27:11 +0000 Subject: [PATCH] Requerimiento 6 y 7. KLB git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C532 --- SIGPC/ProyectoSIGPC/Bin/Helper.dll | Bin 7168 -> 7168 bytes SIGPC/ProyectoSIGPC/Bin/Helper.pdb | Bin 17920 -> 17920 bytes .../Forms/TRA/frwCriterioAS.aspx | 8 +-- .../Forms/TRA/frwCriterioAS.aspx.cs | 65 +++++++++++++++++- .../Forms/TRA/frwCriterioPA.aspx | 25 ++----- .../Forms/TRA/frwCriterioPA.aspx.cs | 34 ++++++++- 6 files changed, 102 insertions(+), 30 deletions(-) diff --git a/SIGPC/ProyectoSIGPC/Bin/Helper.dll b/SIGPC/ProyectoSIGPC/Bin/Helper.dll index 731dbcf66b2be74f3ff5e0585d521e6145c517ba..114f0939c3e216c8431eb82a761b8a345a694bff 100644 GIT binary patch delta 108 zcmZp$Xt0>j!E8K7X=C?JK>@bs_nGHD=JK3&`BSWpNTR^z5Fr*OknH4W5lOS4N7e=t zHgEN7$p}ArqpgyOiGhJ3*(xTqIJKxaCOaoJCABIyF~%i7ximL5ucSC8IKQ+gId$?< Lkw=?*L`&EJu^uT| delta 106 zcmZp$Xt0>j!OVJ6abx#RL4j?FQ-3jh4Ru?-RyA~HQ$^I6W|DxKZX@Z6H&>5fIbHC@@bI(2Z+<_4o z7=cl@2^eGL$Pvwj++=I`_u%er!L$3~DBzDo6rzmJ*q4M?jE_0G()N1*aem)13vne{dK$pT zeWg`G_YFSbD&nh7W4i1uY)v1d^SJBd`oEb^lrLm7WyF0EghG)PDQli#fK$q?igOy6 z;jb$%ac|9hsyZii1k#5k(LssiGj_+oCJlR0pF`|ei%J~lxyOIZtY@QpaDvjJ$y9Uf zWP&gI?VS5-&3UXla~9^tRaEQ66A5M6?}T0*PNt9$eyzh%MWK=8A$}uUcmwLu9E2{C zcGDx67L$-%q-Ixr6W|Z(i?$l@51nNQ;5is&N9le*NKDAaIa$_D+1y4b0~aE3pKjXW zK&=ePo~soT-#nM%2)+k?y++ShYejCXJ9`j4SsSve2e$q|cJ~hT+!FBQ=$MH&2Bwob z(HfeywbNakUup1;D$mahbzOL|INUFM<&OHmU#s$8>UN+2b8A6%tlRJXz^j5KKI)cA r^v+hB?!u1jL$V!WK%F{=?kkV?2M^_2Q7b`gi0)}qD}YmhMiqVm=e$3( delta 899 zcma)4O=uHA6rQ)){1}sTSCeA4O`G4UXk!kFn^x0?2F2LI3Tlf6sw6onBxEVQRw^PA zG@AiET64-l1IbG9=s^&F4qj}*gM})1@L=#P#y6V=y@dL~H}B2+X5PG+c`IdDDMKYJ za)gi&@+p#GR1a9*0ld^j?gvmmC-5>xdoyR%;FDC%Hq->JI?a!p-vq7! zM$?{%6d!n&e(-bXbN%h?5eyk%8lwT4o?LG#UZ^?vs%@c}tV3&`%@Q;cWG6D0)O<u@^hH9HmW=Ful0<3AJLsLq zDjP^v@B-4hQ@L47s#VEmQKfUv(r@aL5-0Yc%)pi%LJn=mAa;B6Ih(UxEEV(f$R4cp zmbBl=4qz%vo^K`>p*8XlAV(jKzJ{E>=$`{Eb+Hxv1l*Zrx)yfRcBp~!6_j3A{902+?E>Iz% zL@paLA-jFY|9zN?hNi-%y~Iw_Q|p@Iz-IIIYqoFHHy!WSA9MYLC^bz=@ diff --git a/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioAS.aspx b/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioAS.aspx index 74da6abd6..973462855 100644 --- a/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioAS.aspx +++ b/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioAS.aspx @@ -1174,10 +1174,10 @@ - - - - + + + + diff --git a/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioAS.aspx.cs b/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioAS.aspx.cs index 87602f0ed..78d06d08d 100644 --- a/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioAS.aspx.cs +++ b/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioAS.aspx.cs @@ -734,14 +734,17 @@ public partial class Forms_Trans_frwCriterioAS : General //txtDiametroPrevista.Enabled = false; //txtOtrosPrevista.Visible = false; - - + + objInspeccionasBL = new inspeccionasBL(); objInspeccionasBL.objinspeccionasEL.FKSOLICITUD = int.Parse(Session["PKSOLICITUD"].ToString()); DataSet dsInspeccion = objInspeccionasBL.listarInspeccionesAS(null); + + + if (dsInspeccion.Tables[0].Rows.Count != 0) { @@ -817,7 +820,15 @@ public partial class Forms_Trans_frwCriterioAS : General BloquearIntros(); - + + inspeccionapBL objInspeccionBL = new inspeccionapBL(); + objInspeccionBL.objinspeccionapEL.FKSOLICITUD = int.Parse(Session["PKSOLICITUD"].ToString()); + DataSet dsInspeccion2 = objInspeccionBL.listarInspecciones(null); + if (dsInspeccion2.Tables[0].Rows.Count != 0) + { + LlenarDatosExistentes(dsInspeccion2); + } + EjecutarScript("inicializaTab('formulario');"); } @@ -1353,6 +1364,54 @@ public partial class Forms_Trans_frwCriterioAS : General } } + public void LlenarDatosExistentes(DataSet dsAguaPotable) + { + txtSistemaAsociado.Text = dsAguaPotable.Tables[0].Rows[0]["SISTEMAASOCIADOINSPECCIONAP"].ToString(); + txtLongitud.Text = dsAguaPotable.Tables[0].Rows[0]["LONGUITUDCROQUIS"].ToString(); + txtLatitud.Text = dsAguaPotable.Tables[0].Rows[0]["LATITUDCROQUIS"].ToString(); + + + rblExisteNis.SelectedValue = dsAguaPotable.Tables[0].Rows[0]["TIENESERVICIOSOLICITUD"].ToString().ToLower(); + if (rblExisteNis.SelectedValue == "true"){ + txtNisExistente.Enabled = true; + } + else + { + txtNisExistente.Enabled = false; + } + txtNisExistente.Text = dsAguaPotable.Tables[0].Rows[0]["NUMERONISSOLICITUD"].ToString(); + + //2 + rblEstructuraExistente.SelectedValue = dsAguaPotable.Tables[0].Rows[0]["ESTRUCTURAEXISTENTEINSPECCION"].ToString().ToLower(); + if (rblEstructuraExistente.SelectedValue == "true") + { + + txtTipoEstructuraExistente.Enabled = true; + } + else + { + + txtTipoEstructuraExistente.Enabled = false; + } + + txtTipoEstructuraExistente.Text = dsAguaPotable.Tables[0].Rows[0]["TIPOESTRUCTURAINSPECCION"].ToString(); + //2 + + rblExisteDisponibilidad.SelectedValue = dsAguaPotable.Tables[0].Rows[0]["DISPONIBILIDADASOCIADAEXISTENTEINSPECCION"].ToString().ToLower(); + if (rblExisteDisponibilidad.SelectedValue == "true"){ + txtDisponibilidadAsociada.Enabled = true; + } + else + { + txtDisponibilidadAsociada.Enabled = false; + } + + txtDisponibilidadAsociada.Text = dsAguaPotable.Tables[0].Rows[0]["DESCRIPCIONDISPONIBILIDADEXISTENTEINSPECCION"].ToString(); + + + + } + public void habilitarCampos() { if (!Request.UrlReferrer.ToString().Contains("frwBusquedaSolicitud")) diff --git a/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioPA.aspx b/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioPA.aspx index 56fbe3ed3..be761c9d5 100644 --- a/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioPA.aspx +++ b/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioPA.aspx @@ -461,24 +461,7 @@ } - function OtraRazon(r) { - alert(r + " qweqweqweqw"); - var OtraRazon = document.getElementById('ContenidoFormulario_txtOtraRazon'); - if (r == true) { - OtraRazon.classList.remove('hidden'); - } else { - OtraRazon.classList.add('hidden'); - OtraRazon.innerHTML = ''; - } - } - if (document.getElementById('ContenidoFormulario_chkId32').checked) { - alert("qweqwe"); - } else { - alert(); - } - - //alert(); @@ -993,8 +976,8 @@ - - + + @@ -1059,9 +1042,11 @@ + - + ¿El inmueble cuenta conprevista hacia red existente?:   + diff --git a/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioPA.aspx.cs b/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioPA.aspx.cs index 3fa3d09a3..ccca8a205 100644 --- a/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioPA.aspx.cs +++ b/SIGPC/ProyectoSIGPC/Forms/TRA/frwCriterioPA.aspx.cs @@ -600,11 +600,11 @@ public partial class Forms_Trans_frwCriterioPA : General { siAP.Visible = true; divCCH1.Visible = true; + txtOtraRazon.Visible = false; } else { siAP.Visible = false; - divCCH1.Visible = false; divCCH2.Visible = false; } @@ -618,6 +618,31 @@ public partial class Forms_Trans_frwCriterioPA : General EjecutarScript("inicializaTab('formulario');"); } } + + protected void chkId32_CheckedChanged(object sender, EventArgs e) + { + try + { + if (chkId32.Checked == true) + { + txtOtraRazon.Visible = true; + } + else + { + txtOtraRazon.Visible = false; + txtOtraRazon.Text = ""; + } + } + catch (Exception ex) + { + MensajeError("Se dio un error.", ex); + } + finally + { + EjecutarScript("inicializaTab('formulario');"); + } + } + protected void rblExisteCCH_SelectedIndexChanged(object sender, EventArgs e) { try @@ -1198,6 +1223,8 @@ public partial class Forms_Trans_frwCriterioPA : General chkId30.Enabled = false; chkId31.Enabled = false; chkId32.Enabled = false; + txtOtraRazon.Enabled = false; + rblExisteCCH.Enabled = false; txtObservacionesExtensionRamal.Enabled = false; rblUbicacionMedidor.Enabled = false; @@ -2807,7 +2834,7 @@ public partial class Forms_Trans_frwCriterioPA : General { try { - + txtOtraRazon.Visible = false; objInspeccionBL = new inspeccionapBL(); //objInspeccionBL.objinspeccionapEL.FKSOLICITUD = int.Parse(Session["PKSOLICITUD"].ToString()); @@ -2931,8 +2958,9 @@ public partial class Forms_Trans_frwCriterioPA : General chkId31.Checked = true; if (int.Parse(row["FKTIPONEGACIONDISPONIBILIDAD"].ToString()) == 32) chkId32.Checked = true; - txtOtraRazon.Text = dsInspeccion.Tables[0].Rows[0]["DESCRIPCIONOTROMOTIVONEGACIONDISPONIBILIDAD"].ToString(); + txtOtraRazon.Visible = true; + } }