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))
|
||||
{ return; }
|
||||
STARTREQUEST();
|
||||
|
||||
TableItems = $('#TableItems').DataTable();
|
||||
|
||||
Item = {
|
||||
EmisorPN = {
|
||||
IdEmisor: id,
|
||||
Estado: value,
|
||||
}
|
||||
|
||||
var uri = CatalogosWCF + '/api/InsertarActualizarEmisor';
|
||||
var DTO = JSON.stringify(Item);
|
||||
|
||||
$.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();
|
||||
|
||||
});
|
||||
|
||||
AjaxPostData(uri, EmisorPN, true, true, CompletarAccion, null, null);
|
||||
}
|
||||
|
||||
this.ActualizarItem = function () {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue