git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C12
This commit is contained in:
parent
556efb56ee
commit
3ff5453972
7 changed files with 56 additions and 13 deletions
|
|
@ -18,5 +18,7 @@ namespace AYA.SlnSynor.WCF
|
|||
[OperationContract]
|
||||
EmisorPNJSON ObtenerEmisoresPN(EmisorPN model);
|
||||
|
||||
[OperationContract]
|
||||
string InsertarEmisoresPN(EmisorPN model);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace AYA.SlnSynor.WCF
|
|||
return respuesta;
|
||||
}
|
||||
|
||||
public EmisorPNJSON InsertarEmisorPN(EmisorPN model)
|
||||
public string InsertarEmisoresPN(EmisorPN model)
|
||||
{
|
||||
EmisorPNJSON respuesta = new EmisorPNJSON();
|
||||
try
|
||||
|
|
@ -44,8 +44,6 @@ namespace AYA.SlnSynor.WCF
|
|||
|
||||
DAL.InsertarActualizarEmisorPN(model);
|
||||
respuesta.CodigoRespuesta = EnumRespuesta.EXITOSO;
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -53,7 +51,7 @@ namespace AYA.SlnSynor.WCF
|
|||
}
|
||||
|
||||
|
||||
return respuesta;
|
||||
return respuesta.CodigoRespuesta ;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7076,6 +7076,7 @@
|
|||
<Content Include="Content\themes\base\minified\jquery.ui.tooltip.min.css" />
|
||||
<Content Include="Content\toastr.css" />
|
||||
<Content Include="Content\toastr.min.css" />
|
||||
<Content Include="Content\valid.css" />
|
||||
<Content Include="dist\css\AdminLTE.css" />
|
||||
<Content Include="dist\css\AdminLTE.min.css" />
|
||||
<Content Include="dist\css\alt\AdminLTE-bootstrap-social.css" />
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ namespace AYA.SlnSynor
|
|||
|
||||
bundles.Add(new ScriptBundle("~/Script-Global")
|
||||
.Include("~/Sinort-Scripts/Global.js")
|
||||
.Include("~/Scripts/toastr.min.js"));
|
||||
.Include("~/Scripts/toastr.min.js")
|
||||
.Include("~/Scripts/jquery.validate.min.js"));
|
||||
|
||||
bundles.Add(new ScriptBundle("~/Script-Catalogos")
|
||||
.Include("~/Sinort-Scripts/EmisorPN.js"));
|
||||
|
|
|
|||
16
AYA.SlnSynor/AYA.SlnSynor/Content/valid.css
Normal file
16
AYA.SlnSynor/AYA.SlnSynor/Content/valid.css
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#field { margin-left: .5em; float: left; }
|
||||
#field, label { float: left; font-family: Arial, Helvetica, sans-serif; font-size: small; }
|
||||
br { clear: both; }
|
||||
input { border: 1px solid black; margin-bottom: .5em; }
|
||||
input.error { border: 1px solid red; }
|
||||
label.error {
|
||||
background: url('images/unchecked.gif') no-repeat;
|
||||
padding-left: 16px;
|
||||
margin-left: .3em;
|
||||
}
|
||||
label.valid {
|
||||
background: url('images/checked.gif') no-repeat;
|
||||
display: block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
//$("#formCatalogo").EnableValidationToolTip();
|
||||
var DataCatalogo;
|
||||
var id_column = 1;
|
||||
var Item = {};
|
||||
|
|
@ -49,6 +49,7 @@ this.obtenerItems = function () {
|
|||
|
||||
|
||||
var uri = CatalogosWCF + '/api/ObtenerEmisoresPN';
|
||||
|
||||
var DTO = JSON.stringify(Item);
|
||||
STARTREQUEST();
|
||||
//$.getJSON(uri).done(function (data) {
|
||||
|
|
@ -284,18 +285,19 @@ this.InsertarItem = function () {
|
|||
if (!confirm("Va a ingresar un nuevo Emisor PN.\n ¿Desea continuar?"))
|
||||
{ return; }
|
||||
|
||||
STARTREQUEST();
|
||||
TableItems = $('#TableItems').DataTable();
|
||||
|
||||
Ejecutivo = {
|
||||
Descripcion: $("#txtDescripcion").val(),
|
||||
EmisorPN = {
|
||||
titulo: $("#txtDescripcion").val(),
|
||||
}
|
||||
|
||||
var uri = CatalogosWCF + '/api/InsertarEmisorPN';
|
||||
var DTO = JSON.stringify(Ejecutivo);
|
||||
var uri = CatalogosWCF + '/api/InsertarEmisoresPN';
|
||||
var DTO = JSON.stringify(EmisorPN);
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: server + uri,
|
||||
url: uri,
|
||||
cache: false,
|
||||
data: DTO,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
|
|
@ -331,6 +333,9 @@ this.limpiar = function () {
|
|||
|
||||
$('#txtDescripcion').val('');
|
||||
$("#formCatalogo").validateElement("#txtDescripcion");
|
||||
|
||||
$('#lbTituloAccion').empty();
|
||||
$('#lbTituloAccion').append('Ingresar Nuevo Emisor PN');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -139,6 +139,26 @@ replaceAll = function (find, replace, str) {
|
|||
return str.replace(new RegExp(find.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'g'), replace);
|
||||
};
|
||||
|
||||
$.fn.validateElement = function (controlId) {
|
||||
|
||||
var validator = this.validate();
|
||||
validator.element(controlId);
|
||||
|
||||
};
|
||||
|
||||
this.getRowIndex = function (TableItems, column_pos, value) {
|
||||
//busca en una tabla y compara un valor con el contenido en la columna especifica
|
||||
var indexes = null;
|
||||
|
||||
TableItems.rows().indexes().each(function (idx) {
|
||||
var row_id = TableItems.row(idx).data();
|
||||
if (row_id[column_pos] == value) {
|
||||
indexes = idx;
|
||||
}
|
||||
});
|
||||
return indexes;
|
||||
}
|
||||
|
||||
$.fn.TableInit = function (columnOrder, order, bPaginate, bFilter, bInfo, columnDefinition, data) {
|
||||
|
||||
var ES = {
|
||||
|
|
@ -192,7 +212,7 @@ $.fn.TableInit = function (columnOrder, order, bPaginate, bFilter, bInfo, column
|
|||
};
|
||||
|
||||
this.dataTable({
|
||||
"language": EN,
|
||||
"language": ES,
|
||||
"order": [[columnOrder, order]],
|
||||
"destroy": true,
|
||||
"bPaginate": bPaginate,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue