parent
7d4bcad88d
commit
6fc0a29384
6 changed files with 131 additions and 63 deletions
|
|
@ -45,6 +45,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
[OperationContract]
|
[OperationContract]
|
||||||
FichaTecnicaJSON GuardarFichaTecnicaPalabraClave(FichaTecnicaJSON model);
|
FichaTecnicaJSON GuardarFichaTecnicaPalabraClave(FichaTecnicaJSON model);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Adjuntos
|
#region Adjuntos
|
||||||
[OperationContract]
|
[OperationContract]
|
||||||
AdjuntosJSON RemoverAdjunto(AdjuntosJSON model);
|
AdjuntosJSON RemoverAdjunto(AdjuntosJSON model);
|
||||||
|
|
@ -54,6 +55,8 @@ namespace AYA.SlnSinort.WCF
|
||||||
|
|
||||||
[OperationContract]
|
[OperationContract]
|
||||||
List<DocumentosAdjuntos> ObtenerAdjuntos(AdjuntosJSON model);
|
List<DocumentosAdjuntos> ObtenerAdjuntos(AdjuntosJSON model);
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Tareas Pendientes
|
#region Tareas Pendientes
|
||||||
|
|
|
||||||
|
|
@ -95,15 +95,6 @@ namespace AYA.SlnSinort.WCF
|
||||||
Task<UsuariosAyAJSON> ActualizarUsuarios(UsuariosAyAJSON model);
|
Task<UsuariosAyAJSON> ActualizarUsuarios(UsuariosAyAJSON model);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//#region Estado
|
|
||||||
|
|
||||||
//[OperationContract]
|
|
||||||
//List<Emisor> ObtenerEstado();
|
|
||||||
|
|
||||||
//[OperationContract]
|
|
||||||
//List<CatalogosJSON> ObtenerEstadoPopUp(CatalogosPost model);
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
#region PropuestaNormativa
|
#region PropuestaNormativa
|
||||||
[OperationContract]
|
[OperationContract]
|
||||||
ProyectoNormativoJSON ObtenerSitios(AtesaJSON model);
|
ProyectoNormativoJSON ObtenerSitios(AtesaJSON model);
|
||||||
|
|
|
||||||
|
|
@ -242,41 +242,6 @@ namespace AYA.SlnSinort.WCF
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//#region Estado
|
|
||||||
//public List<Estado> ObtenerEstado()
|
|
||||||
//{
|
|
||||||
// List<Estado> respuesta = null;
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// respuesta = new EstadoDAL().ObtenerEstado();
|
|
||||||
|
|
||||||
// }
|
|
||||||
// catch (Exception ex)
|
|
||||||
// {
|
|
||||||
// log.Error(ex);
|
|
||||||
// }
|
|
||||||
// return respuesta;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//public List<CatalogosJSON> ObtenerEstadoPopUp(CatalogosPost model)
|
|
||||||
//{
|
|
||||||
// List<CatalogosJSON> respuesta = new List<CatalogosJSON>();
|
|
||||||
// CatalogosPostJSON CatalogosPostJSON = new CatalogosPostJSON();
|
|
||||||
// CatalogosPostJSON.filtro = model.filtro;
|
|
||||||
// CatalogosPostJSON.IdTipo = model.IdTipo;
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
|
|
||||||
// respuesta = new EstadoDAL().ObtenerEstado(CatalogosPostJSON);
|
|
||||||
|
|
||||||
// }
|
|
||||||
// catch (Exception ex)
|
|
||||||
// {
|
|
||||||
// log.Error(ex);
|
|
||||||
// }
|
|
||||||
// return respuesta;
|
|
||||||
//}
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
#region RolesUsuarios
|
#region RolesUsuarios
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,18 +6,19 @@ var IdFichaTecnica;
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
getDataModel();
|
getDataModel();
|
||||||
|
$('#txtEstadoDocumento').val('Activo');
|
||||||
});
|
});
|
||||||
|
|
||||||
this.getDataModel = function () {
|
this.getDataModel = function () {
|
||||||
CargarEmisor();
|
CargarEmisor();
|
||||||
CargarAplicacion();
|
CargarAplicacion();
|
||||||
|
CargarNombreDocumento();
|
||||||
CargarContenido();
|
CargarContenido();
|
||||||
CargarGrupoTematico();
|
CargarGrupoTematico();
|
||||||
CargarSubCategoriaContenido();
|
CargarSubCategoriaContenido();
|
||||||
CargarSubCategoriaGrupoTematico();
|
CargarSubCategoriaGrupoTematico();
|
||||||
CargarDocumentoTecnico();
|
CargarDocumentoTecnico();
|
||||||
//CargarPalabraClave();
|
//CargarPalabraClave();
|
||||||
//CargarEstado();
|
|
||||||
|
|
||||||
//$("#btnBuscarPalabraClave").unbind("click");
|
//$("#btnBuscarPalabraClave").unbind("click");
|
||||||
//$("#btnBuscarPalabraClave").click(function () {
|
//$("#btnBuscarPalabraClave").click(function () {
|
||||||
|
|
@ -29,24 +30,6 @@ this.getDataModel = function () {
|
||||||
// AgregarUsuario();
|
// AgregarUsuario();
|
||||||
//});
|
//});
|
||||||
|
|
||||||
$("#btnBuscarEmisor").unbind("click");
|
|
||||||
$("#btnBuscarEmisor").click(function () {
|
|
||||||
|
|
||||||
SelectedCatalog = 'Emisor';
|
|
||||||
|
|
||||||
if ($.fn.DataTable.isDataTable('#tableEmisor')) {
|
|
||||||
|
|
||||||
LoadMessage();
|
|
||||||
|
|
||||||
$('#tableEmisor').DataTable().search('').draw();
|
|
||||||
|
|
||||||
$('#modalEmisor').modal('show');
|
|
||||||
|
|
||||||
ENDREQUEST();
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#btnBuscarAplicacion").unbind("click");
|
$("#btnBuscarAplicacion").unbind("click");
|
||||||
$("#btnBuscarAplicacion").click(function () {
|
$("#btnBuscarAplicacion").click(function () {
|
||||||
|
|
||||||
|
|
@ -83,6 +66,25 @@ this.getDataModel = function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#btnBuscarNombreDocumento").unbind("click");
|
||||||
|
$("#btnBuscarNombreDocumento").click(function () {
|
||||||
|
|
||||||
|
SelectedCatalog = 'DocumentoTecnico';
|
||||||
|
|
||||||
|
if ($.fn.DataTable.isDataTable('#tableNombreDocumento')) {
|
||||||
|
|
||||||
|
LoadMessage();
|
||||||
|
|
||||||
|
$('#tableNombreDocumento').DataTable().search('').draw();
|
||||||
|
|
||||||
|
$('#modalNombreDocumento').modal('show');
|
||||||
|
|
||||||
|
ENDREQUEST();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$("#btnBuscarDocumentoTecnico").unbind("click");
|
$("#btnBuscarDocumentoTecnico").unbind("click");
|
||||||
$("#btnBuscarDocumentoTecnico").click(function () {
|
$("#btnBuscarDocumentoTecnico").click(function () {
|
||||||
|
|
||||||
|
|
@ -259,6 +261,41 @@ this.CargarGridAplicacion = function (data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.CargarNombreDocumento = function (filtro) {
|
||||||
|
|
||||||
|
var uri = SinortWCF + '/api/ObtenerAdjuntos';
|
||||||
|
var model = {
|
||||||
|
IdTipo: 1,
|
||||||
|
filtro: filtro == null ? '' : '&filtro=' + filtro
|
||||||
|
}
|
||||||
|
|
||||||
|
AjaxPostData(uri, model, false, false, CargarGridNombreDocumento, null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CargarGridNombreDocumento = function (data) {
|
||||||
|
|
||||||
|
if (data != null) {
|
||||||
|
|
||||||
|
listaNombreDocumento = data;
|
||||||
|
|
||||||
|
var Seleccionar = $("#ucBtnSeleccionarCatalogo").html();
|
||||||
|
|
||||||
|
var columnDefinition = [
|
||||||
|
{ "data": null, className: "center", defaultContent: Seleccionar },
|
||||||
|
{ "data": "codigo" },
|
||||||
|
{ "data": "descripcion" }
|
||||||
|
];
|
||||||
|
|
||||||
|
$('#tableNombreDocumento').TableInit(0, false, true, true, false, columnDefinition, listaNombreDocumento, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
|
toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.CargarDocumentoTecnico = function (filtro) {
|
this.CargarDocumentoTecnico = function (filtro) {
|
||||||
|
|
||||||
var uri = CatalogosWCF + '/api/ObtenerDocumentoTecnicoPopUp';
|
var uri = CatalogosWCF + '/api/ObtenerDocumentoTecnicoPopUp';
|
||||||
|
|
@ -469,6 +506,19 @@ $('#tableEmisor').on('click', 'button', function () {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#tableNombreDocumento').on('click', 'button', function () {
|
||||||
|
|
||||||
|
var data = $('#tableNombreDocument').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
||||||
|
if (SelectedCatalog == "NombreDocument") {
|
||||||
|
|
||||||
|
$('#hiddenDNombreDocument').val(data.codigo);
|
||||||
|
$('#txtNombreDocument').val(data.descripcion);
|
||||||
|
}
|
||||||
|
$('#modalNombreDocument').modal('hide');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
$('#tableDocumentoTecnico').on('click', 'button', function () {
|
$('#tableDocumentoTecnico').on('click', 'button', function () {
|
||||||
|
|
||||||
var data = $('#tableDocumentoTecnico').DataTable().row($(this).parents('tr')).data();
|
var data = $('#tableDocumentoTecnico').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,46 @@
|
||||||
|
|
||||||
@section Modals{
|
@section Modals{
|
||||||
|
|
||||||
|
|
||||||
|
@*---------------------Catalogo Nombre Documento Tecnico---------------------------------------------------------*@
|
||||||
|
<div class="modal fade" id="modalNombreDocumento" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="display: none;">
|
||||||
|
<div class="modal-dialog modal-lg" style="width:40%;">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h4 class="modal-title">Catálogo Nombre Documento Tecnico</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<table id="tableNombreDocumento" class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>Código</th>
|
||||||
|
<th>Nombre</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@*---------------------Catalogo Emisor---------------------------------------------------------*@
|
@*---------------------Catalogo Emisor---------------------------------------------------------*@
|
||||||
<div class="modal fade" id="modalEmisor" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="display: none;">
|
<div class="modal fade" id="modalEmisor" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="display: none;">
|
||||||
<div class="modal-dialog modal-lg" style="width:40%;">
|
<div class="modal-dialog modal-lg" style="width:40%;">
|
||||||
|
|
|
||||||
|
|
@ -80,5 +80,24 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
return registros;
|
return registros;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<DocumentosAdjuntos> ObtenerAdjuntosPopUp()
|
||||||
|
{
|
||||||
|
List<DocumentosAdjuntos> respuesta = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (SinortContex db = new SinortContex())
|
||||||
|
{
|
||||||
|
respuesta = db.DocumentosAdjuntos.ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
log.Error(ex);
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
return respuesta;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue