git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C40
This commit is contained in:
parent
ad1bc76f7f
commit
cc2573fa53
4 changed files with 1 additions and 175 deletions
|
|
@ -82,9 +82,7 @@
|
|||
<DependentUpon>SinortCatalogos.svc</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Content Include="packages.config" />
|
||||
<None Include="Web.Debug.config">
|
||||
|
|
|
|||
|
|
@ -7669,7 +7669,6 @@
|
|||
<Content Include="Scripts\umd\popper.js" />
|
||||
<Content Include="Scripts\umd\popper.min.js" />
|
||||
<Content Include="Scripts\_references.js" />
|
||||
<Content Include="Sinort-Scripts\AdministrarCatalogos.js" />
|
||||
<Content Include="Sinort-Scripts\Aplicacion.js" />
|
||||
<Content Include="Sinort-Scripts\EmisorPN.js" />
|
||||
<Content Include="Sinort-Scripts\Global.js" />
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,171 +0,0 @@
|
|||
var filtro = {};
|
||||
$(document).ready(function () {
|
||||
|
||||
IniciarForm();
|
||||
|
||||
|
||||
});
|
||||
|
||||
function IniciarForm() {
|
||||
IniciarGridEmisoresPN(null);
|
||||
|
||||
btnNuevo = $("#btnNuevo").click(NuevoEmisorPN);
|
||||
//btnEliminar = $("#btnEliminar").click(EliminarEmisorPN);
|
||||
btnBuscar = $("#btnBuscar").click(function () {
|
||||
filtro =
|
||||
{
|
||||
titulo: $("#buscar_titulo").val()
|
||||
};
|
||||
|
||||
ObtenerEmisoresPN(filtro);
|
||||
});
|
||||
|
||||
ObtenerEmisoresPN(filtro);
|
||||
}
|
||||
|
||||
function NuevoEmisorPN(e) {
|
||||
e.preventDefault;
|
||||
$('#dlg').dialog('open').dialog('center').dialog('setTitle', 'Nuevo Emisor PN');
|
||||
$('#fm').form('clear');
|
||||
url = "/Catalogos/InsertarEmisorPN";
|
||||
}
|
||||
|
||||
function EliminarEmisorPN(e) {
|
||||
e.preventDefault;
|
||||
var row = gridEmisorPN.datagrid('getSelected');
|
||||
if (row) {
|
||||
$.messager.confirm({
|
||||
title: 'Confirmar',
|
||||
msg: '<div style="text-align: center"> Desea eliminar este emisor ?</div>',
|
||||
width: "50%",
|
||||
fn: function (r) {
|
||||
if (r) {
|
||||
var uri = '/Catalogos/EliminarEmisorPN';
|
||||
var DTO = JSON.stringify(row);
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: uri,
|
||||
cache: false,
|
||||
data: DTO,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
success: function (response, data) {
|
||||
if (response.CodigoRespuesta !== "1") {
|
||||
Mensajes(response);
|
||||
}
|
||||
else {
|
||||
Mensajes(response);
|
||||
ObtenerEmisoresPN(filtro);
|
||||
gridEmisorPN.datagrid('reload');
|
||||
}
|
||||
}
|
||||
}).fail(function (jqxhr, textStatus, error) {
|
||||
}).then(function (value) {
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function EditarEmisorPN(e) {
|
||||
var row = gridEmisorPN.datagrid('getSelected');
|
||||
$('#fmEdit').form('clear');
|
||||
if (row) {
|
||||
$('#dlgEdit').dialog('open').dialog('center').dialog('setTitle', 'Editar Emisor PN');
|
||||
$('#fmEdit').form('load', row);
|
||||
url = "/Catalogos/EditarEmisorPN";
|
||||
}
|
||||
}
|
||||
|
||||
function AplicarCambios(nuevo) {
|
||||
if (nuevo) {
|
||||
|
||||
emisorPN = {
|
||||
titulo: $("#titulo").val()
|
||||
};
|
||||
|
||||
var DTO = JSON.stringify(emisorPN);
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
cache: false,
|
||||
data: DTO,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
success: function (response, data) {
|
||||
if (response.CodigoRespuesta !== "1") {
|
||||
Mensajes(response);
|
||||
} else {
|
||||
Mensajes(response);
|
||||
$('#dlg').dialog('close');
|
||||
gridEmisorPN.datagrid('options').pageNumber = 0;
|
||||
gridEmisorPN.datagrid('loadData', []);
|
||||
gridEmisorPN.datagrid('reload');
|
||||
}
|
||||
}
|
||||
}).fail(function (jqxhr, textStatus, error) {
|
||||
}).then(function (value) {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function IniciarGridEmisoresPN(data) {
|
||||
gridEmisorPN = $('#grid_emisoresPN').datagrid({
|
||||
data: data,
|
||||
columns: [[
|
||||
//{ field: 'id_emisor', title: 'ID EMISOR', auto: true },
|
||||
{ field: 'titulo', title: 'TITULO', align: 'center'},
|
||||
//{
|
||||
// field: 'action', title: 'ACCIONES', align: 'center', haling: 'center',
|
||||
// formatter: function (value, row, index) {
|
||||
// var editar = '<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onClick="EditarEmisorPN(this)" >Editar</a>';
|
||||
// return editar;
|
||||
// }
|
||||
//}
|
||||
|
||||
]],
|
||||
pagination: true,
|
||||
singleSelect: true,
|
||||
//fitColumns: true,
|
||||
rowNumbers: true,
|
||||
toolbar: "#toolbar"
|
||||
|
||||
, onLoadSuccess: function () {
|
||||
$(this).datagrid('getPanel')
|
||||
.find('a.easyui-linkbutton').linkbutton();
|
||||
}
|
||||
, loadFilter: pagerFilter
|
||||
});
|
||||
}
|
||||
|
||||
function ObtenerEmisoresPN(filtro) {
|
||||
var uri = CatalogosWCF + '/api/ObtenerEmisoresPN';
|
||||
var DTO = JSON.stringify(filtro);
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: uri,
|
||||
cache: false,
|
||||
data: DTO,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
beforeSend: function(){
|
||||
STARTREQUEST();
|
||||
},
|
||||
success: function (response, data) {
|
||||
if (response.d.CodigoRespuesta !== "1") {
|
||||
Mensajes(response.d);
|
||||
gridEmisorPN.datagrid('options').pageNumber = 0;
|
||||
gridEmisorPN.datagrid('loadData', []);
|
||||
}
|
||||
else {
|
||||
IniciarGridEmisoresPN(response.d.ListaEmisores);
|
||||
}
|
||||
|
||||
ENDREQUEST();
|
||||
}
|
||||
}).fail(function (jqxhr, textStatus, error) {
|
||||
ENDREQUEST();
|
||||
}).then(function (value) {
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue