Historico DAL - WCF - Vistas - JS - Controller
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C239
This commit is contained in:
parent
f9f23a77e0
commit
a05a264bee
1 changed files with 67 additions and 1 deletions
|
|
@ -1 +1,67 @@
|
|||
|
||||
//#region READY
|
||||
var Item = {};
|
||||
jQuery(document).ready(function () {
|
||||
CargarSitios();
|
||||
});
|
||||
|
||||
//#endregion
|
||||
|
||||
this.CargarSitios = function () {
|
||||
|
||||
var uri = CatalogosWCF + '/api/Historico';
|
||||
AjaxPostData(uri, Item, true, true, CargarTablaSitios, null, null);
|
||||
}
|
||||
|
||||
this.CargarTablaSitios = function (data) {
|
||||
|
||||
if (data != null && data.ProyectosNormativos != null) {
|
||||
ProyectosNormativos = data.ProyectosNormativos;
|
||||
var Seleccionar = $("#ucbtnVista").html();
|
||||
|
||||
var columnDefinition = [
|
||||
{ "data": "IdProyectoNormativo", "visible": false },
|
||||
{ "data": "NombreProyectoNormativo" },
|
||||
{ "data": "IdTipoProyecto", "visible": false },
|
||||
{ "data": "DescTipoProyecto" },
|
||||
{ "data": "PromotorProyecto", "visible": false },
|
||||
{ "data": "IdEstado", "visible": false },
|
||||
{ "data": null, className: "center", defaultContent: Seleccionar }
|
||||
];
|
||||
|
||||
$('#tableSitios').TableInit(1, true, true, true, true, columnDefinition, ProyectosNormativos);
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#tableSitios')) {
|
||||
|
||||
$('#tableSitios').DataTable().search('').draw();
|
||||
ENDREQUEST();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('#tableSitios').on('click', 'button', function () {
|
||||
|
||||
|
||||
var data = $('#tableSitios').DataTable().row($(this).parents('tr')).data();
|
||||
|
||||
if (data.PromotorProyecto != UsuarioSistema) {
|
||||
|
||||
if (ValidarPermisos('Accesar expediente de propuesta normativa').length <= 0 ) {
|
||||
toastr.warning('No tiene permisos para ejecutar esta opción', Message_Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
url = $("#hiddenHref").val();
|
||||
url = url.replace("View", "DetallePropuesta");
|
||||
url = url.replace("Controller", "PropuestaNormativa");
|
||||
url = url.replace("[$ID]", ROT47(data.IdProyectoNormativo.toString()));
|
||||
url = url.replace("[$TIPO]", ROT47(data.IdTipoProyecto.toString()));
|
||||
url = url.replace("[$Promotor]", data.PromotorProyecto.toString());
|
||||
url = url.replace("[$Estado]", data.IdEstado.toString());
|
||||
|
||||
|
||||
document.location.href = url;
|
||||
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue