git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C38
This commit is contained in:
parent
e1b9f9ef6f
commit
b5e33a67fe
1 changed files with 2 additions and 41 deletions
|
|
@ -121,55 +121,16 @@ this.toggleEnabledItem = function (id, value) {
|
||||||
|
|
||||||
if (!confirm(msg))
|
if (!confirm(msg))
|
||||||
{ return; }
|
{ return; }
|
||||||
STARTREQUEST();
|
|
||||||
|
|
||||||
TableItems = $('#TableItems').DataTable();
|
TableItems = $('#TableItems').DataTable();
|
||||||
|
|
||||||
Item = {
|
EmisorPN = {
|
||||||
IdEmisor: id,
|
IdEmisor: id,
|
||||||
Estado: value,
|
Estado: value,
|
||||||
}
|
}
|
||||||
|
|
||||||
var uri = CatalogosWCF + '/api/InsertarActualizarEmisor';
|
var uri = CatalogosWCF + '/api/InsertarActualizarEmisor';
|
||||||
var DTO = JSON.stringify(Item);
|
AjaxPostData(uri, EmisorPN, true, true, CompletarAccion, null, null);
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: uri,
|
|
||||||
cache: false,
|
|
||||||
data: DTO,
|
|
||||||
contentType: 'application/json; charset=utf-8',
|
|
||||||
dataType: 'json',
|
|
||||||
success: function (data) {
|
|
||||||
|
|
||||||
if (data.CodigoRespuesta == "EXITOSO") {
|
|
||||||
toastr.info('Información actualizada con éxito', 'Completado');
|
|
||||||
LimpiarControles();
|
|
||||||
|
|
||||||
$('#btnGuardar').hide();
|
|
||||||
$('#btnInsertar').show();
|
|
||||||
|
|
||||||
TableItems.clear().draw();
|
|
||||||
ObtenerEmisores();
|
|
||||||
ENDREQUEST();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
toastr.error("Ha ocurrido un error.");
|
|
||||||
ENDREQUEST();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}).fail(function (jqxhr, textStatus, error) {
|
|
||||||
|
|
||||||
toastr.error("Ha ocurrido un error inesperado. Vuela a intentarlo.");
|
|
||||||
ENDREQUEST();
|
|
||||||
|
|
||||||
}).then(function (value) {
|
|
||||||
|
|
||||||
ENDREQUEST();
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ActualizarItem = function () {
|
this.ActualizarItem = function () {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue