From a33001d8f544f283122f079d5a4036973cde6d62 Mon Sep 17 00:00:00 2001 From: kledezma Date: Wed, 3 Feb 2021 23:17:11 +0000 Subject: [PATCH] Cambios para el Web Service KLB git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C530 --- SIGPC/AyABL/Tran/solicitudBL.cs | 18 ++++++++++ SIGPC/ProyectoSIGPC/Bin/Helper.dll | Bin 7168 -> 7168 bytes SIGPC/ProyectoSIGPC/Bin/Helper.pdb | Bin 22016 -> 17920 bytes .../Forms/TRA/frwBusquedaSolicitud.aspx.cs | 16 ++++++++- .../Forms/TRA/frwGestionarTrabajo.aspx | 2 +- .../Forms/TRA/frwRequisitosSolicitud.aspx.cs | 31 +++++++++--------- SIGPC/ProyectoSIGPC/Web.config | 2 +- 7 files changed, 50 insertions(+), 19 deletions(-) diff --git a/SIGPC/AyABL/Tran/solicitudBL.cs b/SIGPC/AyABL/Tran/solicitudBL.cs index 341497425..7decfc8e0 100644 --- a/SIGPC/AyABL/Tran/solicitudBL.cs +++ b/SIGPC/AyABL/Tran/solicitudBL.cs @@ -736,6 +736,24 @@ namespace AyABL.Tran } } + public int ObtenerDiferenciaDias(DateTime FechaIngreso, DateTime FechaResolucion) + { + + if (FechaResolucion.Date == FechaIngreso.Date) + return 0; + + int n = 0; + DateTime nextDate = FechaIngreso; + while (nextDate <= FechaResolucion.Date) + { + if (nextDate.DayOfWeek != DayOfWeek.Saturday && nextDate.DayOfWeek != DayOfWeek.Sunday) + n++; + nextDate = nextDate.AddDays(1); + } + + return n - 1; + } + public DataSet dsListaUsuariosXActividades(ArrayList arlCondicionesFiltroBusqueda) { try diff --git a/SIGPC/ProyectoSIGPC/Bin/Helper.dll b/SIGPC/ProyectoSIGPC/Bin/Helper.dll index 2bb6655512279838bd0d45c5047ab1d98b60c281..816d519ae25620957c4d5670440137bdbb24a531 100644 GIT binary patch delta 108 zcmZp$Xt0>j!5n&AYGe0KL4muCCzJA4aC_|QIB5FmoYB?IAwn!nAlb>$B9dl7kE{(Q zY~JeEk`aFLMq4ElBLf3NvQj!R(sh!6`CNOp3xh@|0>Wtv=9 zt=2hDzJAl?@kM86W(Ed^WUH9a;?$zzm;mRP;{4L0oK-9!)f0 K-P|Ku!Uh0|GbptH diff --git a/SIGPC/ProyectoSIGPC/Bin/Helper.pdb b/SIGPC/ProyectoSIGPC/Bin/Helper.pdb index 607eb49fdf5d72e4b3d80d3878e6ed36af102093..7da1435424e9fd19becca4d70b48c7635b865cdf 100644 GIT binary patch delta 1084 zcma)5Ur1A76#u@v>$=WqTMVnIbLy6Va=HpZY}mvFQ`ZpJC~`JKF9i7qoMJ_g46@7}}jj?MA0 zNj_DPTgDihLr@fp68#I#SA<#G;9!?bay_!!r`&|zVlcB*N=7o30<*PNxb=c3j26Sb z40J$tg`ZiwIjTF>kGrSD2E1)K zWuzVXQ``GX8%t{of;BMNkOOUP*#~!24 zZch7NbB4e8z9%`4H`RjIYRuLnNznxl?EC9z20g11r3KBXz?w!x9fgn1VokG2OFea= zDayfXmqD&tl%fols@9}e45kl1#U#3`E4aiN+;o-3eWyt$-Eeu}HG}v50yyO~z#YFU z-^ltj%Q)~^nmIkVCHdAm8tTN>d88;f+Av*FJsMiZUZqC--CM_A`ENb2w|c8OHR8V= zX4&yX1`m4h4!G6qfU*L$|!cP`6J+-6m}>ugHc#{4gqt}^Od zgltv|v20duG;Of7VM3k=F0)LNn5osR8oXNW30j6GAhFE^!HH1=Q~@@?4pajTKs{gp zbijUKAD{-tvSz2e*n@Wz^sObK%v^kyrv?tU5qDnUP7^nph@8%G?@Dg|u~gIgfbDK>YG+>PWREnIWy(@gJ^_t%-23iYNf+OrfL@>m~0B;ur{Uiu0GQog|ZbQb?m=|N--4=&g^%@l?A@!F!K9$L)Xr|oqJF$EK}m;efK|%7bS$g zD7*n{{yfNqWPCmmjYXc1C(a~ir=zhX?`<6Pk!0a!k3&=Y0EWH!}u4LU&JBC zKeB#{L7wXHFmXiW?{+%)758(iwx5|8P@R621eYAY?+!+MWIZ>P&%0h=;&&RVIC;D4 zEhcKT@;Ub#+MXuZaUJ*#(HOv(1<^>9ft}QRsO2i)Ol$VjtQLUr$|doj%Ym){{*KgF zrb&i+-1t0^1JD7D0DX*TA3%vheQp8R&kyNuTdkPcfWDluy|6(wc1pGeH(A>IqqrsV zb#Ist4cX{n}p?hBjz^&3qIt2hr}^vzq8=)RAisvVQE4YI*2stSW2~nIudf4NBZ5?F zYXv3eLU~h*r;eb2+k@tAno+t@gV+X_iuM3N@uzZj0bM{fej1zG$jqW&NxYK@bvzYp e?kfDHv|v^Jt#o2;1MGlfC3KK6kIar`HGczgV1^X{ diff --git a/SIGPC/ProyectoSIGPC/Forms/TRA/frwBusquedaSolicitud.aspx.cs b/SIGPC/ProyectoSIGPC/Forms/TRA/frwBusquedaSolicitud.aspx.cs index 5eda173e4..d4573d579 100644 --- a/SIGPC/ProyectoSIGPC/Forms/TRA/frwBusquedaSolicitud.aspx.cs +++ b/SIGPC/ProyectoSIGPC/Forms/TRA/frwBusquedaSolicitud.aspx.cs @@ -1706,7 +1706,19 @@ public partial class Forms_Trans_frwBusquedaSolicitud : General lblTituloActividad.Text = "Actividad N°" + n_pActividad.ToString(); lblEstadoA1.Text = dsEncargadosActividades.Tables[0].Rows[0]["DESCRIPCIONESTADO"].ToString(); lblFechaIngresoA1.Text = dsEncargadosActividades.Tables[0].Rows[0]["FECHAASIGNACIONRESPONSABLEACTIVIDAD"].ToString(); - lblFechaResolucionA1.Text = dsEncargadosActividades.Tables[0].Rows[0]["FECHADEVOLUCIONRESPONSABLEACTIVIDAD"].ToString(); + + if (dsEncargadosActividades.Tables[0].Rows[0]["FECHADEVOLUCIONRESPONSABLEACTIVIDAD"].ToString() != "") + { + int DiasDiferencia = objSolicitudBL.ObtenerDiferenciaDias(Convert.ToDateTime(dsEncargadosActividades.Tables[0].Rows[0]["FECHAASIGNACIONRESPONSABLEACTIVIDAD"]), Convert.ToDateTime(dsEncargadosActividades.Tables[0].Rows[0]["FECHADEVOLUCIONRESPONSABLEACTIVIDAD"])); + lblFechaResolucionA1.Text = "("+DiasDiferencia+"Dias)"+" " + dsEncargadosActividades.Tables[0].Rows[0]["FECHADEVOLUCIONRESPONSABLEACTIVIDAD"].ToString(); + } + else + { + lblFechaResolucionA1.Text = dsEncargadosActividades.Tables[0].Rows[0]["FECHADEVOLUCIONRESPONSABLEACTIVIDAD"].ToString(); + + } + + Session["NACTIVIDAD"] = n_pActividad; Session["DESCRIPCIONACTIVIDAD"] = strDescripcionActividad; @@ -1738,6 +1750,8 @@ public partial class Forms_Trans_frwBusquedaSolicitud : General } } + + /// /// Carga el grid de tareas /// diff --git a/SIGPC/ProyectoSIGPC/Forms/TRA/frwGestionarTrabajo.aspx b/SIGPC/ProyectoSIGPC/Forms/TRA/frwGestionarTrabajo.aspx index c8c8051b4..c86de7957 100644 --- a/SIGPC/ProyectoSIGPC/Forms/TRA/frwGestionarTrabajo.aspx +++ b/SIGPC/ProyectoSIGPC/Forms/TRA/frwGestionarTrabajo.aspx @@ -337,7 +337,7 @@ - Actividad N°1 Ingreso y asignación del expediente + Actividad N°1 Ingreso y asignación del expeduuuuuiente diff --git a/SIGPC/ProyectoSIGPC/Forms/TRA/frwRequisitosSolicitud.aspx.cs b/SIGPC/ProyectoSIGPC/Forms/TRA/frwRequisitosSolicitud.aspx.cs index f983b8af5..7a1ad1d39 100644 --- a/SIGPC/ProyectoSIGPC/Forms/TRA/frwRequisitosSolicitud.aspx.cs +++ b/SIGPC/ProyectoSIGPC/Forms/TRA/frwRequisitosSolicitud.aspx.cs @@ -921,12 +921,11 @@ public partial class Forms_TRA_frwRequisitos : General string strResultado = oDoc.Archivar_Documento(lblNumSolicitud.Text.Trim() + "|" + "Requisito", strNombreArchivo.Replace(" ", "_"), bDoc); if (strResultado == string.Empty) - { File.Delete(nombreAdjunto + ".pdf"); - } + } AyABL.TRA.documentoBL objdocumentoBL = new AyABL.TRA.documentoBL(); objdocumentoBL.objdocumentoEL.Descripcion = "Respuesta al cliente de documentos incompletos"; @@ -1035,20 +1034,20 @@ public partial class Forms_TRA_frwRequisitos : General p_strDocHtml = p_strDocHtml.Replace("strNumeroPlanoCatastro", strNumeroPlanoCatastro); string strListaRequisitos = verificarRequisitos(); - //foreach (GridViewRow row in grvListaDatosRequisitos.Rows) - //{ - // HtmlInputCheckBox chkTemp = (HtmlInputCheckBox)row.Controls[0].Controls[1]; - // if (chkTemp != null) - // { - // if (chkTemp.Checked == false) - // strListaRequisitos += " " + row.Cells[3].Text + " "; - // } - - //} + foreach (GridViewRow row in grvListaDatosRequisitos.Rows) + { + HtmlInputCheckBox chkTemp = (HtmlInputCheckBox)row.Controls[0].Controls[1]; + if (chkTemp != null) + { + if (chkTemp.Checked == false) + strListaRequisitos += " " + row.Cells[3].Text + " "; + } + + } p_strDocHtml = p_strDocHtml.Replace("strListaRequisitos", strListaRequisitos); ASPDF.Service1Client clsGenerarDocumento = new ASPDF.Service1Client(); - string strResult = clsGenerarDocumento.Generar_Documento_PDF(p_strDocHtml, "RequisitosIncompleto_"+ DateTime.Now.ToShortDateString().Replace("/","_") + "_" + Session["SOLICITUD"].ToString() ); + string strResult = clsGenerarDocumento.Generar_Documento_PDF(p_strDocHtml, "RequisitosIncompleto_" + DateTime.Now.ToShortDateString().Replace("/", "_") + "_" + Session["SOLICITUD"].ToString()); string sourcePath = strResult; string strNombreArchivo = System.IO.Path.GetFileName(strResult); @@ -1063,21 +1062,21 @@ public partial class Forms_TRA_frwRequisitos : General System.IO.File.Copy(strResult, pdfPath + @"\" + strNombreArchivo, true); System.IO.File.Copy(strResult, ConfigurationManager.AppSettings["RutaPdfAdjuntosSql"].ToString() + @"\" + strNombreArchivo, true); - + Documento oDoc = new Documento(); //se transaforma el archivo a un arreglo de bytes byte[] bDoc = System.IO.File.ReadAllBytes(pdfPath + @"\" + strNombreArchivo.Replace(" ", "_")); string nombreAdjunto = pdfPath + @"\" + strNombreArchivo.Replace(".pdf", ""); //se carga el archivo y el registro a vision 2020 - string strResultado = oDoc.Archivar_Documento(lblNumSolicitud.Text.Trim() + "|" + "Requisito", strNombreArchivo.Replace(" ", "_") , bDoc); + string strResultado = oDoc.Archivar_Documento(lblNumSolicitud.Text.Trim() + "|" + "Requisito", strNombreArchivo.Replace(" ", "_"), bDoc); if (strResultado == string.Empty) { File.Delete(nombreAdjunto + ".pdf"); - } + } AyABL.TRA.documentoBL objdocumentoBL = new AyABL.TRA.documentoBL(); objdocumentoBL.objdocumentoEL.Descripcion = "Respuesta al cliente de documentos incompletos"; diff --git a/SIGPC/ProyectoSIGPC/Web.config b/SIGPC/ProyectoSIGPC/Web.config index cb055555d..f4299afed 100644 --- a/SIGPC/ProyectoSIGPC/Web.config +++ b/SIGPC/ProyectoSIGPC/Web.config @@ -246,7 +246,7 @@ - +