git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C48
This commit is contained in:
parent
c54dce6e37
commit
c27c342d8b
66 changed files with 259938 additions and 48 deletions
|
|
@ -67,13 +67,21 @@
|
||||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.5.6\lib\net45\NLog.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.6\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.6\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Web.DynamicData" />
|
<Reference Include="System.Web.DynamicData" />
|
||||||
<Reference Include="System.Web.Entity" />
|
<Reference Include="System.Web.Entity" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@
|
||||||
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
|
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
|
||||||
<package id="Moment.js" version="2.9.0" targetFramework="net45" />
|
<package id="Moment.js" version="2.9.0" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net45" />
|
||||||
|
<package id="NLog" version="4.5.6" targetFramework="net45" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net45" />
|
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||||
<package id="popper.js" version="1.14.0" targetFramework="net45" />
|
<package id="popper.js" version="1.14.0" targetFramework="net45" />
|
||||||
<package id="Respond" version="1.2.0" targetFramework="net45" />
|
<package id="Respond" version="1.2.0" targetFramework="net45" />
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,12 @@
|
||||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.5.6\lib\net45\NLog.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Web.DynamicData" />
|
<Reference Include="System.Web.DynamicData" />
|
||||||
<Reference Include="System.Web.Entity" />
|
<Reference Include="System.Web.Entity" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
|
using Atesa.Utilitarios;
|
||||||
using AYA.SlnSinortModel.Constantes;
|
using AYA.SlnSinortModel.Constantes;
|
||||||
using AYA.SlnSinortModel.Entidades;
|
using AYA.SlnSinortModel.Entidades;
|
||||||
using AYA.SlnSinortModel.Sinort;
|
using AYA.SlnSinortModel.Sinort;
|
||||||
|
|
@ -14,6 +15,8 @@ namespace AYA.SlnSinort.WCF
|
||||||
[ServiceContract]
|
[ServiceContract]
|
||||||
public interface ISinortCatalogos
|
public interface ISinortCatalogos
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
#region Mantenimiento
|
#region Mantenimiento
|
||||||
[OperationContract]
|
[OperationContract]
|
||||||
List<Mantenimiento> ObtenerMantenimientoCatalogos();
|
List<Mantenimiento> ObtenerMantenimientoCatalogos();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
|
using Atesa.Utilitarios;
|
||||||
using AYA.SlnSinortModel.Constantes;
|
using AYA.SlnSinortModel.Constantes;
|
||||||
using AYA.SlnSinortModel.DAL.Sinort;
|
using AYA.SlnSinortModel.DAL.Sinort;
|
||||||
using AYA.SlnSinortModel.Entidades;
|
using AYA.SlnSinortModel.Entidades;
|
||||||
|
|
@ -16,6 +17,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
|
|
||||||
public class Sinort : ISinort
|
public class Sinort : ISinort
|
||||||
{
|
{
|
||||||
|
Log log = new Log("ForoDAL");
|
||||||
#region ProyectoNormativo
|
#region ProyectoNormativo
|
||||||
//public List<Mantenimiento> ObtenerSitios()
|
//public List<Mantenimiento> ObtenerSitios()
|
||||||
//{
|
//{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using AYA.SlnSinortModel.Constantes;
|
using Atesa.Utilitarios;
|
||||||
|
using AYA.SlnSinortModel.Constantes;
|
||||||
using AYA.SlnSinortModel.DAL.Sinort;
|
using AYA.SlnSinortModel.DAL.Sinort;
|
||||||
using AYA.SlnSinortModel.Entidades;
|
using AYA.SlnSinortModel.Entidades;
|
||||||
using AYA.SlnSinortModel.Sinort;
|
using AYA.SlnSinortModel.Sinort;
|
||||||
|
|
@ -13,6 +14,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
{
|
{
|
||||||
public class SinortCatalogos : ISinortCatalogos
|
public class SinortCatalogos : ISinortCatalogos
|
||||||
{
|
{
|
||||||
|
Log log = new Log("ForoDAL");
|
||||||
|
|
||||||
#region Mantenimiento
|
#region Mantenimiento
|
||||||
public List<Mantenimiento> ObtenerMantenimientoCatalogos()
|
public List<Mantenimiento> ObtenerMantenimientoCatalogos()
|
||||||
|
|
@ -25,7 +27,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw;
|
log.Error(ex);
|
||||||
}
|
}
|
||||||
return respuesta;
|
return respuesta;
|
||||||
}
|
}
|
||||||
|
|
@ -42,7 +44,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw;
|
log.Error(ex);
|
||||||
}
|
}
|
||||||
return respuesta;
|
return respuesta;
|
||||||
}
|
}
|
||||||
|
|
@ -57,7 +59,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
||||||
throw;
|
log.Error(ex);
|
||||||
}
|
}
|
||||||
return respuesta;
|
return respuesta;
|
||||||
}
|
}
|
||||||
|
|
@ -74,7 +76,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw;
|
log.Error(ex);
|
||||||
}
|
}
|
||||||
return respuesta;
|
return respuesta;
|
||||||
}
|
}
|
||||||
|
|
@ -89,7 +91,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
||||||
throw;
|
log.Error(ex);
|
||||||
}
|
}
|
||||||
return respuesta;
|
return respuesta;
|
||||||
}
|
}
|
||||||
|
|
@ -108,7 +110,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw;
|
log.Error(ex);
|
||||||
}
|
}
|
||||||
return respuesta;
|
return respuesta;
|
||||||
}
|
}
|
||||||
|
|
@ -123,7 +125,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
||||||
throw;
|
log.Error(ex);
|
||||||
}
|
}
|
||||||
return respuesta;
|
return respuesta;
|
||||||
}
|
}
|
||||||
|
|
@ -132,7 +134,17 @@ namespace AYA.SlnSinort.WCF
|
||||||
#region Pantallas
|
#region Pantallas
|
||||||
public List<Pantallas> ObtenerPantallas(Usuario model)
|
public List<Pantallas> ObtenerPantallas(Usuario model)
|
||||||
{
|
{
|
||||||
return new PantallasDAL().ObtenerPantallas(model);
|
List<Pantallas> respuesta = new List<Pantallas>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
respuesta= new PantallasDAL().ObtenerPantallas(model);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
log.Error(ex);
|
||||||
|
}
|
||||||
|
return respuesta;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net45" />
|
||||||
|
<package id="NLog" version="4.5.6" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
|
|
@ -67,13 +67,21 @@
|
||||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.5.6\lib\net45\NLog.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.6\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.6\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Web.DynamicData" />
|
<Reference Include="System.Web.DynamicData" />
|
||||||
<Reference Include="System.Web.Entity" />
|
<Reference Include="System.Web.Entity" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,9 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th class="col-sm-1">ID</th>
|
<th class="col-sm-1">ID Emisor</th>
|
||||||
<th class="col-sm-4">Descripción</th>
|
<th class="col-sm-4">Descripción</th>
|
||||||
|
<th class="col-sm-4">Tipo Emisor</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -53,7 +54,22 @@
|
||||||
|
|
||||||
@*Descripción*@
|
@*Descripción*@
|
||||||
|
|
||||||
<input type="text" class="form-control" id="txtDescripcion">
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms">Descripción</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="txtDescripcion" name="txtDescripcion" class="form-control imput-xs" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms">Tipo de Emisor</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select id="ddlTipoEmisor" name="ddlTipoEmisor" class="form-control imput-xs" required></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2"></label>
|
<label class="col-md-2"></label>
|
||||||
<div class="col-md-4 ">
|
<div class="col-md-4 ">
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@
|
||||||
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
|
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
|
||||||
<package id="Moment.js" version="2.9.0" targetFramework="net45" />
|
<package id="Moment.js" version="2.9.0" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net45" />
|
||||||
|
<package id="NLog" version="4.5.6" targetFramework="net45" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net45" />
|
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||||
<package id="popper.js" version="1.14.0" targetFramework="net45" />
|
<package id="popper.js" version="1.14.0" targetFramework="net45" />
|
||||||
<package id="Respond" version="1.2.0" targetFramework="net45" />
|
<package id="Respond" version="1.2.0" targetFramework="net45" />
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,18 @@
|
||||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.5.6\lib\net45\NLog.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class AplicacionDAL
|
public class AplicacionDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("AplicacionDAL");
|
||||||
#region ObtenerAplicacion
|
#region ObtenerAplicacion
|
||||||
|
|
||||||
public List<CatalogosJSON> ObtenerAplicacion(string filtro = null)
|
public List<CatalogosJSON> ObtenerAplicacion(string filtro = null)
|
||||||
|
|
@ -35,7 +35,8 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//log.Error(ex);
|
log.Error(ex);
|
||||||
|
throw ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return registros;
|
return registros;
|
||||||
|
|
@ -53,7 +54,8 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//log.Error(ex);
|
log.Error(ex);
|
||||||
|
throw ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return respuesta;
|
return respuesta;
|
||||||
|
|
@ -98,12 +100,12 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
}
|
}
|
||||||
catch (DbEntityValidationException ex)
|
catch (DbEntityValidationException ex)
|
||||||
{
|
{
|
||||||
//logger.Error(exs);
|
log.Error(ex);
|
||||||
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//logger.Error(ex);
|
log.Error(ex);
|
||||||
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class BitacoraDocumentosDAL
|
public class BitacoraDocumentosDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("BitacoraDocumentosDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class CategoriaDAL
|
public class CategoriaDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("CategoriaDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class ComentariosForoDAL
|
public class ComentariosForoDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("ComentariosForoDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class ComentariosMatrizDAL
|
public class ComentariosMatrizDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("ComentariosMatrizDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class ConvocatoriaDAL
|
public class ConvocatoriaDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("ConvocatoriaDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class DocumentosAdjuntosDAL
|
public class DocumentosAdjuntosDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("DocumentosAdjuntosDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class DocumentosDAL
|
public class DocumentosDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("DocumentosDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class EmisorDAL
|
public class EmisorDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("EmisorDAL");
|
||||||
#region ObtenerEmisor
|
#region ObtenerEmisor
|
||||||
|
|
||||||
public List<CatalogosJSON> ObtenerEmisor(string filtro = null)
|
public List<CatalogosJSON> ObtenerEmisor(string filtro = null)
|
||||||
|
|
@ -35,7 +35,8 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
||||||
//log.Error(ex);
|
log.Error(ex);
|
||||||
|
throw ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return registros;
|
return registros;
|
||||||
|
|
@ -53,7 +54,8 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//log.Error(ex);
|
log.Error(ex);
|
||||||
|
throw ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return respuesta;
|
return respuesta;
|
||||||
|
|
@ -98,12 +100,12 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
}
|
}
|
||||||
catch (DbEntityValidationException ex)
|
catch (DbEntityValidationException ex)
|
||||||
{
|
{
|
||||||
//logger.Error(exs);
|
log.Error(ex);
|
||||||
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//logger.Error(ex);
|
log.Error(ex);
|
||||||
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class EstadoDAL
|
public class EstadoDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("EstadoDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class ForoDAL
|
public class ForoDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("ForoDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using AYA.SlnSinortModel.Entidades;
|
using Atesa.Utilitarios;
|
||||||
|
using AYA.SlnSinortModel.Entidades;
|
||||||
using AYA.SlnSinortModel.Sinort;
|
using AYA.SlnSinortModel.Sinort;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
@ -10,7 +11,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class MantenimientoDAL
|
public class MantenimientoDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("MantenimientoDAL");
|
||||||
public List<Mantenimiento> ObtenerMantenimientoCatalogos()
|
public List<Mantenimiento> ObtenerMantenimientoCatalogos()
|
||||||
{
|
{
|
||||||
List<Mantenimiento> registros = null;
|
List<Mantenimiento> registros = null;
|
||||||
|
|
@ -24,7 +25,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//log.Error(ex);
|
log.Error(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return registros;
|
return registros;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class MatrizDAL
|
public class MatrizDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("MatrizDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using AYA.SlnSinortModel.Sinort;
|
using Atesa.Utilitarios;
|
||||||
|
using AYA.SlnSinortModel.Sinort;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
@ -9,8 +10,11 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class PantallasDAL
|
public class PantallasDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("MatrizDAL");
|
||||||
public List<Pantallas> ObtenerPantallas(Usuario model)
|
public List<Pantallas> ObtenerPantallas(Usuario model)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
List<Pantallas> registros = null;
|
List<Pantallas> registros = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class PermisosUsuarioDAL
|
public class PermisosUsuarioDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("PermisosUsuarioDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class PlantillaEmailDAL
|
public class PlantillaEmailDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("PlantillaEmailDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class RolesDAL
|
public class RolesDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("RolesDAL");
|
||||||
|
|
||||||
#region ObtenerRol
|
#region ObtenerRol
|
||||||
|
|
||||||
public List<CatalogosJSON> ObtenerRol(string filtro = null)
|
public List<CatalogosJSON> ObtenerRol(string filtro = null)
|
||||||
|
|
@ -33,7 +35,8 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//log.Error(ex);
|
log.Error(ex);
|
||||||
|
throw ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return registros;
|
return registros;
|
||||||
|
|
@ -51,7 +54,8 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//log.Error(ex);
|
log.Error(ex);
|
||||||
|
throw ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return respuesta;
|
return respuesta;
|
||||||
|
|
@ -96,12 +100,12 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
}
|
}
|
||||||
catch (DbEntityValidationException ex)
|
catch (DbEntityValidationException ex)
|
||||||
{
|
{
|
||||||
//logger.Error(exs);
|
log.Error(ex);
|
||||||
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//logger.Error(ex);
|
log.Error(ex);
|
||||||
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
Respuesta.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR.ToString();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class TipoDocumentoDAL
|
public class TipoDocumentoDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("TipoDocumentoDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class TipoEmisorDAL
|
public class TipoEmisorDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("TipoEmisorDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class TipoEstadoDAL
|
public class TipoEstadoDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("TipoEstadoDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class TipoForoDAL
|
public class TipoForoDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("TipoForoDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class TipoMatrizDAL
|
public class TipoMatrizDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("TipoForoDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using Atesa.Utilitarios;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -8,5 +9,6 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
public class UsuarioDAL
|
public class UsuarioDAL
|
||||||
{
|
{
|
||||||
|
Log log = new Log("UsuarioDAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="EntityFramework" version="6.2.0" targetFramework="net45" />
|
<package id="EntityFramework" version="6.2.0" targetFramework="net45" />
|
||||||
|
<package id="NLog" version="4.5.6" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
|
|
@ -42,12 +42,19 @@
|
||||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.5.6\lib\net45\NLog.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.Security" />
|
<Reference Include="System.Security" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="EntityFramework" version="6.2.0" targetFramework="net45" />
|
<package id="EntityFramework" version="6.2.0" targetFramework="net45" />
|
||||||
|
<package id="NLog" version="4.5.6" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
17
AYA.SlnSynor/Atesa.Utilitarios/App.config
Normal file
17
AYA.SlnSynor/Atesa.Utilitarios/App.config
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
|
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
|
</configSections>
|
||||||
|
<entityFramework>
|
||||||
|
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||||
|
<parameters>
|
||||||
|
<parameter value="mssqllocaldb" />
|
||||||
|
</parameters>
|
||||||
|
</defaultConnectionFactory>
|
||||||
|
<providers>
|
||||||
|
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||||
|
</providers>
|
||||||
|
</entityFramework>
|
||||||
|
</configuration>
|
||||||
|
|
@ -37,6 +37,14 @@
|
||||||
<Reference Include="APCEncryptLibrary">
|
<Reference Include="APCEncryptLibrary">
|
||||||
<HintPath>..\..\..\..\..\..\..\..\DLL\APCEncryptLibrary.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\DLL\APCEncryptLibrary.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
|
|
@ -45,12 +53,19 @@
|
||||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.5.6\lib\net45\NLog.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.ServiceModel.Web" />
|
<Reference Include="System.ServiceModel.Web" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
|
@ -60,11 +75,13 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Encriptar.cs" />
|
<Compile Include="Encriptar.cs" />
|
||||||
<Compile Include="Extensiones.cs" />
|
<Compile Include="Extensiones.cs" />
|
||||||
|
<Compile Include="Log.cs" />
|
||||||
<Compile Include="NewtonsoftJsonDispatchFormatter.cs" />
|
<Compile Include="NewtonsoftJsonDispatchFormatter.cs" />
|
||||||
<Compile Include="ObtieneParametros.cs" />
|
<Compile Include="ObtieneParametros.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,9 @@ namespace Atesa.Utilitarios
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool In<T>(this T obj, params T[] args)
|
||||||
|
{
|
||||||
|
return args.Contains<T>(obj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
158
AYA.SlnSynor/Atesa.Utilitarios/Log.cs
Normal file
158
AYA.SlnSynor/Atesa.Utilitarios/Log.cs
Normal file
|
|
@ -0,0 +1,158 @@
|
||||||
|
using NLog;
|
||||||
|
using NLog.Config;
|
||||||
|
using NLog.Targets;
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Validation;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Atesa.Utilitarios
|
||||||
|
{
|
||||||
|
public class Log
|
||||||
|
{
|
||||||
|
|
||||||
|
private LogEventInfo vLogEventInfo;
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||||
|
public Log(string vLoggerName)
|
||||||
|
{
|
||||||
|
|
||||||
|
this.LoggerName = vLoggerName;
|
||||||
|
string name = Assembly.GetCallingAssembly().GetName().Name;
|
||||||
|
string valueKeyRegedit = new ObtieneParametros().GetValueKeyRegedit("RutaLogGenerados", false);
|
||||||
|
string str3 = new ObtieneParametros().GetValueKeyRegedit("LogLevel", false);
|
||||||
|
LoggingConfiguration configuration = LogManager.Configuration;
|
||||||
|
configuration = (configuration == null) ? new LoggingConfiguration() : configuration;
|
||||||
|
FileTarget Target = new FileTarget
|
||||||
|
{
|
||||||
|
Name = vLoggerName,
|
||||||
|
Layout = "${date}|${machinename}|${level}|${logger}|${event-context:item=INITLogger}|${message}",
|
||||||
|
FileName = valueKeyRegedit + "/" + name + "/${logger} ${shortdate}.txt"
|
||||||
|
};
|
||||||
|
if (!((configuration.ConfiguredNamedTargets == null) || configuration.ConfiguredNamedTargets.Any<Target>(c => (c.Name == Target.Name))))
|
||||||
|
{
|
||||||
|
configuration.AddTarget(Target);
|
||||||
|
}
|
||||||
|
NLog.LogLevel trace = NLog.LogLevel.Trace;
|
||||||
|
switch (str3.Trim().ToLower())
|
||||||
|
{
|
||||||
|
case "warn":
|
||||||
|
trace = NLog.LogLevel.Warn;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "error":
|
||||||
|
trace = NLog.LogLevel.Error;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
trace = NLog.LogLevel.Trace;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
LoggingRule rule = new LoggingRule(vLoggerName, trace, Target);
|
||||||
|
if (!configuration.LoggingRules.Any<LoggingRule>(c => (c.LoggerNamePattern == rule.LoggerNamePattern)))
|
||||||
|
{
|
||||||
|
configuration.LoggingRules.Add(rule);
|
||||||
|
}
|
||||||
|
LogManager.Configuration = configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
//[MethodImpl(MethodImplOptions.NoInlining)]
|
||||||
|
//public void Error(DbEntityValidationException ex)
|
||||||
|
//{
|
||||||
|
// StackTrace trace = new StackTrace(new StackFrame(1));
|
||||||
|
// this.MethodName = trace.GetFrame(0).GetMethod().Name;
|
||||||
|
// StringBuilder builder = new StringBuilder();
|
||||||
|
// foreach (string str in (from x in ex.EntityValidationErrors
|
||||||
|
// select x.ValidationErrors into x
|
||||||
|
// select x.ErrorMessage).ToList<string>())
|
||||||
|
// {
|
||||||
|
// builder.AppendLine(str);
|
||||||
|
// }
|
||||||
|
// builder.AppendLine(" StackTrace: ");
|
||||||
|
// builder.Append(ex.StackTrace);
|
||||||
|
// this.vLogEventInfo = new LogEventInfo(NLog.LogLevel.Error, this.LoggerName, " DbEntityValidationException Message: " + builder.ToString());
|
||||||
|
// this.vLogEventInfo.Properties["INITLogger"] = this.INITLogger;
|
||||||
|
// this.logger.Log(this.vLogEventInfo);
|
||||||
|
// builder.Clear();
|
||||||
|
//}
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||||
|
public void Error(Exception ex)
|
||||||
|
{
|
||||||
|
StackTrace trace = new StackTrace(new StackFrame(1));
|
||||||
|
this.MethodName = trace.GetFrame(0).GetMethod().Name;
|
||||||
|
StringBuilder exceptionMessages = this.GetExceptionMessages(ex);
|
||||||
|
this.vLogEventInfo = new LogEventInfo(NLog.LogLevel.Error, this.LoggerName, exceptionMessages.ToString());
|
||||||
|
this.vLogEventInfo.Properties["INITLogger"] = this.INITLogger;
|
||||||
|
this.logger.Log(this.vLogEventInfo);
|
||||||
|
exceptionMessages.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||||
|
public void Error(string Message)
|
||||||
|
{
|
||||||
|
StackTrace trace = new StackTrace(new StackFrame(1));
|
||||||
|
this.MethodName = trace.GetFrame(0).GetMethod().Name;
|
||||||
|
Message = Message.Replace(Environment.NewLine, " -> ");
|
||||||
|
this.vLogEventInfo = new LogEventInfo(NLog.LogLevel.Error, this.LoggerName, Message);
|
||||||
|
this.vLogEventInfo.Properties["INITLogger"] = this.INITLogger;
|
||||||
|
this.logger.Log(this.vLogEventInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public StringBuilder GetExceptionMessages(Exception ex)
|
||||||
|
{
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
while (ex != null)
|
||||||
|
{
|
||||||
|
builder.AppendLine(" Message: ");
|
||||||
|
builder.Append(ex.Message);
|
||||||
|
builder.AppendLine(" StackTrace: ");
|
||||||
|
builder.Append(ex.StackTrace);
|
||||||
|
ex = ex.InnerException;
|
||||||
|
}
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||||
|
public void Trace(string Message)
|
||||||
|
{
|
||||||
|
StackTrace trace = new StackTrace(new StackFrame(1));
|
||||||
|
this.MethodName = trace.GetFrame(0).GetMethod().Name;
|
||||||
|
Message = Message.Replace(Environment.NewLine, " -> ");
|
||||||
|
this.vLogEventInfo = new LogEventInfo(NLog.LogLevel.Trace, this.LoggerName, Message);
|
||||||
|
this.vLogEventInfo.Properties["INITLogger"] = this.INITLogger;
|
||||||
|
this.logger.Log(this.vLogEventInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Logger logger
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LogManager.GetLogger(this.LoggerName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string IDLogger { get; set; }
|
||||||
|
|
||||||
|
public string LoggerName { get; set; }
|
||||||
|
|
||||||
|
private string MethodName { get; set; }
|
||||||
|
|
||||||
|
//private string INITLogger = "${this.MethodName}|{this.IDLogger}";
|
||||||
|
|
||||||
|
private string INITLogger
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return string.Format("{0}|{1}", this.MethodName, this.IDLogger);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -12,6 +12,22 @@ namespace Atesa.Utilitarios
|
||||||
|
|
||||||
private string key = @"SOFTWARE\\Parametros";
|
private string key = @"SOFTWARE\\Parametros";
|
||||||
|
|
||||||
|
public ObtieneParametros(string subkey = null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
this.key = string.IsNullOrWhiteSpace(subkey) ? this.key : string.Format(@"{0}\{1}", this.key, subkey);
|
||||||
|
RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, Environment.Is64BitOperatingSystem ? RegistryView.Registry64 : RegistryView.Registry32);
|
||||||
|
if (key.OpenSubKey(this.key) == null)
|
||||||
|
{
|
||||||
|
key.CreateSubKey(this.key, RegistryKeyPermissionCheck.ReadWriteSubTree);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw new Exception("The registry key 'ParametrosProcesoUltimus' does not exist and could not create it");
|
||||||
|
}
|
||||||
|
}
|
||||||
public void AddValueKeyRegedit(string KeyStringName, string KeyStringValue, bool Encrypt)
|
public void AddValueKeyRegedit(string KeyStringName, string KeyStringValue, bool Encrypt)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
|
<package id="EntityFramework" version="6.2.0" targetFramework="net45" />
|
||||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net45" />
|
||||||
|
<package id="NLog" version="4.5.6" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
BIN
AYA.SlnSynor/packages/NLog.4.5.6/NLog.4.5.6.nupkg
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/NLog.4.5.6.nupkg
vendored
Normal file
Binary file not shown.
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/monoandroid44/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/monoandroid44/NLog.dll
vendored
Normal file
Binary file not shown.
24167
AYA.SlnSynor/packages/NLog.4.5.6/lib/monoandroid44/NLog.xml
vendored
Normal file
24167
AYA.SlnSynor/packages/NLog.4.5.6/lib/monoandroid44/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/net35/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/net35/NLog.dll
vendored
Normal file
Binary file not shown.
26611
AYA.SlnSynor/packages/NLog.4.5.6/lib/net35/NLog.xml
vendored
Normal file
26611
AYA.SlnSynor/packages/NLog.4.5.6/lib/net35/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/net40-client/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/net40-client/NLog.dll
vendored
Normal file
Binary file not shown.
26710
AYA.SlnSynor/packages/NLog.4.5.6/lib/net40-client/NLog.xml
vendored
Normal file
26710
AYA.SlnSynor/packages/NLog.4.5.6/lib/net40-client/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/net45/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/net45/NLog.dll
vendored
Normal file
Binary file not shown.
26907
AYA.SlnSynor/packages/NLog.4.5.6/lib/net45/NLog.xml
vendored
Normal file
26907
AYA.SlnSynor/packages/NLog.4.5.6/lib/net45/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard1.3/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard1.3/NLog.dll
vendored
Normal file
Binary file not shown.
23391
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard1.3/NLog.xml
vendored
Normal file
23391
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard1.3/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard1.5/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard1.5/NLog.dll
vendored
Normal file
Binary file not shown.
24242
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard1.5/NLog.xml
vendored
Normal file
24242
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard1.5/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard2.0/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard2.0/NLog.dll
vendored
Normal file
Binary file not shown.
24953
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard2.0/NLog.xml
vendored
Normal file
24953
AYA.SlnSynor/packages/NLog.4.5.6/lib/netstandard2.0/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/sl4/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/sl4/NLog.dll
vendored
Normal file
Binary file not shown.
19716
AYA.SlnSynor/packages/NLog.4.5.6/lib/sl4/NLog.xml
vendored
Normal file
19716
AYA.SlnSynor/packages/NLog.4.5.6/lib/sl4/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/sl5/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/sl5/NLog.dll
vendored
Normal file
Binary file not shown.
19806
AYA.SlnSynor/packages/NLog.4.5.6/lib/sl5/NLog.xml
vendored
Normal file
19806
AYA.SlnSynor/packages/NLog.4.5.6/lib/sl5/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/wp8/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/wp8/NLog.dll
vendored
Normal file
Binary file not shown.
18982
AYA.SlnSynor/packages/NLog.4.5.6/lib/wp8/NLog.xml
vendored
Normal file
18982
AYA.SlnSynor/packages/NLog.4.5.6/lib/wp8/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/xamarinios10/NLog.dll
vendored
Normal file
BIN
AYA.SlnSynor/packages/NLog.4.5.6/lib/xamarinios10/NLog.dll
vendored
Normal file
Binary file not shown.
24067
AYA.SlnSynor/packages/NLog.4.5.6/lib/xamarinios10/NLog.xml
vendored
Normal file
24067
AYA.SlnSynor/packages/NLog.4.5.6/lib/xamarinios10/NLog.xml
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue