miércoles, 26 de febrero de 2020

My Aplicación, Aplicacion de apoyo para las aplicaciones

Namespace My

    ' Los siguientes eventos están disponibles para MyApplication:
    ' 
    ' Inicio: se desencadena cuando se inicia la aplicación, antes de que se cree el formulario de inicio.
    ' Apagado: generado después de cerrar todos los formularios de la aplicación. Este evento no se genera si la aplicación termina de forma anómala.
    ' UnhandledException: generado si la aplicación detecta una excepción no controlada.
    ' StartupNextInstance: se desencadena cuando se inicia una aplicación de instancia única y la aplicación ya está activa. 
    ' NetworkAvailabilityChanged: se desencadena cuando la conexión de red está conectada o desconectada.
    Partial Friend Class MyApplication

#Region "Declaraciones"
        Private Perfil As Integer
        Private Usuario As Integer
        Private Aplic As Integer
        Private col As Integer
        Private desccol As String
        Private TIPO As String
        Private _NombreArchivoLOG As String
#End Region

#Region "Eventos"

        Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
            Try
                ' e.Cancel = True volver a poner!!!!!!!!!!!
                If UCase(e.CommandLine.Item(2).ToString) = "1046147MIMO" Then
                    e.Cancel = False
                    IDPERFIL = CInt(e.CommandLine.Item(0))
                    IDUSUARIO = CInt(e.CommandLine.Item(1))
                    IDAPLICACION = CInt(e.CommandLine.Item(3))
                    If IDPERFIL = 15 Or IDPERFIL = 18 Then 'CALZADO
                        TIPOUSUARIO = "C"
                    Else                  ' PRENDAS
                        TIPOUSUARIO = "P"
                    End If

                Else
                    ' e.Cancel = True   volver a poner!!!!!!!!!!!
                End If
            Catch ex As Exception
                'ObjGestionStockRN = New GestionStockRN
                'ObjGestionStockRN.MensajeSistema(2, "Mensaje Sistema", "#ERROR(): Debe ingresar al módulo desde el módulo principal. Cierre todas las ventanas y vuelva a intentarlo.")
            End Try
        End Sub

        Private Sub MyApplication_StartupNextInstance(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs) Handles Me.StartupNextInstance
            Try
                'ObjGestionStockRN = New GestionStockRN
                'ObjGestionStockRN.MensajeSistema(1, "Mensaje Sistema", "#ERROR(): La aplicación ya se encuentra abierta.")
            Catch ex As Exception
            End Try
        End Sub

        Private Sub MyApplication_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown
            Try
                'objGsRN = New GestionStockRN
                'objGsRN.SP_PLUS_REMISION_LOGEAR_USUARIO_CONECTADO(My.Application.IDUSUARIO, My.Computer.Name, "DESCONECTADO", My.Application.Info.Version.ToString)
            Catch ex As Exception
            End Try
        End Sub


#End Region

#Region "Propiedades"

        Public Property IDPERFIL() As Integer
            Get
                IDPERFIL = Perfil
            End Get
            Set(ByVal value As Integer)
                Perfil = value
            End Set
        End Property

        Public Property IDUSUARIO() As Integer
            Get
                IDUSUARIO = Usuario
            End Get
            Set(ByVal value As Integer)
                Usuario = value
            End Set
        End Property

        Public Property IDAPLICACION() As Integer
            Get
                Return Aplic
            End Get
            Set(ByVal value As Integer)
                Aplic = value
            End Set
        End Property

        Public Property IDCOLEC() As Integer
            Get
                IDCOLEC = col
            End Get
            Set(ByVal value As Integer)
                col = value
            End Set
        End Property

        Public Property DESCCOLEC() As String
            Get
                DESCCOLEC = desccol
            End Get
            Set(ByVal value As String)
                desccol = value
            End Set
        End Property

        Public Property TIPOUSUARIO() As String
            Get
                TIPOUSUARIO = TIPO
            End Get
            Set(ByVal value As String)
                TIPO = value
            End Set
        End Property

        Public Property NombreArchivoLOG() As String
            Get
                Return _NombreArchivoLOG
            End Get
            Set(ByVal value As String)
                _NombreArchivoLOG = value
            End Set
        End Property

#End Region

    End Class


End Namespace

No hay comentarios:

Publicar un comentario

Los mail de oulook no se pueden reenviar.

 cuando en el asunto poseen un caracter especial por ejemplo @#$ los correos no salen y no te muestra ningun correo de rebote, especialmente...