GrupoTematico
SubCategoriaGrupotematico git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C131
This commit is contained in:
parent
6db485ca22
commit
6155841ffd
7 changed files with 793 additions and 0 deletions
|
|
@ -7680,11 +7680,13 @@
|
||||||
<Content Include="Sinort-Scripts\Mantenimientos.js" />
|
<Content Include="Sinort-Scripts\Mantenimientos.js" />
|
||||||
<Content Include="Sinort-Scripts\PropuestaNormativa\DetallePropuestaNormativa.js" />
|
<Content Include="Sinort-Scripts\PropuestaNormativa\DetallePropuestaNormativa.js" />
|
||||||
<Content Include="Sinort-Scripts\PropuestaNormativa\Foro.js" />
|
<Content Include="Sinort-Scripts\PropuestaNormativa\Foro.js" />
|
||||||
|
<Content Include="Sinort-Scripts\GrupoTematico.js" />
|
||||||
<Content Include="Sinort-Scripts\PropuestaNormativa\PropuestaNormativa.js" />
|
<Content Include="Sinort-Scripts\PropuestaNormativa\PropuestaNormativa.js" />
|
||||||
<Content Include="Sinort-Scripts\ProyectoNormativo.js" />
|
<Content Include="Sinort-Scripts\ProyectoNormativo.js" />
|
||||||
<Content Include="Sinort-Scripts\Rol.js" />
|
<Content Include="Sinort-Scripts\Rol.js" />
|
||||||
<Content Include="Sinort-Scripts\ROTn.js" />
|
<Content Include="Sinort-Scripts\ROTn.js" />
|
||||||
<Content Include="Sinort-Scripts\SubCategoriaContenido.js" />
|
<Content Include="Sinort-Scripts\SubCategoriaContenido.js" />
|
||||||
|
<Content Include="Sinort-Scripts\SubCategoriaGrupoTematico.js" />
|
||||||
<Content Include="Sinort-Scripts\Usuario.js" />
|
<Content Include="Sinort-Scripts\Usuario.js" />
|
||||||
<Content Include="Web.config" />
|
<Content Include="Web.config" />
|
||||||
<Content Include="Web.Debug.config">
|
<Content Include="Web.Debug.config">
|
||||||
|
|
@ -7722,6 +7724,8 @@
|
||||||
<Content Include="Views\Catalogos\Usuario.cshtml" />
|
<Content Include="Views\Catalogos\Usuario.cshtml" />
|
||||||
<Content Include="Views\Catalogos\Contenido.cshtml" />
|
<Content Include="Views\Catalogos\Contenido.cshtml" />
|
||||||
<Content Include="Views\Catalogos\SubCategoriaContenido.cshtml" />
|
<Content Include="Views\Catalogos\SubCategoriaContenido.cshtml" />
|
||||||
|
<Content Include="Views\Catalogos\GrupoTematico.cshtml" />
|
||||||
|
<Content Include="Views\Catalogos\SubCategoriaGrupoTematico.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="App_Data\" />
|
<Folder Include="App_Data\" />
|
||||||
|
|
|
||||||
|
|
@ -45,5 +45,15 @@ namespace AYA.SlnSinort.Controllers.Catalogos
|
||||||
InitControllers();
|
InitControllers();
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
public ActionResult GrupoTematico()
|
||||||
|
{
|
||||||
|
InitControllers();
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
public ActionResult SubCategoriaGrupoTematico()
|
||||||
|
{
|
||||||
|
InitControllers();
|
||||||
|
return View();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
201
AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/GrupoTematico.js
Normal file
201
AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/GrupoTematico.js
Normal file
|
|
@ -0,0 +1,201 @@
|
||||||
|
var DataCatalogo;
|
||||||
|
var id_column = 1;
|
||||||
|
var Item = {};
|
||||||
|
|
||||||
|
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
|
getDataModel();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
this.getDataModel = function () {
|
||||||
|
|
||||||
|
$('#txtDescripcion').attr('size', 50);
|
||||||
|
|
||||||
|
$('#btnGuardar').hide();
|
||||||
|
$('#btnInsertar').show();
|
||||||
|
|
||||||
|
|
||||||
|
$('#btnLimpiarControles').click(function () {
|
||||||
|
LimpiarControles();
|
||||||
|
|
||||||
|
$('#btnGuardar').hide();
|
||||||
|
$('#btnInsertar').show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#btnGuardar').click(function () {
|
||||||
|
ActualizarItem();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#btnInsertar').click(function () {
|
||||||
|
InsertarItem();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('#TableItems').TableInit(0, false, true, true, false, null, null);
|
||||||
|
ObtenerGrupoTematico();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CargarGridGrupoTematico = function (data) {
|
||||||
|
|
||||||
|
var TableItems = $('#TableItems').DataTable();
|
||||||
|
var lista = data;
|
||||||
|
|
||||||
|
$.each(lista, function (key, item) {
|
||||||
|
|
||||||
|
var option = $("#ucItemsCatalogo").html();
|
||||||
|
|
||||||
|
option = replaceAll("[$CodItem]", item.IdGrupoTematico, option);
|
||||||
|
|
||||||
|
var stateIcon = $("#ucItemsIcon").html();
|
||||||
|
|
||||||
|
if (item.Estado == false) {
|
||||||
|
stateIcon = replaceAll("[$icon]", "fa-check-circle", stateIcon);
|
||||||
|
stateIcon = replaceAll("[$state_color]", "muted", stateIcon);
|
||||||
|
|
||||||
|
option = replaceAll("[$opcion]", "Habilitar", option);
|
||||||
|
option = replaceAll("[$icon]", "fa-check", option);
|
||||||
|
option = replaceAll("[$value]", "1", option);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
stateIcon = replaceAll("[$icon]", "fa-check-circle", stateIcon);
|
||||||
|
stateIcon = replaceAll("[$state_color]", "success", stateIcon);
|
||||||
|
|
||||||
|
option = replaceAll("[$opcion]", "Deshabilitar", option);
|
||||||
|
option = replaceAll("[$icon]", "fa-times", option);
|
||||||
|
option = replaceAll("[$value]", "0", option);
|
||||||
|
}
|
||||||
|
TableItems.column(1).visible(false);
|
||||||
|
TableItems.row.add([stateIcon,
|
||||||
|
item.IdGrupoTematico,
|
||||||
|
item.Descripcion,
|
||||||
|
option]).draw();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ObtenerGrupoTematico = function () {
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/ObtenerGrupoTematico';
|
||||||
|
AjaxPostData(uri, null, false, false, CargarGridGrupoTematico, null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.EditarItem = function (id) {
|
||||||
|
|
||||||
|
TableItems = $('#TableItems').DataTable();
|
||||||
|
LimpiarControles();
|
||||||
|
var indexes = getRowIndex(TableItems, id_column, id);
|
||||||
|
|
||||||
|
if (indexes != null) {
|
||||||
|
|
||||||
|
$('#hiddenId').val(id)
|
||||||
|
$('#txtDescripcion').val(TableItems.cell(indexes, 2).data());
|
||||||
|
|
||||||
|
$("#formCatalogo").validateElement("#txtDescripcion");
|
||||||
|
|
||||||
|
$('#lbTituloAccion').empty();
|
||||||
|
$('#lbTituloAccion').append('Editar Valor de Campo ID: ' + id);
|
||||||
|
|
||||||
|
$('#btnInsertar').hide();
|
||||||
|
$('#btnGuardar').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.toggleEnabledItem = function (id, value) {
|
||||||
|
|
||||||
|
var msg = '¿Está seguro que desea habilitar el Grupo Temático?';
|
||||||
|
|
||||||
|
if (value == 0) {
|
||||||
|
msg = '¿Está seguro que desea deshabilitar el Grupo Temático?';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id == null || value == null) {
|
||||||
|
toastr.warning("No se pudo obtener el ID del Grupo Temático seleccionado.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!confirm(msg))
|
||||||
|
{ return; }
|
||||||
|
|
||||||
|
TableItems = $('#TableItems').DataTable();
|
||||||
|
|
||||||
|
GrupoTematico = {
|
||||||
|
IdGrupoTematico: id,
|
||||||
|
Estado: value
|
||||||
|
}
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/InsertarActualizarGrupoTematico';
|
||||||
|
AjaxPostData(uri, GrupoTematico , true, true, CompletarAccion, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ActualizarItem = function () {
|
||||||
|
|
||||||
|
if (!$("#formCatalogo").valid()) {
|
||||||
|
toastr.warning("Ingresar todos los campos que son requeridos.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!confirm("Se guardarán los cambios.\n ¿Desea continuar?"))
|
||||||
|
{ return; }
|
||||||
|
|
||||||
|
TableItems = $('#TableItems').DataTable();
|
||||||
|
|
||||||
|
GrupoTematico = {
|
||||||
|
IdGrupoTematico: $('#hiddenId').val(),
|
||||||
|
Descripcion: $('#txtDescripcion').val()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/InsertarActualizarGrupoTematico';
|
||||||
|
AjaxPostData(uri, GrupoTematico , true, true, CompletarAccion, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.InsertarItem = function () {
|
||||||
|
|
||||||
|
|
||||||
|
if (!$("#formCatalogo").valid()) {
|
||||||
|
toastr.warning("Ingresar todos los campos que son requeridos.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!confirm("Va a ingresar un nuevo Grupo Temático .\n ¿Desea continuar?"))
|
||||||
|
{ return; }
|
||||||
|
|
||||||
|
|
||||||
|
TableItems = $('#TableItems').DataTable();
|
||||||
|
|
||||||
|
GrupoTematico = {
|
||||||
|
Estado: 1,
|
||||||
|
Descripcion: $("#txtDescripcion").val()
|
||||||
|
}
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/InsertarActualizarGrupoTematico';
|
||||||
|
AjaxPostData(uri, GrupoTematico , true, true, CompletarAccion, null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CompletarAccion = function () {
|
||||||
|
$('#btnGuardar').hide();
|
||||||
|
$('#btnInsertar').show();
|
||||||
|
|
||||||
|
TableItems.clear().draw();
|
||||||
|
ObtenerGrupoTematico();
|
||||||
|
LimpiarControles();
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.LimpiarControles = function () {
|
||||||
|
|
||||||
|
$('#txtDescripcion').val('');
|
||||||
|
$("#formCatalogo").validateElement("#txtDescripcion");
|
||||||
|
|
||||||
|
$('#lbTituloAccion').empty();
|
||||||
|
$('#lbTituloAccion').append('Ingresar Nuevo Grupo Temático');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,285 @@
|
||||||
|
var DataCatalogo;
|
||||||
|
var id_column = 1;
|
||||||
|
var Item = {};
|
||||||
|
|
||||||
|
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
|
getDataModel();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
this.getDataModel = function () {
|
||||||
|
|
||||||
|
CargarGrupoTematico();
|
||||||
|
|
||||||
|
|
||||||
|
$('#txtDescripcion').attr('size', 50);
|
||||||
|
|
||||||
|
$('#btnGuardar').hide();
|
||||||
|
$('#btnInsertar').show();
|
||||||
|
|
||||||
|
|
||||||
|
$('#btnLimpiarControles').click(function () {
|
||||||
|
LimpiarControles();
|
||||||
|
|
||||||
|
$('#btnGuardar').hide();
|
||||||
|
$('#btnInsertar').show();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#btnGuardar').click(function () {
|
||||||
|
ActualizarItem();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#btnInsertar').click(function () {
|
||||||
|
InsertarItem();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#btnBuscarGrupoTematico").unbind("click");
|
||||||
|
$("#btnBuscarGrupoTematico").click(function () {
|
||||||
|
|
||||||
|
SelectedCatalog = 'GrupoTematico';
|
||||||
|
|
||||||
|
if ($.fn.DataTable.isDataTable('#tableGrupoTematico')) {
|
||||||
|
|
||||||
|
LoadMessage();
|
||||||
|
|
||||||
|
$('#tableGrupoTematico').DataTable().search('').draw();
|
||||||
|
|
||||||
|
$('#modalGrupoTematico').modal('show');
|
||||||
|
|
||||||
|
ENDREQUEST();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('#tableGrupoTematico').on('click', 'button', function () {
|
||||||
|
|
||||||
|
var data = $('#tableGrupoTematico').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
||||||
|
if (SelectedCatalog == "GrupoTematico") {
|
||||||
|
|
||||||
|
$('#hiddenGrupoTematico').val(data.codigo);
|
||||||
|
$('#txtGrupoTematico').val(data.descripcion);
|
||||||
|
}
|
||||||
|
$('#modalGrupoTematico').modal('hide');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#TableItems').TableInit(0, false, true, true, false, null, null);
|
||||||
|
ObtenerSubCategoriaGrupoTematico();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.CargarGrupoTematico = function (filtro) {
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/ObtenerGrupoTematicoPopUp';
|
||||||
|
var model = {
|
||||||
|
|
||||||
|
filtro: filtro == null ? '' : '&filtro=' + filtro
|
||||||
|
}
|
||||||
|
|
||||||
|
AjaxPostData(uri, model, false, false, CargarGridGrupoTematico, null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.CargarGridGrupoTematico = function (data) {
|
||||||
|
|
||||||
|
if (data != null) {
|
||||||
|
|
||||||
|
listaGrupoTematico = data;
|
||||||
|
|
||||||
|
var Seleccionar = $("#ucBtnSeleccionarCatalogo").html();
|
||||||
|
|
||||||
|
var columnDefinition = [
|
||||||
|
{ "data": null, className: "center", defaultContent: Seleccionar },
|
||||||
|
{ "data": "codigo" },
|
||||||
|
{ "data": "descripcion" }
|
||||||
|
];
|
||||||
|
|
||||||
|
$('#tableGrupoTematico').TableInit(0, false, true, true, false, columnDefinition, listaGrupoTematico, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
|
toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CargarGridSubCategoriaGrupoTematico = function (data) {
|
||||||
|
|
||||||
|
var TableItems = $('#TableItems').DataTable();
|
||||||
|
var lista = data;
|
||||||
|
|
||||||
|
$.each(lista, function (key, item) {
|
||||||
|
|
||||||
|
var option = $("#ucItemsCatalogo").html();
|
||||||
|
|
||||||
|
option = replaceAll("[$CodItem]", item.IdSubCategoriaGrupoTematico, option);
|
||||||
|
|
||||||
|
var stateIcon = $("#ucItemsIcon").html();
|
||||||
|
|
||||||
|
if (item.Estado == false) {
|
||||||
|
stateIcon = replaceAll("[$icon]", "fa-check-circle", stateIcon);
|
||||||
|
stateIcon = replaceAll("[$state_color]", "muted", stateIcon);
|
||||||
|
|
||||||
|
option = replaceAll("[$opcion]", "Habilitar", option);
|
||||||
|
option = replaceAll("[$icon]", "fa-check", option);
|
||||||
|
option = replaceAll("[$value]", "1", option);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
stateIcon = replaceAll("[$icon]", "fa-check-circle", stateIcon);
|
||||||
|
stateIcon = replaceAll("[$state_color]", "success", stateIcon);
|
||||||
|
|
||||||
|
option = replaceAll("[$opcion]", "Deshabilitar", option);
|
||||||
|
option = replaceAll("[$icon]", "fa-times", option);
|
||||||
|
option = replaceAll("[$value]", "0", option);
|
||||||
|
}
|
||||||
|
TableItems.column(1).visible(false);
|
||||||
|
TableItems.column(3).visible(false);
|
||||||
|
|
||||||
|
TableItems.row.add([stateIcon,
|
||||||
|
item.IdSubCategoriaGrupoTematico,
|
||||||
|
item.Descripcion,
|
||||||
|
item.GrupoTematico.IdGrupoTematico,
|
||||||
|
item.GrupoTematico.Descripcion,
|
||||||
|
option]).draw();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ObtenerSubCategoriaGrupoTematico = function () {
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/ObtenerSubCategoriaGrupoTematico';
|
||||||
|
AjaxPostData(uri, null, false, false, CargarGridSubCategoriaGrupoTematico, null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.EditarItem = function (id) {
|
||||||
|
|
||||||
|
TableItems = $('#TableItems').DataTable();
|
||||||
|
LimpiarControles();
|
||||||
|
var indexes = getRowIndex(TableItems, id_column, id);
|
||||||
|
|
||||||
|
if (indexes != null) {
|
||||||
|
|
||||||
|
$("#hiddenGrupoTematico").val(TableItems.cell(indexes, 3).data());
|
||||||
|
$("#txtGrupoTematico").val(TableItems.cell(indexes, 4).data());
|
||||||
|
|
||||||
|
|
||||||
|
$('#hiddenId').val(id)
|
||||||
|
|
||||||
|
$('#txtDescripcion').val(TableItems.cell(indexes, 2).data());
|
||||||
|
|
||||||
|
$("#formCatalogo").validateElement("#txtDescripcion");
|
||||||
|
|
||||||
|
$('#lbTituloAccion').empty();
|
||||||
|
$('#lbTituloAccion').append('Editar Valor de Campo ID: ' + id);
|
||||||
|
|
||||||
|
$('#btnInsertar').hide();
|
||||||
|
$('#btnGuardar').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.toggleEnabledItem = function (id, value) {
|
||||||
|
|
||||||
|
var msg = '¿Está seguro que desea habilitar la Sub Categoria del Grupo Temático ?';
|
||||||
|
|
||||||
|
if (value == 0) {
|
||||||
|
msg = '¿Está seguro que desea deshabilitar la Sub Categoria del Grupo Temático ?';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id == null || value == null) {
|
||||||
|
toastr.warning("No se pudo obtener el ID de la Sub Categoria del Grupo Temático seleccionado.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!confirm(msg))
|
||||||
|
{ return; }
|
||||||
|
|
||||||
|
TableItems = $('#TableItems').DataTable();
|
||||||
|
|
||||||
|
SubCategoriaGrupoTematico = {
|
||||||
|
IdSubCategoriaGrupoTematico: id,
|
||||||
|
Estado: value
|
||||||
|
}
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/InsertarActualizarSubCategoriaGrupoTematico';
|
||||||
|
AjaxPostData(uri, SubCategoriaGrupoTematico, true, true, CompletarAccion, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ActualizarItem = function () {
|
||||||
|
|
||||||
|
if (!$("#formCatalogo").valid()) {
|
||||||
|
toastr.warning("Ingresar todos los campos que son requeridos.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!confirm("Se guardarán los cambios.\n ¿Desea continuar?"))
|
||||||
|
{ return; }
|
||||||
|
|
||||||
|
TableItems = $('#TableItems').DataTable();
|
||||||
|
|
||||||
|
SubCategoriaGrupoTematico = {
|
||||||
|
IdGrupoTematico: $("#hiddenGrupoTematico").val(),
|
||||||
|
IdSubCategoriaGrupoTematico: $('#hiddenId').val(),
|
||||||
|
Descripcion: $('#txtDescripcion').val()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/InsertarActualizarSubCategoriaGrupoTematico';
|
||||||
|
AjaxPostData(uri, SubCategoriaGrupoTematico, true, true, CompletarAccion, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.InsertarItem = function () {
|
||||||
|
|
||||||
|
|
||||||
|
if (!$("#formCatalogo").valid()) {
|
||||||
|
toastr.warning("Ingresar todos los campos que son requeridos.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!confirm("Va a ingresar una nueva Sub Categoria de Grupo Temático .\n ¿Desea continuar?"))
|
||||||
|
{ return; }
|
||||||
|
|
||||||
|
|
||||||
|
TableItems = $('#TableItems').DataTable();
|
||||||
|
|
||||||
|
SubCategoriaGrupoTematico = {
|
||||||
|
Estado: 1,
|
||||||
|
IdGrupoTematico: $("#hiddenGrupoTematico").val(),
|
||||||
|
Descripcion: $("#txtDescripcion").val()
|
||||||
|
}
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/InsertarActualizarSubCategoriaGrupoTematico';
|
||||||
|
AjaxPostData(uri, SubCategoriaGrupoTematico, true, true, CompletarAccion, null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CompletarAccion = function () {
|
||||||
|
$('#btnGuardar').hide();
|
||||||
|
$('#btnInsertar').show();
|
||||||
|
|
||||||
|
TableItems.clear().draw();
|
||||||
|
ObtenerSubCategoriaGrupoTematico();
|
||||||
|
LimpiarControles();
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.LimpiarControles = function () {
|
||||||
|
|
||||||
|
$('#txtDescripcion').val('');
|
||||||
|
$("#formCatalogo").validateElement("#txtDescripcion");
|
||||||
|
|
||||||
|
$('#lbTituloAccion').empty();
|
||||||
|
$('#lbTituloAccion').append('Ingresar Nueva Sub Categoria de Grupo Temático');
|
||||||
|
}
|
||||||
109
AYA.SlnSynor/AYA.SlnSynor/Views/Catalogos/GrupoTematico.cshtml
Normal file
109
AYA.SlnSynor/AYA.SlnSynor/Views/Catalogos/GrupoTematico.cshtml
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
@{
|
||||||
|
ViewBag.Title = "GrupoTematico";
|
||||||
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
<input type="hidden" id="hiddenId" value="true">
|
||||||
|
<form id="formCatalogo" class="form-horizontal" role="form">
|
||||||
|
<div class="panel-body"> <h3> <i class="fa fa-briefcase"></i> Grupo Temático </h3> </div>
|
||||||
|
<div class="panel panel-success">
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<table id="TableItems" class="display">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th class="col-sm-1">ID</th>
|
||||||
|
<th class="col-sm-4">Descripción</th>
|
||||||
|
@*<th class="col-sm-4">Tipo Emisor</th>*@
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
<div id="ucItemsIcon" style="display:none;">
|
||||||
|
<div class="text-[$state_color]">
|
||||||
|
<i class="fa [$icon] fa-2x"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="ucItemsCatalogo" style="display:none;">
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-info dropdown-toggle btn-xs" data-toggle="dropdown">
|
||||||
|
<i class="fa fa-wrench"></i> Opciones <span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu" role="menu">
|
||||||
|
<li><a href="javascript: EditarItem([$CodItem]);"><i class="fa fa-wrench"></i> Editar</a></li>
|
||||||
|
<li><a href="javascript: toggleEnabledItem([$CodItem],[$value]);"><i class="fa [$icon]"></i> [$opcion]</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="panel panel-success">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h4 class="panel-title">
|
||||||
|
<i class="fa fa-bars"></i> <label id="lbTituloAccion">Ingresar Nuevo Contenido</label>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
|
||||||
|
@*Descripción*@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms">Descripción</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="txtDescripcion" name="txtDescripcion" class="form-control imput-xs" required="required" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2"></label>
|
||||||
|
<div class="col-md-4 ">
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-default btn-sm pull-right" id="btnLimpiar">
|
||||||
|
<span class="fa fa-eraser" aria-hidden="true"></span> Limpiar
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4 ">
|
||||||
|
<button type="button" class="btn btn-default btn-sm pull-right" id="btnInsertar">
|
||||||
|
<span class="fa fa-upload" aria-hidden="true"></span> Insertar
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-default btn-sm pull-right" id="btnGuardar">
|
||||||
|
<span class="fa fa-floppy-o" aria-hidden="true"></span> Guardar
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
@Scripts.Render("~/Sinort-Scripts/GrupoTematico.js")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,184 @@
|
||||||
|
@{
|
||||||
|
ViewBag.Title = "SubCategoriaGrupoTematico";
|
||||||
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
<input type="hidden" id="hiddenId" value="true">
|
||||||
|
<input type="hidden" id="hiddenContenido" value="true">
|
||||||
|
|
||||||
|
<form id="formCatalogo" class="form-horizontal" role="form">
|
||||||
|
<div class="panel-body"> <h3> <i class="fa fa-briefcase"></i> Sub Categoria Grupo Temático </h3> </div>
|
||||||
|
<div class="panel panel-success">
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table id="TableItems" class="display">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th class="col-sm-1">ID</th>
|
||||||
|
<th class="col-sm-4">Descripción</th>
|
||||||
|
<th class="col-sm-4">IdGrupoTematico</th>
|
||||||
|
<th class="col-sm-4">GrupoTematico</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
<div id="ucItemsIcon" style="display:none;">
|
||||||
|
<div class="text-[$state_color]">
|
||||||
|
<i class="fa [$icon] fa-2x"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="ucItemsCatalogo" style="display:none;">
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-info dropdown-toggle btn-xs" data-toggle="dropdown">
|
||||||
|
<i class="fa fa-wrench"></i> Opciones <span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu" role="menu">
|
||||||
|
<li><a href="javascript: EditarItem([$CodItem]);"><i class="fa fa-wrench"></i> Editar</a></li>
|
||||||
|
<li><a href="javascript: toggleEnabledItem([$CodItem],[$value]);"><i class="fa [$icon]"></i> [$opcion]</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="panel panel-success">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h4 class="panel-title">
|
||||||
|
<i class="fa fa-bars"></i> <label id="lbTituloAccion">Ingresar Nueva Sub Categoria Grupo Temático</label>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
|
||||||
|
@*Descripción*@
|
||||||
|
|
||||||
|
@*--------------------- Catalogo de Grupo Tematico ---------------------------------------------------------*@
|
||||||
|
|
||||||
|
<div class="form-group" id="divGrupoTematico">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms" id="lblGrupoTematico">Grupo Temático</label>
|
||||||
|
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||||
|
<input id="hiddenGrupoTematico" type="hidden">
|
||||||
|
<input name="txtGrupoTematico" title="" class="form-control TextBoxCatalogo inputWarning error" id="txtGrupoTematico" required="required" type="text" readonly="readonly" data-original-title="">
|
||||||
|
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button class="btn btn-default btn-medium" id="btn_eliminarGrupoTematico" type="button">
|
||||||
|
<i class="fa fa-close"></i>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-success btn-medium btn-margin-catalogo" id="btnBuscarGrupoTematico" type="button">
|
||||||
|
<i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@*--------------------- Fin Catalogo de Grupo Tematico ---------------------------------------------------------*@
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms">Descripción</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="txtDescripcion" name="txtDescripcion" class="form-control imput-xs" required="required" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2"></label>
|
||||||
|
<div class="col-md-4 ">
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-default btn-sm pull-right" id="btnLimpiar">
|
||||||
|
<span class="fa fa-eraser" aria-hidden="true"></span> Limpiar
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4 ">
|
||||||
|
<button type="button" class="btn btn-default btn-sm pull-right" id="btnInsertar">
|
||||||
|
<span class="fa fa-upload" aria-hidden="true"></span> Insertar
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-default btn-sm pull-right" id="btnGuardar">
|
||||||
|
<span class="fa fa-floppy-o" aria-hidden="true"></span> Guardar
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div id="ucBtnSeleccionarCatalogo" style="display:none;">
|
||||||
|
<button type="button" id="btnSeleccionarCatalogo" class="btn btn-default btn-xs">
|
||||||
|
<i id="ibtnSeleccionarCatalogo" class="fa fa-check"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@section Modals{
|
||||||
|
|
||||||
|
@*---------------------Catalogo Grupo Tematico ---------------------------------------------------------*@
|
||||||
|
<div class="modal fade" id="modalGrupoTematico" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="display: none;">
|
||||||
|
<div class="modal-dialog modal-lg" style="width:40%;">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h4 class="modal-title">Catálogo Grupo Temático</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<table id="tableGrupoTematico" class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>Código</th>
|
||||||
|
<th>Descripción</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
@Scripts.Render("~/Sinort-Scripts/SubCategoriaGrupoTematico.js")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue