public void updateUser(ref string mensaje_error, ref int numero_error, string Username, string Rol, string UsernameC)
 {
     connection = cls_DAL.trae_conexion("ServiciosWeb", ref mensaje_error, ref numero_error);
     sql        = "exec update_user_rol @Username = '******', @Rol = '" + Rol + "'";
     ds         = cls_DAL.ejecuta_dataset(connection, sql, false, ref mensaje_error, ref numero_error);
     if (numero_error != 0)
     {
         Errors e = new Errors();
         e.crearErrorInterno(ref mensaje_error, ref numero_error, Errors.GlobalValue = Errors.GlobalValue + 1, e.encrypt(mensaje_error), e.encrypt(time), e.encrypt(date), e.encrypt(numero_error.ToString()));
     }
     else
     {
         Bitacora bitacora = new Bitacora();
         bitacora.CreateBitacora(ref mensaje_error, ref numero_error, (Bitacora.GlobalValue = Bitacora.GlobalValue + 1).ToString(), bitacora.encrypt(UsernameC), bitacora.encrypt(date), bitacora.encrypt("Update"), bitacora.encrypt(time), Username, bitacora.encrypt("Update de rol"), bitacora.encrypt("Codigo de usuario: " + Username + " | Rol: " + bitacora.decrypt(Rol)));
     }
 }
 public void updateUserPassword(ref string mensaje_error, ref int numero_error, string Username, string Password, string UsernameC, string Cod_User)
 {
     connection = cls_DAL.trae_conexion("ServiciosWeb", ref mensaje_error, ref numero_error);
     sql        = "user_password_update @Username = '******', @Password = '******'";
     ds         = cls_DAL.ejecuta_dataset(connection, sql, false, ref mensaje_error, ref numero_error);
     if (numero_error != 0)
     {
         Errors e = new Errors();
         e.crearErrorInterno(ref mensaje_error, ref numero_error, Errors.GlobalValue = Errors.GlobalValue + 1, e.encrypt(mensaje_error), e.encrypt(time), e.encrypt(date), e.encrypt(numero_error.ToString()));
     }
     else
     {
         Bitacora bitacora = new Bitacora();
         bitacora.CreateBitacora(ref mensaje_error, ref numero_error, (Bitacora.GlobalValue = Bitacora.GlobalValue + 1).ToString(), bitacora.encrypt(UsernameC), bitacora.encrypt(date), bitacora.encrypt("Update"), bitacora.encrypt(time), Cod_User, bitacora.encrypt("Cambio de contraseña"), bitacora.encrypt("Nombre de usuario:" + bitacora.decrypt(Username) + " | PasswordChange****"));
     }
 }
Exemplo n.º 3
0
 public void delete_country(ref string mensaje_error, ref int numero_error, string Cod_Pais, string UsernameC, string CodCountry)
 {
     connection = cls_DAL.trae_conexion("ServiciosWeb", ref mensaje_error, ref numero_error);
     sql        = "exec delete_conutry @Cod_Pais = '" + Cod_Pais + "'";
     ds         = cls_DAL.ejecuta_dataset(connection, sql, false, ref mensaje_error, ref numero_error);
     if (numero_error != 0)
     {
         Errors e = new Errors();
         e.crearErrorInterno(ref mensaje_error, ref numero_error, Errors.GlobalValue = Errors.GlobalValue + 1, e.encrypt(mensaje_error), e.encrypt(time), e.encrypt(date), e.encrypt(numero_error.ToString()));
     }
     else
     {
         Bitacora bitacora = new Bitacora();
         bitacora.CreateBitacora(ref mensaje_error, ref numero_error, (Bitacora.GlobalValue = Bitacora.GlobalValue + 1).ToString(), bitacora.encrypt(UsernameC), bitacora.encrypt(date), bitacora.encrypt("Delete"), bitacora.encrypt(time), CodCountry, bitacora.encrypt("Delete de una pais"), bitacora.encrypt("-"));
     }
 }
 public void crearUser(ref string mensaje_error, ref int numero_error, int Cod_User, string Username, string Password, string Rol, string Email, string Question, string Answer, string UsernameC)
 {
     connection = cls_DAL.trae_conexion("ServiciosWeb", ref mensaje_error, ref numero_error);
     sql        = "exec register_user @Cod_user = '******', @Username = '******', @Pass = '******', @Rol = '" + Rol + "', @Email = '" + Email + "', @Question = '" + Question + "', @Answer = '" + Answer + "'";
     ds         = cls_DAL.ejecuta_dataset(connection, sql, false, ref mensaje_error, ref numero_error);
     if (numero_error != 0)
     {
         Errors e = new Errors();
         e.crearErrorInterno(ref mensaje_error, ref numero_error, Errors.GlobalValue = Errors.GlobalValue + 1, e.encrypt(mensaje_error), e.encrypt(time), e.encrypt(date), e.encrypt(numero_error.ToString()));
     }
     else
     {
         Bitacora bitacora = new Bitacora();
         bitacora.CreateBitacora(ref mensaje_error, ref numero_error, (Bitacora.GlobalValue = Bitacora.GlobalValue + 1).ToString(), bitacora.encrypt(UsernameC), bitacora.encrypt(date), bitacora.encrypt("Create"), bitacora.encrypt(time), Cod_User.ToString(), bitacora.encrypt("Creacion de nuevo usuario"), bitacora.encrypt("Codigo: " + Cod_User + " | Nombre: " + bitacora.decrypt(Username) + " | Email: " + bitacora.decrypt(Email)));
     }
 }
Exemplo n.º 5
0
 public void update_country(ref string mensaje_error, ref int numero_error, string Cod_Pais1, string Cod_Pais2, string Nombre_Pais, string Imagen, string UsernameC, string CodCountry)
 {
     connection = cls_DAL.trae_conexion("ServiciosWeb", ref mensaje_error, ref numero_error);
     sql        = "exec update_country @Cod_Pais = '" + Cod_Pais1 + "', @Cod_Pais2 = '" + Cod_Pais2 + "',  @Nombre_Pais = '" + Nombre_Pais + "', @Imagen = '" + Imagen + "'";
     ds         = cls_DAL.ejecuta_dataset(connection, sql, false, ref mensaje_error, ref numero_error);
     if (numero_error != 0)
     {
         Errors e = new Errors();
         e.crearErrorInterno(ref mensaje_error, ref numero_error, Errors.GlobalValue = Errors.GlobalValue + 1, e.encrypt(mensaje_error), e.encrypt(time), e.encrypt(date), e.encrypt(numero_error.ToString()));
     }
     else
     {
         Bitacora bitacora = new Bitacora();
         bitacora.CreateBitacora(ref mensaje_error, ref numero_error, (Bitacora.GlobalValue = Bitacora.GlobalValue + 1).ToString(), bitacora.encrypt(UsernameC), bitacora.encrypt(date), bitacora.encrypt("Update"), bitacora.encrypt(time), CodCountry, bitacora.encrypt("Update de Pais"), bitacora.encrypt("Pais viejo: " + Cod_Pais1 + " | Pais nuevo: " + Cod_Pais2 + " | Nombre de pais: " + bitacora.decrypt(Nombre_Pais) + " | Imagen: " + bitacora.decrypt(Imagen)));
     }
 }
Exemplo n.º 6
0
 public void createAirline(ref string mensaje_error, ref int numero_error, int Cod_Agencia, string Nombre_Agencia, string Imagen, string Cod_Pais_FK, string Cod_Aerolinea, string UsernameC)
 {
     connection = cls_DAL.trae_conexion("ServiciosWeb", ref mensaje_error, ref numero_error);
     sql        = "exec create_new_airline @Cod_Agencia= '" + Cod_Agencia + "', @Nombre_Agencia = '" + Nombre_Agencia + "', @Imagen = '" + Imagen + "', @Cod_Pais_FK = '" + Cod_Pais_FK + "', @Cod_Aerolinea = '" + Cod_Aerolinea + "'";
     ds         = cls_DAL.ejecuta_dataset(connection, sql, false, ref mensaje_error, ref numero_error);
     if (numero_error != 0)
     {
         Errors e = new Errors();
         e.crearErrorInterno(ref mensaje_error, ref numero_error, Errors.GlobalValue = Errors.GlobalValue + 1, e.encrypt(mensaje_error), e.encrypt(time), e.encrypt(date), e.encrypt(numero_error.ToString()));
     }
     else
     {
         Bitacora bitacora = new Bitacora();
         bitacora.CreateBitacora(ref mensaje_error, ref numero_error, (Bitacora.GlobalValue = Bitacora.GlobalValue + 1).ToString(), bitacora.encrypt(UsernameC.ToString()), bitacora.encrypt(date), bitacora.encrypt("Create"), bitacora.encrypt(time), Cod_Agencia.ToString(), bitacora.encrypt("Creacion de una aerolinea"), bitacora.encrypt("Codigo: " + Cod_Agencia + " | Nombre: " + bitacora.decrypt(Nombre_Agencia) + " | Imagen: " + bitacora.decrypt(Imagen)));
     }
 }
