This commit is contained in:
jnunez 2018-06-28 20:40:17 +00:00
parent ba25924c31
commit 055a284db5
6 changed files with 29 additions and 17 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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(

View file

@ -365,7 +365,7 @@
<div id="ucbtnVerAdjuntos" style=" display:none;">
<button type="button" id="btnVerAdjuntos" class="btn btn-default btn-xs" onclick="AbrirDocumento([$value])">
<button type="button" id="btnVerAdjuntos" class="btn btn-default btn-xs" onclick="javascript: AbrirDocumento('[$value]')">
<i class=" fa fa-search">
</i>&nbsp;&nbsp;Ver
</button>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!--
Para obtener más información acerca de cómo configurar una aplicación ASP.NET, consulte
http://go.microsoft.com/fwlink/?LinkId=301880
@ -27,8 +27,8 @@
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="FileRepository" value="C:\AYA_RESPALDO\Archivos\" />
<add key="HttpRepository" value="http://localhost/AYA.SlnSinort/Archivos/" />
<add key="FileRepository" value="C:\DocumentosSINORT\" />
<add key="HttpRepository" value="http://localhost/DocumentosSINORT/" />
<add key="MaxSizeFileLoadKB" value="5120" />
<add key="MaxCountFileLoad" value="3" />
</appSettings>

View file

@ -4,9 +4,12 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Atesa.Utilitarios
{
class Encriptar
class Encriptar
{
}
}