diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Sinort.svc.cs b/AYA.SlnSynor/AYA.SlnSynor.WCF/Sinort.svc.cs index 3123eb486..780798f6a 100644 --- a/AYA.SlnSynor/AYA.SlnSynor.WCF/Sinort.svc.cs +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Sinort.svc.cs @@ -16,6 +16,9 @@ using System.ServiceModel; using System.ServiceModel.Web; using System.Text; using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + ////using AYA.SlnSinort.WCF.ServiciosUsuariosWCF; namespace AYA.SlnSinort.WCF @@ -238,6 +241,10 @@ namespace AYA.SlnSinort.WCF string fileDirectory = Serverpath; file = model.Nombre.Replace(" ", "_"); fileDirectory = fileDirectory + "\\" + file; + + + + if (File.Exists(fileDirectory)) { File.Delete(fileDirectory); diff --git a/AYA.SlnSynor/AYA.SlnSynor/FileUploadHandler/FileUploadHandler.ashx.cs b/AYA.SlnSynor/AYA.SlnSynor/FileUploadHandler/FileUploadHandler.ashx.cs index fb30a6883..15383e002 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/FileUploadHandler/FileUploadHandler.ashx.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/FileUploadHandler/FileUploadHandler.ashx.cs @@ -21,8 +21,9 @@ namespace webAgenciaVirtual if (context.Request.QueryString["carpeta"] != null) { string pathrefer = context.Request.UrlReferrer.ToString(); - string Serverpath = HttpContext.Current.Server.MapPath("DocumentosSINORT"); - Serverpath += "\\" + context.Request.QueryString["carpeta"].ToString(); + //string Serverpath = HttpContext.Current.Server.MapPath("DocumentosSINORT"); + string Serverpath = ConfigurationManager.AppSettings["FileRepository"].ToString(); + Serverpath += context.Request.QueryString["carpeta"].ToString(); var postedFile = context.Request.Files[0]; string ext = Path.GetExtension(postedFile.FileName); diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/PropuestaNormativa.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/PropuestaNormativa.js index 0e9c3b41b..9eb875098 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/PropuestaNormativa.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/PropuestaNormativa.js @@ -559,19 +559,20 @@ this.AbrirAdjuntos = function () { // Carpeta: 1, // } -// var uri = SinortWCF + '/api/RemoverAdjunto'; -// AjaxPostData(uri, model, false, false, null, null, null); -// var tableAdjuntos = $('#tableAdjuntos').DataTable(); -// tableAdjuntos.row($(this).parents('tr')).remove().draw(); +// //var uri = SinortWCF + '/api/RemoverAdjunto'; +// //AjaxPostData(uri, model, false, false, null, null, null); +// //var tableAdjuntos = $('#tableAdjuntos').DataTable(); +// //tableAdjuntos.row($(this).parents('tr')).remove().draw(); + +// window.open('C:\\AYA\\SINORT\\AYA.SlnSynor\\AYA.SlnSynor\\FileUploadHandler\\DocumentosSINORT\\1\\Captura.PNG'); + //}); this.AbrirDocumento = function (value) { - EsRespuesta = true; - Nombre = value; - var a = ''; - alert('prueba'); + window.open('http://localhost/AYA.SlnSinort/DocumentosSINORT/1/Captura.PNG'); + } @@ -595,10 +596,10 @@ $(function () { ); var tableAdjuntos = $('#tableAdjuntos').DataTable(); - + $.each(data.files, function (index, file) { var optionVer = $("#ucbtnVerAdjuntos").html(); - optionVer = replaceAll("[$Nombre]", file.name, optionVer); + optionVer = replaceAll("[$value]", file.name, optionVer); var optionRemover = $("#ucbtnRemoverAdjuntos").html(); tableAdjuntos.row.add( diff --git a/AYA.SlnSynor/AYA.SlnSynor/Views/PropuestaNormativa/Index.cshtml b/AYA.SlnSynor/AYA.SlnSynor/Views/PropuestaNormativa/Index.cshtml index 9dbc5533d..ac6e4775f 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Views/PropuestaNormativa/Index.cshtml +++ b/AYA.SlnSynor/AYA.SlnSynor/Views/PropuestaNormativa/Index.cshtml @@ -365,7 +365,7 @@
- diff --git a/AYA.SlnSynor/AYA.SlnSynor/Web.config b/AYA.SlnSynor/AYA.SlnSynor/Web.config index bb3785a45..080402379 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Web.config +++ b/AYA.SlnSynor/AYA.SlnSynor/Web.config @@ -1,4 +1,4 @@ - +