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 2bb665551..816d519ae 100644 Binary files a/SIGPC/ProyectoSIGPC/Bin/Helper.dll and b/SIGPC/ProyectoSIGPC/Bin/Helper.dll differ diff --git a/SIGPC/ProyectoSIGPC/Bin/Helper.pdb b/SIGPC/ProyectoSIGPC/Bin/Helper.pdb index 607eb49fd..7da143542 100644 Binary files a/SIGPC/ProyectoSIGPC/Bin/Helper.pdb and b/SIGPC/ProyectoSIGPC/Bin/Helper.pdb differ 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 @@ - +