Exemplo n.º 7
0
        public void updateGate(ref string mensaje_error, ref int numero_error, string Cod_Puerta, string Cod_Puerta2, string Numero_Puerta, string Detalle, string UsernameC, string GateCod)
        {
            connection = cls_DAL.trae_conexion("ServiciosWeb", ref mensaje_error, ref numero_error);
            sql        = "exec update_ecist_gate @Cod_Puerta = '" + Cod_Puerta + "', @Cod_Puerta2 = '" + Cod_Puerta2 + "' , @Numero_Puerta = '" + Numero_Puerta + "', @Detalle = '" + Detalle + "'";
            ds         = cls_DAL.ejecuta_dataset(connection, sql, false, ref mensaje_error, ref numero_error);

            if (numero_error != 0)
            {
                Errors e = new Errors();
                e.crearErrorInterno(ref mensaje_error, ref numero_error, Errors.GlobalValue = Errors.GlobalValue + 1, e.encrypt(mensaje_error), e.encrypt(time), e.encrypt(date), e.encrypt(numero_error.ToString()));
            }
            else
            {
                Bitacora bitacora = new Bitacora();
                bitacora.CreateBitacora(ref mensaje_error, ref numero_error, (Bitacora.GlobalValue = Bitacora.GlobalValue + 1).ToString(), bitacora.encrypt(UsernameC), bitacora.encrypt(date), bitacora.encrypt("Update"), bitacora.encrypt(time), GateCod, bitacora.encrypt("Update de una puerta"), bitacora.encrypt("Codigo: " + Cod_Puerta + " | Numero: " + bitacora.decrypt(Numero_Puerta) + " | Detalle: " + bitacora.decrypt(Detalle)));
            }
        }
Exemplo n.º 8
0
        public void updateCons(ref string mensaje_error, ref int numero_error, string Descripcion, string Valor, string prefijo, string Rango_ini, string Rango_fin, string UsernameC, string ConsCod)
        {
            connection = cls_DAL.trae_conexion("ServiciosWeb", ref mensaje_error, ref numero_error);
            sql        = "exec consecutive_update_cambios @Descripcion = '" + Descripcion + "', @Valor = '" + Valor + "', @Prefijo = '" + prefijo + "', @Rango_ini = '" + Rango_ini + "', @Rango_fin = '" + Rango_fin + "'";
            ds         = cls_DAL.ejecuta_dataset(connection, sql, false, ref mensaje_error, ref numero_error);

            if (numero_error != 0)
            {
                Errors e = new Errors();
                e.crearErrorInterno(ref mensaje_error, ref numero_error, Errors.GlobalValue = Errors.GlobalValue + 1, e.encrypt(mensaje_error), e.encrypt(time), e.encrypt(date), e.encrypt(numero_error.ToString()));
            }
            else
            {
                Bitacora bitacora = new Bitacora();
                bitacora.CreateBitacora(ref mensaje_error, ref numero_error, (Bitacora.GlobalValue = Bitacora.GlobalValue + 1).ToString(), bitacora.encrypt(UsernameC), bitacora.encrypt(date), bitacora.encrypt("Update"), bitacora.encrypt(time), ConsCod, bitacora.encrypt("Update de un consecutivo"), bitacora.encrypt("Codigo: " + Codigo_Consecutivo.ToString() + " | Descripcion: " + bitacora.decrypt(Descripcion) + " | Valor: " + bitacora.decrypt(Valor) + " | Prefijo: " + bitacora.decrypt(prefijo) + " | RangoINI - RangoFIN: " + bitacora.decrypt(Rango_ini) + "-" + bitacora.decrypt(Rango_fin)));
            }
        }
Exemplo n.º 9
0
        public void delete_airline(ref string mensaje_error, ref int numero_error, string Cod_Aerolinea, string UsernameC, string Cod_Agency)
        {
            connection = cls_DAL.trae_conexion("ServiciosWeb", ref mensaje_error, ref numero_error);
            sql        = "exec delete_airline @Cod_Aerolinea = '" + Cod_Aerolinea + "'";
            ds         = cls_DAL.ejecuta_dataset(connection, sql, false, ref mensaje_error, ref numero_error);

            if (numero_error != 0)
            {
                Errors e = new Errors();
                e.crearErrorInterno(ref mensaje_error, ref numero_error, Errors.GlobalValue = Errors.GlobalValue + 1, e.encrypt(mensaje_error), e.encrypt(time), e.encrypt(date), e.encrypt(numero_error.ToString()));
            }
            else
            {
                Bitacora bitacora = new Bitacora();
                bitacora.CreateBitacora(ref mensaje_error, ref numero_error, (Bitacora.GlobalValue = Bitacora.GlobalValue + 1).ToString(), bitacora.encrypt(UsernameC), bitacora.encrypt(date), bitacora.encrypt("Delete"), bitacora.encrypt(time), Cod_Agency, bitacora.encrypt("Eliminacion de Agencia/Aerolinea"), bitacora.encrypt("-"));
            }
        }