From 322a552cab4aca32ef3b232f24550a272f9beb3c Mon Sep 17 00:00:00 2001 From: "jzuniga:1" Date: Fri, 15 Jun 2018 19:37:00 +0000 Subject: [PATCH] git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C59 --- .../AYA.SlnSynor.WCF/AYA.SlnSinort.WCF.csproj | 1 + .../PublishProfiles/AYA.SlnSinort.WCF.pubxml | 17 +++ .../AYA.SlnSynor/AYA.SlnSinort.csproj | 2 + .../AYA.SlnSynor/App_Start/BundleConfig.cs | 3 + .../PublishProfiles/AYA.SlnSinort.pubxml | 17 +++ .../PropuestaNormativa/PropuestaNormativa.js | 136 +++++++++++++++++- .../Views/Shared/_Catalogo.cshtml | 1 + 7 files changed, 176 insertions(+), 1 deletion(-) create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Properties/PublishProfiles/AYA.SlnSinort.WCF.pubxml create mode 100644 AYA.SlnSynor/AYA.SlnSynor/Properties/PublishProfiles/AYA.SlnSinort.pubxml create mode 100644 AYA.SlnSynor/AYA.SlnSynor/Views/Shared/_Catalogo.cshtml diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/AYA.SlnSinort.WCF.csproj b/AYA.SlnSynor/AYA.SlnSynor.WCF/AYA.SlnSinort.WCF.csproj index 92bb371bf..f1a5defdd 100644 --- a/AYA.SlnSynor/AYA.SlnSynor.WCF/AYA.SlnSinort.WCF.csproj +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/AYA.SlnSinort.WCF.csproj @@ -74,6 +74,7 @@ + diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Properties/PublishProfiles/AYA.SlnSinort.WCF.pubxml b/AYA.SlnSynor/AYA.SlnSynor.WCF/Properties/PublishProfiles/AYA.SlnSinort.WCF.pubxml new file mode 100644 index 000000000..aa1b24ea7 --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Properties/PublishProfiles/AYA.SlnSinort.WCF.pubxml @@ -0,0 +1,17 @@ + + + + + FileSystem + Release + Any CPU + + True + False + C:\Proyectos\AYA.SlnSinort.WCF + False + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj b/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj index 8704f91cc..49a1d2598 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj +++ b/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj @@ -7593,6 +7593,7 @@ + @@ -7714,6 +7715,7 @@ + diff --git a/AYA.SlnSynor/AYA.SlnSynor/App_Start/BundleConfig.cs b/AYA.SlnSynor/AYA.SlnSynor/App_Start/BundleConfig.cs index 165ae0dc8..4fb2ecb8b 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/App_Start/BundleConfig.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/App_Start/BundleConfig.cs @@ -55,6 +55,9 @@ namespace AYA.SlnSinort //AGREGAR SIGUIENTES SCRIPTS + + bundles.Add(new ScriptBundle("~/Scripts/Sinort-PropuestaNormativa") + .Include("~/Sinort-Scripts/PropuestaNormativa/PropuestaNormativa.js")); } } } diff --git a/AYA.SlnSynor/AYA.SlnSynor/Properties/PublishProfiles/AYA.SlnSinort.pubxml b/AYA.SlnSynor/AYA.SlnSynor/Properties/PublishProfiles/AYA.SlnSinort.pubxml new file mode 100644 index 000000000..bb5487cec --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor/Properties/PublishProfiles/AYA.SlnSinort.pubxml @@ -0,0 +1,17 @@ + + + + + FileSystem + Release + Any CPU + + True + False + C:\Proyectos\AYA.SlnSinort + False + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/PropuestaNormativa.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/PropuestaNormativa.js index 5f282702b..1e6bb8943 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/PropuestaNormativa.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/PropuestaNormativa/PropuestaNormativa.js @@ -1 +1,135 @@ - \ No newline at end of file +//$("#formPropuestaNormativa").EnableValidationToolTip(); + + +//jQuery(document).ready(function () { + + +// getDataModel(); + + +//}); + + + + +//this.CargarDataCatalogo = function (Direccion, filtro, model) { + +// $("#txtDescripcion").val(filtro); + +// var uri = IsNullOrEmpty(Direccion) ? $("#btn" + SelectedCatalog).attr("Direccion_API") : $.trim(Direccion); + +// var UseHttpPost = $("#btn" + SelectedCatalog).attr("UseHttpPost"); + +// var WebApplication_Name = $("#btn" + SelectedCatalog).attr("WebApplication"); + +// if (IsNullOrEmpty(uri)) { +// toastr.warning("Debe definir la dirección del WebAPI para el catálogo.", Message_Warning); +// return; +// } + +// var Url = IsNullOrEmpty(WebApplication_Name) ? server + uri : window.location.protocol + "//" + window.location.hostname + "/" + WebApplication_Name + "/" + uri; + +// var parametros = arguments; + +// $("#btnBuscar").unbind("click"); +// $("#btnBuscar").click(function () { +// parametros[1] = $("#txtDescripcion").val(); +// CargarDataCatalogo.apply(this, parametros); +// }); + +// if (UseHttpPost != "1") { +// Url = Url + "?filtro=" + (filtro == null ? "" : encodeURIComponent(filtro)); + +// //busca n extras parametros para colocar en el request del get +// var countId = 1; +// for (var i = 2; i < arguments.length; i++) { +// var id = arguments[i]; +// if (countId == 1) +// Url += (id == null ? "" : "&id=" + encodeURIComponent(id)); +// else +// Url += (id == null ? "" : "&id" + countId + "=" + encodeURIComponent(id)); +// countId++; +// } + +// AjaxGetData(Url, true, false, CargarTablaCatalogo); +// } +// else { + +// model = IsNullOrEmpty(model) ? {} : model; +// model.filtro = filtro; + +// AjaxPostData(Url, model, true, false, CargarTablaCatalogo); +// } +//} + +//this.CargarTablaCatalogo = function (data) { + +// if (data != null) { + +// lista = data; + +// var Seleccionar = $("#ucBtnSeleccionar").html(); + +// var columnDefinition = [ +// { "data": null, "width": "10%", className: "center", defaultContent: Seleccionar }, +// { "data": "codigo", "width": "5%" }, +// { "data": "descripcion", "width": "85%" } +// ]; + +// $('#tableCatalogo').TableInit(0, false, true, false, false, columnDefinition, lista); + +// if ($.fn.DataTable.isDataTable('#tableCatalogo')) { + +// LoadMessage(); + +// $('#tableCatalogo').DataTable().search('').draw(); + +// } + +// } + +// $('#divmodalCatalogo').modal('show'); + +// ENDREQUEST(); +//} + +//$('#tableCatalogo').on('click', 'button', function () { + +// var data = $('#tableCatalogo').DataTable().row($(this).parents('tr')).data(); + +// //verifica que no es multiple +// if ($("#btn" + SelectedCatalog).attr("CatalogoMultiple") != 1) { + +// $("#hidden" + SelectedCatalog).val(data.codigo); +// $("#txt" + SelectedCatalog).val(data.descripcion); + +// } +// else { + +// var existe = $.grep($("#txt" + SelectedCatalog + " option"), function (item, id) { return $(item).val() == data.codigo }); +// var MaxItems = $('#btn' + SelectedCatalog).attr("MaxItems"); + +// if (existe.length > 0) +// toastr.warning("Esta opción ya fue agregada.", Message_Warning); +// else if (MaxItems > 0 && MaxItems < ($("#txt" + SelectedCatalog + " option").length + 1)) +// toastr.warning("Solo se permite ingresar un máximo de " + MaxItems + " opciones.", Message_Warning); +// else { +// $("#txt" + SelectedCatalog) +// .append($("") +// .attr("value", data.codigo) +// .text(data.descripcion)); + +// $("#txt" + SelectedCatalog).val(-1); +// } +// } + +// $("#txt" + SelectedCatalog).trigger("change"); +// $('#txt' + SelectedCatalog).closest('form').validateElement("#txt" + SelectedCatalog); + +// $('#divmodalCatalogo').modal('hide'); + +// if (typeof DataCatalogo !== 'undefined' && $.isFunction(DataCatalogo)) { +// DataCatalogo(SelectedCatalog, data); +// } + +//}); diff --git a/AYA.SlnSynor/AYA.SlnSynor/Views/Shared/_Catalogo.cshtml b/AYA.SlnSynor/AYA.SlnSynor/Views/Shared/_Catalogo.cshtml new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor/Views/Shared/_Catalogo.cshtml @@ -0,0 +1 @@ + \ No newline at end of file