From 902df28f042e4f1341e047a29996e2c1902bfa09 Mon Sep 17 00:00:00 2001 From: jnunez Date: Wed, 13 Jun 2018 21:26:35 +0000 Subject: [PATCH] git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C46 --- .../AYA.SlnSynor.WCF/AYA.SlnSinort.WCF.csproj | 33 ++- .../System.Data.DataSet.datasource | 10 + .../Service References/AyAWCF/Reference.cs | 201 ++++++++++++++++++ .../AyAWCF/Reference.svcmap | 36 ++++ .../AyAWCF/ServicioUsuarios.disco | 4 + .../AyAWCF/ServicioUsuarios.wsdl | 59 +++++ .../AyAWCF/ServicioUsuarios.xsd | 16 ++ .../AyAWCF/ServicioUsuarios1.xsd | 14 ++ .../AyAWCF/ServicioUsuarios2.xsd | 42 ++++ .../AyAWCF/ServicioUsuarios3.xsd | 42 ++++ .../AyAWCF/configuration.svcinfo | 10 + .../AyAWCF/configuration91.svcinfo | 201 ++++++++++++++++++ AYA.SlnSynor/AYA.SlnSynor.WCF/Sinort.svc.cs | 2 + AYA.SlnSynor/AYA.SlnSynor.WCF/Web.config | 24 ++- .../AYA.SlnSynor/AYA.SlnSinort.csproj | 2 + .../AYA.SlnSynor/App_Start/BundleConfig.cs | 6 +- .../Catalogos/CatalogosController.cs | 7 + .../AYA.SlnSynor/Scripts/_references.js | Bin 587496 -> 587620 bytes .../AYA.SlnSynor/Sinort-Scripts/Rol.js | 42 +++- .../Sinort-Scripts/RolesPantallas.js | 46 ++++ .../AYA.SlnSynor/Views/Catalogos/Rol.cshtml | 56 ++++- .../Views/Catalogos/RolesPantallas.cshtml | 40 ++++ .../AYA.SlnSynor/Views/Shared/_Layout.cshtml | 46 ++-- .../AYA.SlnSinortModel.csproj | 2 + .../AYA.SlnSynorModel/Sinort/Roles.cs | 8 +- .../Sinort/RolesPantallas.cs | 36 ++++ .../AYA.SlnSynorModel/Sinort/RolesUsuario.cs | 36 ++++ .../AYA.SlnSynorModel/Sinort/SinortContex.cs | 35 ++- .../AYA.SlnSynorModel/Sinort/Usuario.cs | 4 +- 29 files changed, 1010 insertions(+), 50 deletions(-) create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Properties/DataSources/System.Data.DataSet.datasource create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/Reference.cs create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/Reference.svcmap create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.disco create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.wsdl create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.xsd create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios1.xsd create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios2.xsd create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios3.xsd create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/configuration.svcinfo create mode 100644 AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/configuration91.svcinfo create mode 100644 AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/RolesPantallas.js create mode 100644 AYA.SlnSynor/AYA.SlnSynor/Views/Catalogos/RolesPantallas.cshtml create mode 100644 AYA.SlnSynor/AYA.SlnSynorModel/Sinort/RolesPantallas.cs create mode 100644 AYA.SlnSynor/AYA.SlnSynorModel/Sinort/RolesUsuario.cs diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/AYA.SlnSinort.WCF.csproj b/AYA.SlnSynor/AYA.SlnSynor.WCF/AYA.SlnSinort.WCF.csproj index b3dd8f80a..926f1a80c 100644 --- a/AYA.SlnSynor/AYA.SlnSynor.WCF/AYA.SlnSinort.WCF.csproj +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/AYA.SlnSinort.WCF.csproj @@ -67,12 +67,25 @@ + + + + + + WCF Proxy Generator + Reference.cs + + + True + True + Reference.svcmap + Sinort.svc @@ -82,9 +95,24 @@ SinortCatalogos.svc - + + + + + + Designer + + + Designer + + + Designer + + + Designer + Web.config @@ -106,6 +134,9 @@ AYA.SlnSinortModel + + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Properties/DataSources/System.Data.DataSet.datasource b/AYA.SlnSynor/AYA.SlnSynor.WCF/Properties/DataSources/System.Data.DataSet.datasource new file mode 100644 index 000000000..02069ec8c --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Properties/DataSources/System.Data.DataSet.datasource @@ -0,0 +1,10 @@ + + + + System.Data.DataSet, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/Reference.cs b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/Reference.cs new file mode 100644 index 000000000..aa8daf1cf --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/Reference.cs @@ -0,0 +1,201 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AYA.SlnSinort.WCF.AyAWCF { + using System.Runtime.Serialization; + using System; + + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] + [System.Runtime.Serialization.DataContractAttribute(Name="correoEL", Namespace="http://schemas.datacontract.org/2004/07/AyAEL.Tran")] + [System.SerializableAttribute()] + public partial class correoEL : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string ASUNTOField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string COPIAField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string CUERPOField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DESTINATARIOSField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string FORMATOField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string RUTAADJUNTOSField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData { + get { + return this.extensionDataField; + } + set { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string ASUNTO { + get { + return this.ASUNTOField; + } + set { + if ((object.ReferenceEquals(this.ASUNTOField, value) != true)) { + this.ASUNTOField = value; + this.RaisePropertyChanged("ASUNTO"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string COPIA { + get { + return this.COPIAField; + } + set { + if ((object.ReferenceEquals(this.COPIAField, value) != true)) { + this.COPIAField = value; + this.RaisePropertyChanged("COPIA"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string CUERPO { + get { + return this.CUERPOField; + } + set { + if ((object.ReferenceEquals(this.CUERPOField, value) != true)) { + this.CUERPOField = value; + this.RaisePropertyChanged("CUERPO"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string DESTINATARIOS { + get { + return this.DESTINATARIOSField; + } + set { + if ((object.ReferenceEquals(this.DESTINATARIOSField, value) != true)) { + this.DESTINATARIOSField = value; + this.RaisePropertyChanged("DESTINATARIOS"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string FORMATO { + get { + return this.FORMATOField; + } + set { + if ((object.ReferenceEquals(this.FORMATOField, value) != true)) { + this.FORMATOField = value; + this.RaisePropertyChanged("FORMATO"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string RUTAADJUNTOS { + get { + return this.RUTAADJUNTOSField; + } + set { + if ((object.ReferenceEquals(this.RUTAADJUNTOSField, value) != true)) { + this.RUTAADJUNTOSField = value; + this.RaisePropertyChanged("RUTAADJUNTOS"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ServiceModel.ServiceContractAttribute(ConfigurationName="AyAWCF.IServicioUsuarios")] + public interface IServicioUsuarios { + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IServicioUsuarios/obtenerUsuariosActiveDirectory", ReplyAction="http://tempuri.org/IServicioUsuarios/obtenerUsuariosActiveDirectoryResponse")] + System.Data.DataSet obtenerUsuariosActiveDirectory(); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IServicioUsuarios/obtenerUsuariosActiveDirectory", ReplyAction="http://tempuri.org/IServicioUsuarios/obtenerUsuariosActiveDirectoryResponse")] + System.Threading.Tasks.Task obtenerUsuariosActiveDirectoryAsync(); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IServicioUsuarios/enviarCorreo", ReplyAction="http://tempuri.org/IServicioUsuarios/enviarCorreoResponse")] + int enviarCorreo(AYA.SlnSinort.WCF.AyAWCF.correoEL objCorreo); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IServicioUsuarios/enviarCorreo", ReplyAction="http://tempuri.org/IServicioUsuarios/enviarCorreoResponse")] + System.Threading.Tasks.Task enviarCorreoAsync(AYA.SlnSinort.WCF.AyAWCF.correoEL objCorreo); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + public interface IServicioUsuariosChannel : AYA.SlnSinort.WCF.AyAWCF.IServicioUsuarios, System.ServiceModel.IClientChannel { + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + public partial class ServicioUsuariosClient : System.ServiceModel.ClientBase, AYA.SlnSinort.WCF.AyAWCF.IServicioUsuarios { + + public ServicioUsuariosClient() { + } + + public ServicioUsuariosClient(string endpointConfigurationName) : + base(endpointConfigurationName) { + } + + public ServicioUsuariosClient(string endpointConfigurationName, string remoteAddress) : + base(endpointConfigurationName, remoteAddress) { + } + + public ServicioUsuariosClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : + base(endpointConfigurationName, remoteAddress) { + } + + public ServicioUsuariosClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + base(binding, remoteAddress) { + } + + public System.Data.DataSet obtenerUsuariosActiveDirectory() { + return base.Channel.obtenerUsuariosActiveDirectory(); + } + + public System.Threading.Tasks.Task obtenerUsuariosActiveDirectoryAsync() { + return base.Channel.obtenerUsuariosActiveDirectoryAsync(); + } + + public int enviarCorreo(AYA.SlnSinort.WCF.AyAWCF.correoEL objCorreo) { + return base.Channel.enviarCorreo(objCorreo); + } + + public System.Threading.Tasks.Task enviarCorreoAsync(AYA.SlnSinort.WCF.AyAWCF.correoEL objCorreo) { + return base.Channel.enviarCorreoAsync(objCorreo); + } + } +} diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/Reference.svcmap b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/Reference.svcmap new file mode 100644 index 000000000..4221440f9 --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/Reference.svcmap @@ -0,0 +1,36 @@ + + + + false + true + true + + false + false + false + + + true + Auto + true + true + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.disco b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.disco new file mode 100644 index 000000000..d55b00305 --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.disco @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.wsdl b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.wsdl new file mode 100644 index 000000000..1e3a621ef --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.wsdl @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.xsd b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.xsd new file mode 100644 index 000000000..e421e5574 --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios1.xsd b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios1.xsd new file mode 100644 index 000000000..61812bee8 --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios1.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios2.xsd b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios2.xsd new file mode 100644 index 000000000..32e1c19af --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios2.xsd @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios3.xsd b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios3.xsd new file mode 100644 index 000000000..e3d37d6a9 --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/ServicioUsuarios3.xsd @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/configuration.svcinfo b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/configuration.svcinfo new file mode 100644 index 000000000..ef67d0a74 --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/configuration.svcinfo @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/configuration91.svcinfo b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/configuration91.svcinfo new file mode 100644 index 000000000..346b47433 --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Service References/AyAWCF/configuration91.svcinfo @@ -0,0 +1,201 @@ + + + + + + + BasicHttpBinding_IServicioUsuarios + + + + + + + + + + + + + + + + + + + + + StrongWildcard + + + + + + 65536 + + + + + + + + + System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + System.Text.UTF8Encoding + + + Buffered + + + + + + Text + + + System.ServiceModel.Configuration.BasicHttpSecurityElement + + + None + + + System.ServiceModel.Configuration.HttpTransportSecurityElement + + + None + + + None + + + System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement + + + Never + + + TransportSelected + + + (Collection) + + + + + + System.ServiceModel.Configuration.BasicHttpMessageSecurityElement + + + UserName + + + Default + + + + + + + + + http://localhost/AyA.SlnSinort.WCF.Usuarios/ServicioUsuarios.svc + + + + + + basicHttpBinding + + + BasicHttpBinding_IServicioUsuarios + + + AyAWCF.IServicioUsuarios + + + System.ServiceModel.Configuration.AddressHeaderCollectionElement + + + <Header /> + + + System.ServiceModel.Configuration.IdentityElement + + + System.ServiceModel.Configuration.UserPrincipalNameElement + + + + + + System.ServiceModel.Configuration.ServicePrincipalNameElement + + + + + + System.ServiceModel.Configuration.DnsElement + + + + + + System.ServiceModel.Configuration.RsaElement + + + + + + System.ServiceModel.Configuration.CertificateElement + + + + + + System.ServiceModel.Configuration.CertificateReferenceElement + + + My + + + LocalMachine + + + FindBySubjectDistinguishedName + + + + + + False + + + BasicHttpBinding_IServicioUsuarios + + + + + + + + + + + \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Sinort.svc.cs b/AYA.SlnSynor/AYA.SlnSynor.WCF/Sinort.svc.cs index 800e40bb9..a9ec522ac 100644 --- a/AYA.SlnSynor/AYA.SlnSynor.WCF/Sinort.svc.cs +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Sinort.svc.cs @@ -32,5 +32,7 @@ namespace AYA.SlnSinort.WCF // return respuesta; //} #endregion + + } } diff --git a/AYA.SlnSynor/AYA.SlnSynor.WCF/Web.config b/AYA.SlnSynor/AYA.SlnSynor.WCF/Web.config index 2af28c874..0a7433496 100644 --- a/AYA.SlnSynor/AYA.SlnSynor.WCF/Web.config +++ b/AYA.SlnSynor/AYA.SlnSynor.WCF/Web.config @@ -9,6 +9,11 @@ + + + @@ -36,17 +41,28 @@ + + + - - + + - - + + diff --git a/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj b/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj index bf0fc7b3b..c5fb894c4 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj +++ b/AYA.SlnSynor/AYA.SlnSynor/AYA.SlnSinort.csproj @@ -7672,6 +7672,7 @@ + Web.config @@ -7703,6 +7704,7 @@ + diff --git a/AYA.SlnSynor/AYA.SlnSynor/App_Start/BundleConfig.cs b/AYA.SlnSynor/AYA.SlnSynor/App_Start/BundleConfig.cs index 6ee4b929b..165ae0dc8 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/App_Start/BundleConfig.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/App_Start/BundleConfig.cs @@ -8,8 +8,9 @@ namespace AYA.SlnSinort // Para obtener más información sobre Bundles, visite http://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCollection bundles) { - bundles.Add(new ScriptBundle("~/bundles/jquery").Include( - "~/Scripts/jquery-3.3.1.js")); + bundles.Add(new ScriptBundle("~/bundles/jquery") + .Include("~/Scripts/jquery-3.3.1.js") + ); bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( "~/Scripts/jquery-ui-1.12.1.js")); @@ -49,6 +50,7 @@ namespace AYA.SlnSinort bundles.Add(new ScriptBundle("~/Script-Global") .Include("~/Sinort-Scripts/Global.js") .Include("~/Scripts/toastr.min.js") + .Include("~/Scripts/bootstrap.min.js") .Include("~/Scripts/jquery.validate.min.js")); diff --git a/AYA.SlnSynor/AYA.SlnSynor/Controllers/Catalogos/CatalogosController.cs b/AYA.SlnSynor/AYA.SlnSynor/Controllers/Catalogos/CatalogosController.cs index 3158d5aa8..a0417392d 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Controllers/Catalogos/CatalogosController.cs +++ b/AYA.SlnSynor/AYA.SlnSynor/Controllers/Catalogos/CatalogosController.cs @@ -30,5 +30,12 @@ namespace AYA.SlnSinort.Controllers.Catalogos InitControllers(); return View(); } + + public ActionResult RolesPantallas() + { + InitControllers(); + return View(); + } + } } \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Scripts/_references.js b/AYA.SlnSynor/AYA.SlnSynor/Scripts/_references.js index 27444dbe2151ce9d42596a706768b21d5bc1598d..6ec38e4279b175630e3c74f0c36fe8e503cb50e7 100644 GIT binary patch delta 63 zcmaFyR{6<0<%Sl<7N!>F7M2#)7Pc1lEgUbtO`afbFx}uAhuriF-#FNWQyGdG3K$X@ R@)$~hWDXD}PJYNE3IHUB7DWI6 delta 25 hcmaFzPWi=K<%Sl<7N!>F7M2#)7Pc1lEgUbt0RWY03cvsW diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Rol.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Rol.js index fa13d2c1e..90f2e52da 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Rol.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Rol.js @@ -41,7 +41,7 @@ this.getDataModel = function () { $('#TableItems').TableInit(0, false, true, true, false, null, null); ObtenerRoles(); - + } this.CargarGridRoles = function (data) { @@ -53,7 +53,8 @@ this.CargarGridRoles = function (data) { var option = $("#ucItemsCatalogo").html(); - + var pantallas = $("#ucbtnVistaPantallas").html(); + var usuarios = $("#ucbtnVistaUsuarios").html(); option = replaceAll("[$CodItem]", item.IdRol, option); var stateIcon = $("#ucItemsIcon").html(); @@ -78,6 +79,8 @@ this.CargarGridRoles = function (data) { TableItems.row.add([stateIcon, item.IdRol, item.Descripcion, + pantallas, + usuarios, option]).draw(); }); @@ -180,7 +183,7 @@ this.InsertarItem = function () { return false; } - if (!confirm("Va a ingresar una nueva aplicación.\n ¿Desea continuar?")) + if (!confirm("Va a ingresar un nuevo rol.\n ¿Desea continuar?")) { return; } @@ -200,7 +203,7 @@ this.CompletarAccion = function () { $('#btnInsertar').show(); TableItems.clear().draw(); - ObtenerAplicaciones(); + ObtenerRoles(); LimpiarControles(); ENDREQUEST(); } @@ -210,7 +213,36 @@ this.LimpiarControles = function () { $("#formCatalogo").validateElement("#txtDescripcion"); $('#lbTituloAccion').empty(); - $('#lbTituloAccion').append('Ingresar Nueva Aplicación'); + $('#lbTituloAccion').append('Ingresar Nuevo Rol'); } +this.AbrirRolesPantallas = function () { + $("#modalRolesPantallas").modal('show'); + CargarPantallas(); +} +this.CargarPantallas = function () { + + var uri = CatalogosWCF + '/api/ObtenerPantallas'; + AjaxPostData(uri, Item, true, false, CargarTablaPantallas, null, null); +} + +this.CargarTablaPantallas = function (data) { + + if (data != null) { + lista = data; + var Seleccionar = $("#ucbtnCheck").html(); + var columnDefinition = [ + { "data": "Descripcion" }, + { "data": null, className: "center", defaultContent: Seleccionar } + ]; + + $('#GridRolesPantallas').TableInit(1, true, true, true, true, columnDefinition, lista); + + if ($.fn.DataTable.isDataTable('#GridRolesPantallas')) { + + $('#GridRolesPantallas').DataTable().search('').draw(); + ENDREQUEST(); + } + } +} diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/RolesPantallas.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/RolesPantallas.js new file mode 100644 index 000000000..989961ec7 --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/RolesPantallas.js @@ -0,0 +1,46 @@ + +var Item = {}; +jQuery(document).ready(function () { + CargarPantallas(); +}); + + +this.CargarPantallas = function () { + + var uri = CatalogosWCF + '/api/ObtenerPantallas'; + AjaxPostData(uri, Item, true, false, CargarTablaPantallas, null, null); +} + +this.CargarTablaPantallas = function (data) { + + if (data != null) { + lista = data; + var Seleccionar = $("#ucbtnVista").html(); + var columnDefinition = [ + { "data": "Descripcion" }, + { "data": null, className: "center", defaultContent: Seleccionar } + ]; + + $('#tablePantallas').TableInit(1, true, true, true, true, columnDefinition, lista); + + if ($.fn.DataTable.isDataTable('#tablePantallas')) { + + $('#tablePantallas').DataTable().search('').draw(); + ENDREQUEST(); + } + } +} + +$('#tablePantallas').on('click', 'button', function () { + + var data = $('#tablePantallas').DataTable().row($(this).parents('tr')).data(); + + var mtzView = data.Vista.split('/') + + url = $("#hiddenHref").val(); + url = url.replace("View", mtzView[1]); + url = url.replace("Controller", mtzView[0]); + + document.location.href = url; + +}); \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Views/Catalogos/Rol.cshtml b/AYA.SlnSynor/AYA.SlnSynor/Views/Catalogos/Rol.cshtml index a37b85623..b58a05dc5 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Views/Catalogos/Rol.cshtml +++ b/AYA.SlnSynor/AYA.SlnSynor/Views/Catalogos/Rol.cshtml @@ -1,5 +1,4 @@ - -@{ +@{ ViewBag.Title = "Rol"; Layout = "~/Views/Shared/_Layout.cshtml"; } @@ -21,7 +20,12 @@ ID Descripción + Pantallas + Usuarios + + + @@ -43,8 +47,18 @@ - +
+ +
+
+ +
+
@@ -89,6 +103,42 @@
+ + + + + + + + @Scripts.Render("~/Sinort-Scripts/Rol.js") diff --git a/AYA.SlnSynor/AYA.SlnSynor/Views/Catalogos/RolesPantallas.cshtml b/AYA.SlnSynor/AYA.SlnSynor/Views/Catalogos/RolesPantallas.cshtml new file mode 100644 index 000000000..760091223 --- /dev/null +++ b/AYA.SlnSynor/AYA.SlnSynor/Views/Catalogos/RolesPantallas.cshtml @@ -0,0 +1,40 @@ + +@{ + ViewBag.Title = "RolesPantallas"; + +} + + + + + + +@Scripts.Render("~/Sinort-Scripts/RolesPantallas.js") \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Views/Shared/_Layout.cshtml b/AYA.SlnSynor/AYA.SlnSynor/Views/Shared/_Layout.cshtml index 9a0d32807..ac9f92efa 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Views/Shared/_Layout.cshtml +++ b/AYA.SlnSynor/AYA.SlnSynor/Views/Shared/_Layout.cshtml @@ -3,7 +3,7 @@ - + AYA | SINORT @@ -18,19 +18,21 @@ - + + @*@Styles.Render("~/Content/dashboard")*@ - @Scripts.Render("~/bundles/modernizr") + @Scripts.Render("~/bundles/modernizr") @Scripts.Render("~/bundles/jquery") - @Scripts.Render("~/bundles/jquery-dataTables"); - @Styles.Render("~/Content/sinort-css") + @Scripts.Render("~/bundles/jquery-dataTables") + @Styles.Render("~/Content/sinort-css") + @* Seccion futuros scripts *@ @@ -48,7 +50,6 @@ logo -
- *@ + *@ - +
- @RenderSection("featured", required: false) - @RenderBody() - + @RenderSection("featured", required: false) + @RenderBody() +