git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C25
This commit is contained in:
parent
22a037d2dd
commit
c57e0a0652
3 changed files with 9 additions and 9 deletions
|
|
@ -169,7 +169,7 @@ this.toggleEnabledItem = function (id, value) {
|
|||
|
||||
}
|
||||
|
||||
var uri = CatalogosWCF + '/api/ModificarEstadoEmisorPN';
|
||||
var uri = server + 'api/EmisorAPI/InsertarActualizarEmisor'
|
||||
var DTO = JSON.stringify(Item);
|
||||
|
||||
$.ajax({
|
||||
|
|
@ -181,7 +181,7 @@ this.toggleEnabledItem = function (id, value) {
|
|||
dataType: 'json',
|
||||
success: function (data) {
|
||||
|
||||
if (data == "EXITOSO") {
|
||||
if (data.CodigoRespuesta == "EXITOSO") {
|
||||
toastr.info('Información actualizada con éxito', 'Completado');
|
||||
limpiar();
|
||||
|
||||
|
|
@ -224,11 +224,11 @@ this.ActualizarItem = function () {
|
|||
TableItems = $('#TableItems').DataTable();
|
||||
|
||||
Item = {
|
||||
IdTipoEmisor: $('#hiddenId').val(),
|
||||
IdEmisor: $('#hiddenId').val(),
|
||||
Descripcion: $('#txtDescripcion').val(),
|
||||
}
|
||||
|
||||
var uri = server + '/api/ModificarEmisoresPN';
|
||||
var uri = server + 'api/EmisorAPI/InsertarActualizarEmisor'
|
||||
var DTO = JSON.stringify(Item);
|
||||
|
||||
$.ajax({
|
||||
|
|
@ -240,7 +240,7 @@ this.ActualizarItem = function () {
|
|||
dataType: 'json',
|
||||
success: function (data) {
|
||||
|
||||
if (data == "EXITOSO") {
|
||||
if (data.CodigoRespuesta == "EXITOSO") {
|
||||
toastr.info('Información guardada con éxito', 'Completado');
|
||||
limpiar();
|
||||
|
||||
|
|
@ -289,7 +289,8 @@ this.InsertarItem = function () {
|
|||
|
||||
Emisor = {
|
||||
Descripcion: $("#txtDescripcion").val(),
|
||||
IdTipoEmisor:1
|
||||
IdTipoEmisor: 1,
|
||||
Estado:1
|
||||
}
|
||||
|
||||
var uri = server + 'api/EmisorAPI/InsertarActualizarEmisor';
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<br />
|
||||
<br />
|
||||
<input type="hidden" id="hiddenId" value="true">
|
||||
<form id="formCatalogo" class="form-horizontal" role="form">
|
||||
<h3> <i class="fa fa-briefcase"></i> Emisor PN</h3>
|
||||
<div class="panel panel-success">
|
||||
|
|
|
|||
|
|
@ -76,9 +76,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
{
|
||||
int? Next_id = Conn.Emisor.Max(t => (int?)t.IdEmisor);
|
||||
model.IdEmisor = (Next_id == null) ? 1 : Next_id.Value + 1;
|
||||
model.FechaCreacion = DateTime.Now;
|
||||
model.IdTipoEmisor = 1;
|
||||
model.Estado = true;
|
||||
model.FechaCreacion = DateTime.Now;
|
||||
Conn.Emisor.Add(model);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue