Site Search:
Sign in | Join | Help

VS Tools User Class

Last post 03-29-2008 9:57 AM by Steve Gray. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-29-2008 9:57 AM

    • Steve Gray
    • Top 10 Contributor
      Male
    • Joined on 01-10-2007
    • Bradenton, Florida
    • Guru
    • Points 2,315

    VS Tools User Class

     
    
    
    Imports Microsoft.ApplicationBlocks.Data
    Imports Microsoft.Dexterity.Applications
    Imports System.Configuration
    
    
    Public Class user
        Public ReadOnly Property Database() As String
            Get
                Return Dynamics.Globals.IntercompanyId.Value()
            End Get
        End Property
        Public ReadOnly Property UserID() As String
            Get
                Return Dynamics.Globals.UserId.Value
            End Get
        End Property
        Public ReadOnly Property ConnectionString() As String
            Get
                Return "Data Source=" & Me.server & ";Integrated Security=SSPI;Initial Catalog=" & Me.Database
    
    
            End Get
        End Property
        Public ReadOnly Property server()
            Get
                'Declare an instance of the Microsoft Dynamics GP syBackupRestore 
                'form in which the function resides.
                Dim backup As Microsoft.Dexterity.Applications.DynamicsDictionary.SyBackupRestoreForm
                backup = Microsoft.Dexterity.Applications.Dynamics.Forms.SyBackupRestore
    
    
                'Invoke the form-level function.  
                Return backup.Functions.GetServerNameWithInstance.Invoke()
    
    
            End Get
        End Property
        Public ReadOnly Property OrderType() As String
            Get
                Return ConfigurationManager.AppSettings("OrderType").ToString
            End Get
        End Property
    
    
    End Class
    
    
     

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • Post Points: 0
Page 1 of 1 (1 items)