diff --git a/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj b/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj index 16f6a7c2f..90216fab5 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj +++ b/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj @@ -6319,6 +6319,7 @@ + @@ -7429,7 +7430,7 @@ WCF Proxy Generator Reference.cs - + @@ -7486,23 +7487,23 @@ MSDiscoCodeGenerator Reference.cs - - + + Designer - + Designer - + Designer - + Designer - + Designer - + Designer @@ -7620,10 +7621,10 @@ - + Dynamic Web References\Vision2020\ - http://aya-vsrv-scanv/Vision2020ServerAPIOnLine/wsapi.asmx + http://10.50.1.13/Vision2020ServerAPIOnLine/wsapi.asmx diff --git a/AYA.SlnSynor/AYA.SlnSynor/Controllers/HomeController.cs b/AYA.SlnSynor/AYA.SlnSynor/Controllers/HomeController.cs index 5b902cf8e..4eb2d8708 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Controllers/HomeController.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/Controllers/HomeController.cs @@ -1,4 +1,5 @@ -using System; +using AYA.SlnSinortModel.Entidades; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -51,7 +52,23 @@ namespace AYA.SlnSinort.Controllers InitControllers(); return View(); } + [AllowAnonymous] + [HttpPost] + public JsonResult VisualizarDocumentos(LoginJSON model) + { + Documento oDoc = new Documento(); + string strResultado = ""; + try + { + strResultado = oDoc.Visor_Documento(model.Usuario, model.Contrasena); + } + catch (Exception ex) + { + + } + return Json(strResultado, JsonRequestBehavior.AllowGet); + } } } \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Controllers/NormativaReglamentacionTecnicaController.cs b/AYA.SlnSynor/AYA.SlnSynor/Controllers/NormativaReglamentacionTecnicaController.cs index 6aca05d5c..f412b94e3 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Controllers/NormativaReglamentacionTecnicaController.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/Controllers/NormativaReglamentacionTecnicaController.cs @@ -1,4 +1,5 @@ -using System; +using AYA.SlnSinortModel.Entidades; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -78,6 +79,24 @@ namespace AYA.SlnSinort.Controllers.NormativaReglamentacionTecnica InitControllers(); return View(); } + + [AllowAnonymous] + [HttpPost] + public JsonResult VisualizarDocumentos(LoginJSON model) + { + Documento oDoc = new Documento(); + string strResultado = ""; + try + { + strResultado = oDoc.Visor_Documento(model.Usuario,model.Contrasena); + + } + catch (Exception ex) + { + + } + return Json(strResultado, JsonRequestBehavior.AllowGet); + } } } \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Controllers/PropuestaNormativaController.cs b/AYA.SlnSynor/AYA.SlnSynor/Controllers/PropuestaNormativaController.cs index 2e73a9d63..a08dbccea 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Controllers/PropuestaNormativaController.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/Controllers/PropuestaNormativaController.cs @@ -1,4 +1,5 @@ -using System; +using AYA.SlnSinortModel.Entidades; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -32,6 +33,23 @@ namespace AYA.SlnSinort.Controllers.PropuestaNormativa InitControllers(); return View(); } + [AllowAnonymous] + [HttpPost] + public JsonResult VisualizarDocumentos(LoginJSON model) + { + Documento oDoc = new Documento(); + string strResultado = ""; + try + { + strResultado = oDoc.Visor_Documento(model.Usuario, model.Contrasena); + + } + catch (Exception ex) + { + + } + return Json(strResultado, JsonRequestBehavior.AllowGet); + } } } \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Controllers/ReportesController.cs b/AYA.SlnSynor/AYA.SlnSynor/Controllers/ReportesController.cs index 7949d0b24..9ff39bdb0 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Controllers/ReportesController.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/Controllers/ReportesController.cs @@ -72,8 +72,8 @@ namespace AYA.SlnSinort.Controllers.Reportes dtta.Fill(dts.DataTable1, emisor, documentotecnico, aplicacion, contenido, subcontenido, grupotematico, subgrupotematico, versionvigente, fechai, fechaf); - reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Reportes\rdlc\repFichaTecnica.rdlc"; - //reportViewer.LocalReport.ReportPath = @"\\10.50.1.97\Aplicaciones\SINORT(6075)\Raiz\DocumentosSinort\repFichaTecnica.rdlc"; + //reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Reportes\rdlc\repFichaTecnica.rdlc"; + reportViewer.LocalReport.ReportPath = @"\\10.50.1.97\Aplicaciones\SINORT(6075)\Raiz\DocumentosSinort\repFichaTecnica.rdlc"; //reportViewer.LocalReport.ReportPath = @"D:\Aplicaciones\SINORT\Raiz\DocumentosSinort\repFichaTecnica.rdlc"; reportViewer.LocalReport.DataSources.Clear(); reportViewer.LocalReport.DataSources.Add(new ReportDataSource("dtsFichaTecnicaFinal", dts.Tables["Datatable1"])); @@ -96,8 +96,8 @@ namespace AYA.SlnSinort.Controllers.Reportes dtta.Fill(dts.DataTable1, "", "", "", "", "", "", "", "", fechainicio, fechafin); - reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Reportes\rdlc\repFichaTecnica.rdlc"; - //reportViewer.LocalReport.ReportPath = @"D:\Aplicaciones\SINORT\Raiz\DocumentosSinort\repFichaTecnica.rdlc"; + //reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Reportes\rdlc\repFichaTecnica.rdlc"; + reportViewer.LocalReport.ReportPath = @"\\10.50.1.97\Aplicaciones\SINORT(6075)\Raiz\DocumentosSinort\repFichaTecnica.rdlc"; reportViewer.LocalReport.DataSources.Clear(); reportViewer.LocalReport.DataSources.Add(new ReportDataSource("dtsFichaTecnicaFinal", dts.Tables["Datatable1"])); diff --git a/AYA.SlnSynor/AYA.SlnSynor/Documento.cs b/AYA.SlnSynor/AYA.SlnSynor/Documento.cs index 302ee72b2..6945d5200 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Documento.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/Documento.cs @@ -511,9 +511,9 @@ public partial class Documento : System.Web.UI.Page using (AYA.SlnSinort.Vision2020.wsapi wsVision2020Descarga = new AYA.SlnSinort.Vision2020.wsapi()) { id_Obj = row["ide_obj"].ToString(); - + string strResultado = wsVision2020Descarga.Descargar_Documento(const_strUsuario, const_strClave, const_strArchivadores, const_strGaveta, id_Carpeta, id_Obj,true) ; - valor_retornado += GetFileName(strResultado.Replace(@"|", "")) + "|"; + valor_retornado += GetFileName(strResultado.Replace(@"|", "")); descargado = DescargarArchivo2020(strResultado, strCedula); //System.Threading.Thread.Sleep(4000);//ESPERAR POR DOS SEGUNDOS MIENTRAS SE DESCARGA EL DOCUMENTO //using (var client = new System.Net.WebClient()) @@ -555,7 +555,8 @@ public partial class Documento : System.Web.UI.Page { WebRequest request = WebRequest.Create(url); WebResponse response = request.GetResponse(); - string targetUrl = Server.MapPath("../../DocsRespuesta/" + strCedula + "/"); + string targetUrl = @"C:\DocumentosSinort\"; + //Server.MapPath("../../DocsRespuesta/" + strCedula + "/"); if (!Directory.Exists(targetUrl)) Directory.CreateDirectory(targetUrl); diff --git a/AYA.SlnSynor/AYA.SlnSynor/FileUploadHandler/FileUploadHandler.ashx.cs b/AYA.SlnSynor/AYA.SlnSynor/FileUploadHandler/FileUploadHandler.ashx.cs index 984fb16b7..1ea93815b 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/FileUploadHandler/FileUploadHandler.ashx.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/FileUploadHandler/FileUploadHandler.ashx.cs @@ -26,24 +26,24 @@ namespace webAgenciaVirtual //String pathMail = ConfigurationManager.AppSettings["RutaPdf"].ToString() + txtCedulaPropietario.Text.Trim() + @"\" + ViewState["PKFORMULARIO"].ToString() + @"\"; - if (!Directory.Exists(Serverpath)) - Directory.CreateDirectory(Serverpath); + //if (!Directory.Exists(Serverpath)) + // Directory.CreateDirectory(Serverpath); var postedFile = context.Request.Files[0]; string fecha = context.Request.QueryString["tipo"].ToString(); - + string ext = Path.GetExtension(postedFile.FileName); string file; file = postedFile.FileName.Replace(" ", "_"); - string fileDirectory = Serverpath; + string fileDirectory; string[] Arraynombre = new string[2]; Arraynombre = file.Split('.'); var nom = Arraynombre[0]; file = nom + fecha + ext; - fileDirectory = file; + fileDirectory = nom + fecha; + - Documento oDoc = new Documento(); @@ -55,24 +55,14 @@ namespace webAgenciaVirtual fileData = binaryReader.ReadBytes(context.Request.Files[0].ContentLength); } - string strResultado = oDoc.Archivar_Documento(file, nom, fileData); - + string strResultado = oDoc.Archivar_Documento(fileDirectory, file, fileData); + if (strResultado != string.Empty) context.Response.Write("Error"); else context.Response.Write("Success"); - if (context.Request.QueryString["fileName"] != null) - { - //file = context.Request.QueryString["fileName"].Replace(" ", "_"); - //if (File.Exists(fileDirectory + "\\" + file)) - //{ - // File.Delete(fileDirectory + "\\" + file); - //} - } - - context.Response.AddHeader("Vary", "Accept"); try diff --git a/AYA.SlnSynor/AYA.SlnSynor/Properties/Settings.Designer.cs b/AYA.SlnSynor/AYA.SlnSynor/Properties/Settings.Designer.cs index 7ac9b2a61..6309a54e5 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Properties/Settings.Designer.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/Properties/Settings.Designer.cs @@ -26,7 +26,7 @@ namespace AYA.SlnSinort.Properties { [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] - [global::System.Configuration.DefaultSettingValueAttribute("http://aya-vsrv-scanv/Vision2020ServerAPIOnLine/wsapi.asmx")] + [global::System.Configuration.DefaultSettingValueAttribute("http://10.50.1.13/Vision2020ServerAPIOnLine/wsapi.asmx")] public string AYA_SlnSinort_Vision2020_wsapi { get { return ((string)(this["AYA_SlnSinort_Vision2020_wsapi"])); diff --git a/AYA.SlnSynor/AYA.SlnSynor/Properties/Settings.settings b/AYA.SlnSynor/AYA.SlnSynor/Properties/Settings.settings index ccae6b9fe..bb5354a3d 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Properties/Settings.settings +++ b/AYA.SlnSynor/AYA.SlnSynor/Properties/Settings.settings @@ -3,7 +3,7 @@ - http://aya-vsrv-scanv/Vision2020ServerAPIOnLine/wsapi.asmx + http://10.50.1.13/Vision2020ServerAPIOnLine/wsapi.asmx \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Reportes/datasets/dtsFichaTecnicaFinal.xss b/AYA.SlnSynor/AYA.SlnSynor/Reportes/datasets/dtsFichaTecnicaFinal.xss index e57541404..0c80369bd 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Reportes/datasets/dtsFichaTecnicaFinal.xss +++ b/AYA.SlnSynor/AYA.SlnSynor/Reportes/datasets/dtsFichaTecnicaFinal.xss @@ -6,7 +6,7 @@ --> - + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Reference.svcmap b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Reference.svcmap index 3cbfbacc4..67f3fcfa6 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Reference.svcmap +++ b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Reference.svcmap @@ -19,17 +19,17 @@ - + - - - - - - - - + + + + + + + + diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort1.disco b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort.disco similarity index 53% rename from AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort1.disco rename to AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort.disco index 19db3aff5..b3129741a 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort1.disco +++ b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort.disco @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort1.wsdl b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort.wsdl similarity index 95% rename from AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort1.wsdl rename to AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort.wsdl index 9774b5c1e..05aae2710 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort1.wsdl +++ b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort.wsdl @@ -1,20 +1,39 @@ - + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + @@ -1070,9 +1089,9 @@ - + - http://aya-vsrv-wstt:2005/Sinort.svc/soap + https://wcfserver.aya.go.cr:4000/Sinort.svc/soap diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort62.xsd b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort.xsd similarity index 82% rename from AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort62.xsd rename to AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort.xsd index 615c22d7f..cda8871c5 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort62.xsd +++ b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort.xsd @@ -1,6 +1,6 @@ - + diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort64.xsd b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort1.xsd similarity index 100% rename from AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort64.xsd rename to AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort1.xsd diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort65.xsd b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort2.xsd similarity index 100% rename from AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort65.xsd rename to AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort2.xsd diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort61.xsd b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort3.xsd similarity index 97% rename from AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort61.xsd rename to AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort3.xsd index c57961560..f27d15309 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort61.xsd +++ b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort3.xsd @@ -1,7 +1,7 @@ - - + + diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort63.xsd b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort4.xsd similarity index 96% rename from AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort63.xsd rename to AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort4.xsd index b021e6aa2..de3796832 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort63.xsd +++ b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort4.xsd @@ -1,8 +1,8 @@ - - - + + + diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort6.xsd b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort5.xsd similarity index 100% rename from AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort6.xsd rename to AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/Sinort5.xsd diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/configuration.svcinfo b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/configuration.svcinfo index 97f50818b..6c545418f 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/configuration.svcinfo +++ b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/configuration.svcinfo @@ -2,9 +2,9 @@ - + - + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/configuration91.svcinfo b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/configuration91.svcinfo index a28424249..0da5035ad 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/configuration91.svcinfo +++ b/AYA.SlnSynor/AYA.SlnSynor/Service References/ServicioSinortWCF/configuration91.svcinfo @@ -1,5 +1,5 @@ - + @@ -82,13 +82,13 @@ System.ServiceModel.Configuration.WSHttpSecurityElement - None + Transport System.ServiceModel.Configuration.WSHttpTransportSecurityElement - - Windows + + None None @@ -127,10 +127,10 @@ - + - http://aya-vsrv-wstt:2005/Sinort.svc/soap + https://wcfserver.aya.go.cr:4000/Sinort.svc/soap diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Global.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Global.js index 4ea94c538..06d520f7a 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Global.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Global.js @@ -8,7 +8,9 @@ var NombreUsuario = $("#hiddenNombreUsuario").val(); var LinkPropuesta = "http://10.50.1.97:6075/PropuestaNormativa/DetallePropuesta?"; var LinkSolicitudTarea = "http://10.50.1.97:6075/Home/TareasPendientes"; var LinkSolicitudResponder = "http://10.50.1.97:6075/NormativaReglamentacionTecnica/VerSolicitudes?"; -var LinkBusquedaFichaTecnica = "http://10.50.1.97:6075/Home/Normativa_Reglamentacion_Tecnica?solicitud=`" +var LinkBusquedaFichaTecnica = "http://localhost/AYA.SlnSinort/Home/Normativa_Reglamentacion_Tecnica?solicitud=`"; + //"http://localhost/AYA.SlnSinort/Home/Normativa_Reglamentacion_Tecnica?solicitud=`"; + //"http://10.50.1.97:6075/Home/Normativa_Reglamentacion_Tecnica?solicitud=`" //aya-vsrv-apptt:2525 //http://aya-vsrv-apptt:2525/Home/TareasPendientes //http://aya-vsrv-wstt:2005/Sinort.svc diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/GotitasNormativas.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/GotitasNormativas.js index 4ce0dac6a..d33c91929 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/GotitasNormativas.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/GotitasNormativas.js @@ -13,128 +13,128 @@ jQuery(document).ready(function () { $('#tableDocGotita').TableInit(0, false, false, false, false, null, null); $('#tableDocGotita').DataTable().column(0).visible(false); $('#tableDocGotita').DataTable().column(4).visible(false); - - $('#txtDescripcion').richText({ - // text formatting - bold: true, - italic: true, - underline: true, - // text alignment - leftAlign: true, - centerAlign: true, - rightAlign: true, - // lists - ol: true, - ul: true, - // title - heading: true, - // fonts - fonts: true, - fontList: ["Arial", - "Arial Black", - "Comic Sans MS", - "Courier New", - "Geneva", - "Georgia", - "Helvetica", - "Impact", - "Lucida Console", - "Tahoma", - "Times New Roman", - "Verdana"], - fontColor: true, - fontSize: true, - // uploads - imageUpload: false, - fileUpload: false, - videoEmbed: false, + $('#tableDocGotita').DataTable().column(5).visible(false); + //$('#txtDescripcion').richText({ + // // text formatting + // bold: true, + // italic: true, + // underline: true, + // // text alignment + // leftAlign: true, + // centerAlign: true, + // rightAlign: true, + // // lists + // ol: true, + // ul: true, + // // title + // heading: true, + // // fonts + // fonts: true, + // fontList: ["Arial", + // "Arial Black", + // "Comic Sans MS", + // "Courier New", + // "Geneva", + // "Georgia", + // "Helvetica", + // "Impact", + // "Lucida Console", + // "Tahoma", + // "Times New Roman", + // "Verdana"], + // fontColor: true, + // fontSize: true, + // // uploads + // imageUpload: false, + // fileUpload: false, + // videoEmbed: false, - // link - urls: false, - // tables - table: false, - // code - removeStyles: false, - code: false, - // colors - colors: [], - // dropdowns - fileHTML: '', - imageHTML: '', - // translations - translations: { - 'title': 'Title', - 'white': 'White', - 'black': 'Black', - 'brown': 'Brown', - 'beige': 'Beige', - 'darkBlue': 'Dark Blue', - 'blue': 'Blue', - 'lightBlue': 'Light Blue', - 'darkRed': 'Dark Red', - 'red': 'Red', - 'darkGreen': 'Dark Green', - 'green': 'Green', - 'purple': 'Purple', - 'darkTurquois': 'Dark Turquois', - 'turquois': 'Turquois', - 'darkOrange': 'Dark Orange', - 'orange': 'Orange', - 'yellow': 'Yellow', - 'imageURL': 'Image URL', - 'fileURL': 'File URL', - 'linkText': 'Link text', - 'url': 'URL', - 'size': 'Size', - 'responsive': 'Responsive', - 'text': 'Text', - 'openIn': 'Open in', - 'sameTab': 'Same tab', - 'newTab': 'New tab', - 'align': 'Align', - 'left': 'Left', - 'center': 'Center', - 'right': 'Right', - 'rows': 'Rows', - 'columns': 'Columns', - 'add': 'Add', - 'pleaseEnterURL': 'Please enter an URL', - 'videoURLnotSupported': 'Video URL not supported', - 'pleaseSelectImage': 'Please select an image', - 'pleaseSelectFile': 'Please select a file', - 'bold': 'Bold', - 'italic': 'Italic', - 'underline': 'Underline', - 'alignLeft': 'Align left', - 'alignCenter': 'Align centered', - 'alignRight': 'Align right', - 'addOrderedList': 'Add ordered list', - 'addUnorderedList': 'Add unordered list', - 'addHeading': 'Add Heading/title', - 'addFont': 'Add font', - 'addFontColor': 'Add font color', - 'addFontSize': 'Add font size', - 'addImage': 'Add image', - 'addVideo': 'Add video', - 'addFile': 'Add file', - 'addURL': 'Add URL', - 'addTable': 'Add table', - 'removeStyles': 'Remove styles', - 'code': 'Show HTML code', - 'undo': 'Deshacer', - 'redo': 'Rehacer', - 'close': 'Close' - }, - // dev settings - useSingleQuotes: false, - height: 150, - width: 200, - heightPercentage: 0, - id: "", - class: "", - useParagraph: false - }); + // // link + // urls: false, + // // tables + // table: false, + // // code + // removeStyles: false, + // code: false, + // // colors + // colors: [], + // // dropdowns + // fileHTML: '', + // imageHTML: '', + // // translations + // translations: { + // 'title': 'Title', + // 'white': 'White', + // 'black': 'Black', + // 'brown': 'Brown', + // 'beige': 'Beige', + // 'darkBlue': 'Dark Blue', + // 'blue': 'Blue', + // 'lightBlue': 'Light Blue', + // 'darkRed': 'Dark Red', + // 'red': 'Red', + // 'darkGreen': 'Dark Green', + // 'green': 'Green', + // 'purple': 'Purple', + // 'darkTurquois': 'Dark Turquois', + // 'turquois': 'Turquois', + // 'darkOrange': 'Dark Orange', + // 'orange': 'Orange', + // 'yellow': 'Yellow', + // 'imageURL': 'Image URL', + // 'fileURL': 'File URL', + // 'linkText': 'Link text', + // 'url': 'URL', + // 'size': 'Size', + // 'responsive': 'Responsive', + // 'text': 'Text', + // 'openIn': 'Open in', + // 'sameTab': 'Same tab', + // 'newTab': 'New tab', + // 'align': 'Align', + // 'left': 'Left', + // 'center': 'Center', + // 'right': 'Right', + // 'rows': 'Rows', + // 'columns': 'Columns', + // 'add': 'Add', + // 'pleaseEnterURL': 'Please enter an URL', + // 'videoURLnotSupported': 'Video URL not supported', + // 'pleaseSelectImage': 'Please select an image', + // 'pleaseSelectFile': 'Please select a file', + // 'bold': 'Bold', + // 'italic': 'Italic', + // 'underline': 'Underline', + // 'alignLeft': 'Align left', + // 'alignCenter': 'Align centered', + // 'alignRight': 'Align right', + // 'addOrderedList': 'Add ordered list', + // 'addUnorderedList': 'Add unordered list', + // 'addHeading': 'Add Heading/title', + // 'addFont': 'Add font', + // 'addFontColor': 'Add font color', + // 'addFontSize': 'Add font size', + // 'addImage': 'Add image', + // 'addVideo': 'Add video', + // 'addFile': 'Add file', + // 'addURL': 'Add URL', + // 'addTable': 'Add table', + // 'removeStyles': 'Remove styles', + // 'code': 'Show HTML code', + // 'undo': 'Deshacer', + // 'redo': 'Rehacer', + // 'close': 'Close' + // }, + // // dev settings + // useSingleQuotes: false, + // height: 150, + // width: 200, + // heightPercentage: 0, + // id: "", + // class: "", + // useParagraph: false + //}); }); @@ -157,12 +157,6 @@ this.GuardarGotitaNormativa = function () { return false; } - if (IsNullOrEmpty(modelDocumentoAdjunto)) { - toastr.warning("Antes de continuar; debe de ingresar un Documento Adjunto."); - return false; - } - - if (!confirm("Va a ingresar una nueva Gotita Normativa .\n ¿Desea continuar?")) { return; } @@ -229,8 +223,8 @@ this.GuardarAdjuntos = function (nombre) { Comentario: $("#txtComentarioDocAux").val(), IdTipoDocumento: Idetipoproyecto, DescTipoDocumento: DescTipoproyecto, - RutaFisica: RepositorioLocal + ruta, - RutaDescarga: RepositorioVirtual + ruta, + RutaFisica: nom + FechaDocumentos, + RutaDescarga: ruta, TipoArchivo: Arraynombre.pop(), TipoExpediente: null } @@ -275,7 +269,11 @@ function ActualizarUpload() { success: function (response, status) { - GuardarAdjuntos(NombreDocumento); + if (response.indexOf('Success') > -1) { + GuardarAdjuntos(NombreDocumento); + } else { + toastr.warning("Error al adjuntar el archivo", Message_Warning); + } $('#progress .progress-bar').css( 'width', '0%'); ENDREQUEST(); @@ -333,13 +331,14 @@ this.CargarGridDocumento = function (data) { $('#tableDocGotita').DataTable().column(0).visible(false); $('#tableDocGotita').DataTable().column(4).visible(false); - + $('#tableDocGotita').DataTable().column(5).visible(false); var tableDocGota = $('#tableDocGotita').DataTable(); tableDocGota.clear().draw(); tableDocGota.row.add([lista.IdDocumentoAdjunto, option, lista.Nombre, lista.UsuarioCreacion, + lista.RutaFisica, lista.RutaDescarga]).draw(); @@ -350,14 +349,40 @@ $('#tableDocGotita').on('click', 'button', function () { var data = $('#tableDocGotita').DataTable().row($(this).parents('tr')).data(); - window.open(data[4]); + var uri = server + 'NormativaReglamentacionTecnica/VisualizarDocumentos'; + model = { + Usuario: data[4], + Contrasena: data[5] + } + + AjaxPostData(uri, model, false, false, AbrirDocumento, null, null); + }); +this.AbrirDocumento = function (data) { + var doc = RepositorioVirtual + data; + if (data != "No existe") { + window.open(doc); + } else { + toastr.warning("Problema al abrir el adjunto", Message_Warning); + } + ENDREQUEST(); +} this.EliminarAdjunto = function () { if (!confirm("¿Desea eliminar el documento adjunto?")) return; + if (modelDocumentoAdjunto != null ) { + + var uri = SinortWCF + '/api/EliminarbaseAdjunto'; + + var docs = { + Id: modelDocumentoAdjunto.Adjuntos.IdDocumentoAdjunto + }; + + AjaxPostData(uri, docs, false, true, null, null, null); + model.Adjuntos = null; modelDocumentoAdjunto = null; var tableDocGotita = $('#tableDocGotita').DataTable(); @@ -365,5 +390,7 @@ this.EliminarAdjunto = function () { $('#txtComentarioDocAux').val(''); $('#txtDescripcionDocAux').val(''); $('#fileupload').prop("disabled", false); + ENDREQUEST(); + } } //fin adjuntos diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/GotitasPendientes.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/GotitasPendientes.js index da33cd4b4..cb2c49da9 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/GotitasPendientes.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/GotitasPendientes.js @@ -4,12 +4,18 @@ var InfoIdGotitaNormativa; var InfoINombre; var InfoIDescripcion; var InfoIFechaCaducidad; +var InfoDocumento = ""; jQuery(document).ready(function () { $('#tableGotitasPendientes').TableInit(0, false, true, true, false, null, null); $('#tableGotitasPendientes').DataTable().column(0).visible(false); $('#tableGotitasPendientes').DataTable().column(3).visible(false); + $('#tableGotitasPendientes').DataTable().column(5).visible(false); + $('#tableDocGotita').TableInit(0, false, false, false, false, null, null); + $('#tableDocGotita').DataTable().column(0).visible(false); + $('#tableDocGotita').DataTable().column(4).visible(false); + $('#tableDocGotita').DataTable().column(5).visible(false); getDataModel(); @@ -57,7 +63,8 @@ this.CargarTablaGotitasPendientes = function (data) { item.Nombre, DateFormatNoTime(item.FechaCaducidad), item.Descripcion, - option2]).draw(); + option2, + item.IdDocumentoAdjunto]).draw(); }); @@ -79,6 +86,7 @@ $('#tableGotitasPendientes').on('click', 'button', function () { InfoINombre = data[1]; InfoIDescripcion = data[3]; InfoIFechaCaducidad = data[2]; + InfoDocumento = data[5]; if (this.id == 'btnver') { @@ -94,9 +102,101 @@ $('#tableGotitasPendientes').on('click', 'button', function () { $('#txtFechaCaducidad').val(InfoIFechaCaducidad); $("#txtAreaDescripcion").val(InfoIDescripcion); - - + if (InfoDocumento != ""){ + CargarDocumentosGotita(InfoDocumento); + } } -}); \ No newline at end of file +}); + + + +this.CargarDocumentosGotita = function (id) { + + var tableDocGotita = $('#tableDocGotita').DataTable(); + tableDocGotita.clear().draw(); + var uri = SinortWCF + '/api/ObtenerAdjuntos'; + + var modeldoc = { + IdDocumentoAdjunto: id + + }; + + AjaxPostData(uri, modeldoc, false, false, CargarTablaDocumentosGotita, null, null); + +} + +this.CargarTablaDocumentosGotita = function (data) { + + var tableDocGotita = $('#tableDocGotita').DataTable(); + tableDocGotita.clear().draw(); + var lista = data; + + $.each(lista, function (key, item) { + + + var option = $("#ucAbrirDocumento").html(); + + var ext = item.TipoArchivo.toLowerCase(); + switch (ext) { + case 'pdf': + option = replaceAll("[$icon]", "fa-file-pdf-o", option); + break; + case 'doc': + option = replaceAll("[$icon]", "fa-file-word-o", option); + break; + case 'docx': + option = replaceAll("[$icon]", "fa-file-word-o", option); + break; + case 'png': + option = replaceAll("[$icon]", "fa-file-image-o", option); + break; + case 'jpg': + option = replaceAll("[$icon]", "fa-file-image-o", option); + break; + case 'xls': + option = replaceAll("[$icon]", "fa-file-excel-o", option); + break; + case 'xlsx': + option = replaceAll("[$icon]", "fa-file-excel-o", option); + break; + default: + option = replaceAll("[$icon]", "fa-file-text", option); + } + + tableDocGotita.row.add([item.IdDocumentoAdjunto, + option, + item.Nombre, + item.UsuarioCreacion, + item.RutaFisica, + item.RutaDescarga]).draw(); + + }); + ENDREQUEST(); +} + +$('#tableDocGotita').on('click', 'button', function () { + + var data = $('#tableDocGotita').DataTable().row($(this).parents('tr')).data(); + + var uri = server + 'NormativaReglamentacionTecnica/VisualizarDocumentos'; + model = { + Usuario: data[4], + Contrasena: data[5] + } + + AjaxPostData(uri, model, false, false, AbrirDocumento, null, null); + + +}); +this.AbrirDocumento = function (data) { + var doc = RepositorioVirtual + data; + if (data != "No existe") { + window.open(doc); + } else { + toastr.warning("Problema al abrir el adjunto", Message_Warning); + } + + ENDREQUEST(); +} \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Login.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Login.js index cfeb75848..331911afe 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Login.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Login.js @@ -57,7 +57,7 @@ this.ObtenerUsuarioAD = function () { - var uri ='Login/ObtenerUsuarioAD'; + var uri = SinorLoginWCF + '/api/ObtenerUsuarioAD'; model = { Usuario: $('#txtUsuarioUnico').val(), Contrasena: $('#txtContrasena').val() @@ -74,7 +74,7 @@ this.VerificarUsurarioBD = function (data) { if (data.CodigoRespuesta == 'EXITOSO') { - var uri = 'Login/VerificarUsuarioBD'; + var uri = SinorLoginWCF + '/api/VerificarUsuarioBD'; model = { codigo: data.LoginUsuario } diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/FichaTecnica.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/FichaTecnica.js index 57a25ad88..ca7e1cc97 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/FichaTecnica.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/FichaTecnica.js @@ -28,7 +28,7 @@ jQuery(document).ready(function () { $('#tableDocFichaTecnica').TableInit(0, false, false, false, false, null, null); $('#tableDocFichaTecnica').DataTable().column(0).visible(false); $('#tableDocFichaTecnica').DataTable().column(4).visible(false); - + $('#tableDocFichaTecnica').DataTable().column(5).visible(false); IDFicha = ObtenerParametros().fichatecnicaid; if (IDFicha != null && IDFicha != "[$id]") { @@ -310,8 +310,15 @@ this.GuardarFichaTecnica = function () { return false; } - if (!confirm("Va a ingresar una nueva Ficha Técnica .\n ¿Desea continuar?")) - { return; } + if (IDFicha != null && IDFicha != "[$id]") { + if (!confirm("Va modificar la Ficha Técnica .\n ¿Desea continuar?")) + { return; } + + } else { + if (!confirm("Va a ingresar una nueva Ficha Técnica .\n ¿Desea continuar?")) + { return; } + } + FichaTecnica = { IdFichaTecnica: IsNullOrEmpty(FichaTecnicaId) ? 0 : FichaTecnicaId, @@ -370,7 +377,13 @@ this.GuardarFichaTecnica = function () { var uri = SinortWCF + '/api/GuardarFichaTecnica'; - AjaxPostData(uri, model, false, true, GuardarGotitaNormativa, null, null); + AjaxPostData(uri, model, false, true, null, null, null); + + if (IDFicha == null) { + + GuardarGotitaNormativa(); + } + if (EstadoTipo == "1") { model.FichaTecnicaHistorico = FichaTemporal; @@ -493,23 +506,27 @@ this.EliminarAdjunto = function () { if (!confirm("¿Desea eliminar el documento técnico ?")) return; - var uri = SinortWCF + '/api/EliminarbaseAdjunto'; + - var docs = { - Id: modelDocumentoAdjunto.Adjuntos.IdDocumentoAdjunto - }; + if (modelDocumentoAdjunto != null) { + var uri = SinortWCF + '/api/EliminarbaseAdjunto'; - AjaxPostData(uri, docs, false, true, null, null, null); + var docs = { + Id: modelDocumentoAdjunto.Adjuntos.IdDocumentoAdjunto + }; + + AjaxPostData(uri, docs, false, true, null, null, null); - model.Adjuntos = null; - modelDocumentoAdjunto = null; - var tableDocFichaTecnica = $('#tableDocFichaTecnica').DataTable(); - tableDocFichaTecnica.clear().draw(); - $('#txtComentarioDocAux').val(''); - $('#txtDescripcionDocAux').val(''); - $('#fileupload').prop("disabled", false); - ENDREQUEST(); + model.Adjuntos = null; + modelDocumentoAdjunto = null; + var tableDocFichaTecnica = $('#tableDocFichaTecnica').DataTable(); + tableDocFichaTecnica.clear().draw(); + $('#txtComentarioDocAux').val(''); + $('#txtDescripcionDocAux').val(''); + $('#fileupload').prop("disabled", false); + ENDREQUEST(); + } } @@ -841,7 +858,7 @@ this.CargarFormulario = function (data) { model = data; if (model.FichaTecnica != null) { - + $('#txtListaPalabraClave').val(model.FichaTecnica.ListaPalabrasClaves); $("#txtAreaIdentificacion").val(model.FichaTecnica.Identificacion); $("#hiddenEstado").val(model.FichaTecnica.IdEstado); $("#txtEstado").val(model.FichaTecnica.DescripcionEstado); @@ -991,7 +1008,7 @@ this.CargarGridPalabraClaveFichaTecnica = function (data) { nombrepalabra = item.Descripcion + " ," }); - $("#txtListaPalabraClave").val(nombrepalabra); + ENDREQUEST(); @@ -1100,8 +1117,8 @@ this.GuardarAdjuntos = function (nombre) { Comentario: $("#txtComentarioDocAux").val(), IdTipoDocumento: Idetipoproyecto, DescTipoDocumento: DescTipoproyecto, - RutaFisica: RepositorioLocal + ruta, - RutaDescarga: RepositorioVirtual + ruta, + RutaFisica: nom + FechaDocumentos, + RutaDescarga: ruta, TipoArchivo: Arraynombre.pop(), TipoExpediente: null } @@ -1132,9 +1149,7 @@ function ActualizarUpload() { return; } - var fr = new FileReader(); - fr.readAsArrayBuffer(data.files[0]); - + data.submit(); }, progress: function (e, data) { @@ -1217,7 +1232,7 @@ this.CargarGridDocumento = function (data) { $('#tableDocFichaTecnica').DataTable().column(0).visible(false); $('#tableDocFichaTecnica').DataTable().column(4).visible(false); - + $('#tableDocFichaTecnica').DataTable().column(5).visible(false); var Eliminar = $("#ucItemsEliminar").html(); var tableDocFichaTecnica = $('#tableDocFichaTecnica').DataTable(); @@ -1227,6 +1242,7 @@ this.CargarGridDocumento = function (data) { option, lista.Nombre, lista.UsuarioCreacion, + lista.RutaFisica, lista.RutaDescarga]).draw(); @@ -1236,9 +1252,27 @@ $('#tableDocFichaTecnica').on('click', 'button', function () { var data = $('#tableDocFichaTecnica').DataTable().row($(this).parents('tr')).data(); - window.open(data[4]); + var uri = server + 'NormativaReglamentacionTecnica/VisualizarDocumentos'; + model = { + Usuario: data[4], + Contrasena: data[5] + } + AjaxPostData(uri, model, false, false, AbrirDocumento, null, null); + + }); +this.AbrirDocumento = function (data) { + var doc = RepositorioVirtual + data; + if (data != "No existe") { + window.open(doc); + } else { + toastr.warning("Problema al abrir el adjunto", Message_Warning); + } + + ENDREQUEST(); +} + //fin adjuntos this.ValidarNombre = function () { @@ -1319,6 +1353,7 @@ this.AgregarUsuario = function () { if (!confirm("¿Desea agregar a un nuevo destinatario?")) return; + if ($("#txtUsuario").val() != ''){ var tableParticipantes = $('#tableDestinatarios').DataTable(); var option = $("#ucbtnRemoverDestinatario").html(); var a = $("#hiddenusuario").val(); @@ -1332,6 +1367,9 @@ this.AgregarUsuario = function () { toastr.success(Message_Default, Message_Success); $('#hiddenusuario').val(''); $('#txtUsuario').val(''); + } else { + toastr.warning("Debe seleccionar un usuario", Message_Warning); + } } this.LimpiarUsuario = function () { @@ -1645,6 +1683,10 @@ $('#tableContenido').on('click', 'button', function () { $('#hiddenContenido').val(data.codigo); $('#txtContenido').val(data.descripcion); + + $('#hiddenSubCategoriaContenido').val(''); + $('#txtSubCategoriaContenido').val(''); + } $('#modalContenido').modal('hide'); @@ -1673,6 +1715,9 @@ $('#tableGrupoTematico').on('click', 'button', function () { $('#hiddenGrupoTematico').val(data.codigo); $('#txtGrupoTematico').val(data.descripcion); + + $('#hiddenSubCategoriaGrupoTematico').val(''); + $('#txtSubCategoriaGrupoTematico').val(''); } $('#modalGrupoTematico').modal('hide'); diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/Solicitud.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/Solicitud.js index 024bfb5d1..5470d2113 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/Solicitud.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/Solicitud.js @@ -18,6 +18,7 @@ jQuery(document).ready(function () { $('#tableDocSolicitud').TableInit(0, false, false, false, false, null, null); $('#tableDocSolicitud').DataTable().column(0).visible(false); $('#tableDocSolicitud').DataTable().column(4).visible(false); + $('#tableDocSolicitud').DataTable().column(5).visible(false); }); this.CargarTipoSolicitud = function () { @@ -422,8 +423,8 @@ this.GuardarAdjuntos = function (nombre) { Comentario: null, IdTipoDocumento: Idetipoproyecto, DescTipoDocumento: DescTipoproyecto, - RutaFisica: RepositorioLocal + ruta, - RutaDescarga: RepositorioVirtual + ruta, + RutaFisica: nom + FechaDocumentos, + RutaDescarga: ruta, TipoArchivo: Arraynombre.pop(), TipoExpediente: null } @@ -469,7 +470,11 @@ function ActualizarUpload() { success: function (response, status) { - GuardarAdjuntos(NombreDocumento); + if (response.indexOf('Success') > -1) { + GuardarAdjuntos(NombreDocumento); + } else { + toastr.warning("Error al adjuntar el archivo", Message_Warning); + } $('#progress .progress-bar').css( 'width', '0%'); ENDREQUEST(); @@ -527,13 +532,14 @@ this.CargarGridDocumento = function (data) { $('#tableDocSolicitud').DataTable().column(0).visible(false); $('#tableDocSolicitud').DataTable().column(4).visible(false); - + $('#tableDocSolicitud').DataTable().column(5).visible(false); var tableDocFichaTecnica = $('#tableDocSolicitud').DataTable(); tableDocFichaTecnica.clear().draw(); tableDocFichaTecnica.row.add([lista.IdDocumentoAdjunto, option, lista.Nombre, lista.UsuarioCreacion, + lista.RutaFisica, lista.RutaDescarga]).draw(); @@ -543,21 +549,53 @@ $('#tableDocSolicitud').on('click', 'button', function () { var data = $('#tableDocSolicitud').DataTable().row($(this).parents('tr')).data(); - window.open(data[4]); + var uri = server + 'NormativaReglamentacionTecnica/VisualizarDocumentos'; + model = { + Usuario: data[4], + Contrasena: data[5] + } + + AjaxPostData(uri, model, false, false, AbrirDocumento, null, null); + }); +this.AbrirDocumento = function (data) { + var doc = RepositorioVirtual + data; + if (data != "No existe") { + window.open(doc); + } else { + toastr.warning("Problema al abrir el adjunto", Message_Warning); + } + + ENDREQUEST(); +} this.EliminarAdjunto = function () { if (!confirm("¿Desea eliminar el documento adjunto?")) return; - model.Adjuntos = null; - modelDocumentoAdjunto = null; - var tableDocSolicitud = $('#tableDocSolicitud').DataTable(); - tableDocSolicitud.clear().draw(); - $('#txtComentarioDocAux').val(''); - $('#txtDescripcionDocAux').val(''); - $('#fileupload').prop("disabled", false); + + if (modelDocumentoAdjunto != null) { + var uri = SinortWCF + '/api/EliminarbaseAdjunto'; + + var docs = { + Id: modelDocumentoAdjunto.Adjuntos.IdDocumentoAdjunto + }; + + AjaxPostData(uri, docs, false, true, null, null, null); + + + model.Adjuntos = null; + modelDocumentoAdjunto = null; + var tableDocSolicitud = $('#tableDocSolicitud').DataTable(); + tableDocSolicitud.clear().draw(); + $('#txtComentarioDocAux').val(''); + $('#txtDescripcionDocAux').val(''); + $('#fileupload').prop("disabled", false); + ENDREQUEST(); + } + + } //fin adjuntos diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/VerSolicitudes.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/VerSolicitudes.js index 97e7d3041..fbf8771da 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/VerSolicitudes.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/VerSolicitudes.js @@ -187,10 +187,12 @@ this.CargarDocumento = function (id) { } this.ObtenerRutaDocumento = function (data) { - $("#hiddenRuta").val(data[0].RutaDescarga) + $("#hiddenRutaDescarga").val(data[0].RutaDescarga) + $("#hiddenRutaFisica").val(data[0].RutaFisica) } this.ObtenerRutaDocumentoRespuesta = function (data) { - $("#hiddenRutaRespuesta").val(data[0].RutaDescarga); + $("#hiddenRutaRespuestaDescarga").val(data[0].RutaDescarga); + $("#hiddenRutaRespuestaFisica").val(data[0].RutaFisica); $("#txtDocumentoAdjuntoRespuesta").val(data[0].Nombre); } @@ -219,8 +221,14 @@ $('#tableSolicitudes').on('click', 'button', function () { }); this.AbrirArchivoAdjunto = function () { - if ($("#hiddenRuta").val() != '') { - window.open($("#hiddenRuta").val()); + if ($("#hiddenRutaDescarga").val() != '') { + var uri = server + 'NormativaReglamentacionTecnica/VisualizarDocumentos'; + model = { + Usuario: $("#hiddenRutaFisica").val(), + Contrasena: $("#hiddenRutaDescarga").val() + } + + AjaxPostData(uri, model, false, false, AbrirDocumento, null, null); } else { toastr.warning("La solicitud no tiene documento adjunto", Message_Warning); } @@ -228,10 +236,27 @@ this.AbrirArchivoAdjunto = function () { } this.AbrirArchivoAdjuntoRespuesta = function () { - if ($("#hiddenRutaRespuesta").val() != '') { - window.open($("#hiddenRutaRespuesta").val()); + if ($("#hiddenRutaRespuestaDescarga").val() != '') { + + var uri = server + 'NormativaReglamentacionTecnica/VisualizarDocumentos'; + model = { + Usuario: $("#hiddenRutaRespuestaFisica").val(), + Contrasena: $("#hiddenRutaRespuestaDescarga").val() + } + + AjaxPostData(uri, model, false, false, AbrirDocumento, null, null); } else { toastr.warning("La respuesta a la solicitud no tiene documento adjunto", Message_Warning); } +} +this.AbrirDocumento = function (data) { + var doc = RepositorioVirtual + data; + if (data != "No existe") { + window.open(doc); + } else { + toastr.warning("Problema al abrir el adjunto", Message_Warning); + } + + ENDREQUEST(); } \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/DetallePropuestaNormativa.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/DetallePropuestaNormativa.js index 1267ed51f..fbb81e2f5 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/DetallePropuestaNormativa.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/DetallePropuestaNormativa.js @@ -2256,8 +2256,8 @@ this.GuardarAdjuntos = function (nombre) { NumeroTipoDocumento: model.ProyectoNormativo.IdProyectoNormativo, IdSubTipoDocumento: IdSubTipoDocumento, DescIdSubTipoDocumento: SubTipoproyecto, - RutaFisica: RepositorioLocal + ruta, - RutaDescarga: RepositorioVirtual + ruta, + RutaFisica: nom + FechaDocumentos, + RutaDescarga: ruta, TipoArchivo: Arraynombre.pop(), TipoExpediente: TipoExp } diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/TareasPendientes.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/TareasPendientes.js index e8c8ecd24..9f49af0b4 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/TareasPendientes.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/TareasPendientes.js @@ -34,6 +34,7 @@ jQuery(document).ready(function () { $('#tableDocFichaTecnica').TableInit(0, false, false, false, false, null, null); $('#tableDocFichaTecnica').DataTable().column(0).visible(false); $('#tableDocFichaTecnica').DataTable().column(4).visible(false); + $('#tableDocFichaTecnica').DataTable().column(5).visible(false); getDataModel(); }); @@ -375,11 +376,19 @@ this.CargarDocumento = function (id) { } this.ObtenerRutaDocumento = function (data) { - $("#hiddenRuta").val(data[0].RutaDescarga) + $("#hiddenRutaDescarga").val(data[0].RutaDescarga) + $("#hiddenRutaFisica").val(data[0].RutaFisica) } this.AbrirArchivoAdjunto = function () { - if ($("#hiddenRuta").val() != '') { - window.open($("#hiddenRuta").val()); + if ($("#hiddenRutaDescarga").val() != '') { + + var uri = server + 'NormativaReglamentacionTecnica/VisualizarDocumentos'; + model = { + Usuario: $("#hiddenRutaFisica").val(), + Contrasena: $("#hiddenRutaDescarga").val() + } + + AjaxPostData(uri, model, false, false, AbrirDocumento, null, null); } else { toastr.warning("La solicitud no tiene documento adjunto", Message_Warning); } @@ -441,9 +450,26 @@ $('#tableDocFichaTecnica').on('click', 'button', function () { var data = $('#tableDocFichaTecnica').DataTable().row($(this).parents('tr')).data(); - window.open(data[4]); + var uri = server + 'NormativaReglamentacionTecnica/VisualizarDocumentos'; + model = { + Usuario: data[4], + Contrasena: data[5] + } + + AjaxPostData(uri, model, false, false, AbrirDocumento, null, null); + }); +this.AbrirDocumento = function (data) { + var doc = RepositorioVirtual + data; + if (data != "No existe") { + window.open(doc); + } else { + toastr.warning("Problema al abrir el adjunto", Message_Warning); + } + + ENDREQUEST(); +} this.EliminarAdjunto = function () { if (!confirm("¿Desea eliminar el documento técnico ?")) return; @@ -851,8 +877,8 @@ this.GuardarAdjuntos = function (nombre) { Comentario: $("#txtComentarioDocAux").val(), IdTipoDocumento: Idetipoproyecto, DescTipoDocumento: DescTipoproyecto, - RutaFisica: RepositorioLocal + ruta, - RutaDescarga: RepositorioVirtual + ruta, + RutaFisica: nom + FechaDocumentos, + RutaDescarga: ruta, TipoArchivo: Arraynombre.pop(), TipoExpediente: null } @@ -899,7 +925,7 @@ this.CargarGridDocumento = function (data) { $('#tableDocFichaTecnica').DataTable().column(0).visible(false); $('#tableDocFichaTecnica').DataTable().column(4).visible(false); - + $('#tableDocFichaTecnica').DataTable().column(5).visible(false); var tableDocFichaTecnica = $('#tableDocFichaTecnica').DataTable(); tableDocFichaTecnica.clear().draw(); @@ -908,6 +934,7 @@ this.CargarGridDocumento = function (data) { option, lista.Nombre, lista.UsuarioCreacion, + lista.RutaFisica, lista.RutaDescarga]).draw(); @@ -947,8 +974,11 @@ function ActualizarUpload() { }, success: function (response, status) { - - GuardarAdjuntos(NombreDocumento); + if (response.indexOf('Success') > -1) { + GuardarAdjuntos(NombreDocumento); + } else { + toastr.warning("Error al adjuntar el archivo", Message_Warning); + } $('#progress .progress-bar').css( 'width', '0%'); ENDREQUEST(); diff --git a/AYA.SlnSynor/AYA.SlnSynor/Views/Home/GotitasNormativas.cshtml b/AYA.SlnSynor/AYA.SlnSynor/Views/Home/GotitasNormativas.cshtml index 1e39b4d26..ae4d56a9a 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Views/Home/GotitasNormativas.cshtml +++ b/AYA.SlnSynor/AYA.SlnSynor/Views/Home/GotitasNormativas.cshtml @@ -25,18 +25,18 @@ @*---------------------Cuerpo---------------------------------------------------------*@ -
+ @*
-
- @*
+
*@ +
- +
-
*@ +
@*---------------------Fecha caducidad---------------------------------------------*@
@@ -44,7 +44,7 @@
- +
@@ -146,7 +146,7 @@ Nombre Creado por - + diff --git a/AYA.SlnSynor/AYA.SlnSynor/Views/Home/GotitasPendientes.cshtml b/AYA.SlnSynor/AYA.SlnSynor/Views/Home/GotitasPendientes.cshtml index e2cdddcf9..3a1bca1ee 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Views/Home/GotitasPendientes.cshtml +++ b/AYA.SlnSynor/AYA.SlnSynor/Views/Home/GotitasPendientes.cshtml @@ -29,6 +29,7 @@ Fecha de vencimiento + @@ -51,7 +52,13 @@ [$Gotita] - + @section Modals{ @*---------------------Ver Gotita---------------------------------------------------------*@ @@ -91,6 +98,20 @@ + @*---------------------Documento ---------------------------------------------------------*@ + + + + + + + + + + + + +
NombreCreado por