Пример #1
0
 public void EditarSistemaApp(int idSistema, string nombre, string logo, string urlhome, bool embebido, bool activo)
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         serPi.EditarSistema(idSistema, nombre, logo, urlhome, embebido, activo);
         serPi.Close();
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }
Пример #2
0
 public void EliminarItem(int idRol, int idItem)
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         serPi.EliminarItemRol(idRol, idItem);
         serPi.Close();
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }
Пример #3
0
 public List <E.VMPais> ObtenerListapaises()
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         List <E.VMPais> lista = serPi.ObtenerCatalogoPaises().ToList();
         return(lista);
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }
Пример #4
0
 public void AsignarPermisosToolItems(int idUsuarioItem, int idTool, bool permitir)
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         serPi.AsignarPermisosTool(idUsuarioItem, idTool, permitir);
         serPi.Close();
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }
Пример #5
0
 public E.VMRol RegistrarRol(string nombre, string descripcion, int idPais)
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         E.VMRol obj = serPi.RegistrarNuevoRol(nombre, descripcion, idPais);
         serPi.Close();
         return(obj);
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }
Пример #6
0
 public List <E.VMRol> ObtenerRolesUsuario(string usuario, int?idSistema)
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         List <E.VMRol> lista = serPi.ObtenerRolesUsuario(usuario, idSistema).ToList();
         serPi.Close();
         return(lista);
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }
Пример #7
0
 public E.VMSistema ObtenerInfoSistema(int idSistema)
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         E.VMSistema sys = serPi.ObtenerInfoSistemas(idSistema);
         serPi.Close();
         return(sys);
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }
Пример #8
0
 public List <E.VMModulo> ObtenerModulosSistema(int idSistema, bool?activos)
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         E.VMModulo[] modulos = serPi.ObtenerModulosSistemaApp(idSistema, activos);
         serPi.Close();
         return(modulos != null?modulos.ToList() : new List <E.VMModulo>());
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }
Пример #9
0
 public E.VMModulo RegistrarModulo(string nombre, int idSistema, string urlIcono, string urlDestino
                                   , string dbConexion, bool activo)
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         E.VMModulo modulo = serPi.RegistrarModuloSistemaApp(nombre, idSistema, urlIcono, urlDestino, dbConexion, activo);
         serPi.Close();
         return(modulo);
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }
Пример #10
0
 public void EditarItemModulo(int idPaginaModulo, string nombre,
                              int idModulo, string urlIcono, string urlDestino, int idItemPadre, int orden, bool activo)
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         serPi.EditarPaginaModulo(idPaginaModulo, nombre,
                                  idModulo, urlIcono, urlDestino, idItemPadre, orden, activo);
         serPi.Close();
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }
Пример #11
0
 public E.VMUsuario RegistrarUsuario(string Nombre, string apellidoMaterno, string apellidoPaterno, string celular, string correo,
                                     string extension, int idEstatus, string password, string usuario_sistema)
 {
     try
     {
         S.Serv_Admin.ServiceGestionClient serPi = new S.Serv_Admin.ServiceGestionClient("BasicHttpBinding_IServiceGestion");
         serPi.ClientCredentials.UserName.UserName = this.usuario;
         serPi.ClientCredentials.UserName.Password = this.pass;
         //serPi.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =
         //         X509CertificateValidationMode.None;
         E.VMUsuario usuario = serPi.RegistrarNuevoUsuario(Nombre, apellidoMaterno, apellidoPaterno, celular, correo,
                                                           extension, idEstatus, password, usuario_sistema);
         serPi.Close();
         return(usuario);
     }
     catch (FaultException <E.ExceptionService> ex)
     {
         throw new Exception(ex.Detail.Mensaje);
     }
 }