VERSION 5.00
Begin VB.Form QuotMain 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Quotation main"
   ClientHeight    =   6765
   ClientLeft      =   60
   ClientTop       =   330
   ClientWidth     =   9555
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   6765
   ScaleWidth      =   9555
   ShowInTaskbar   =   0   'False
   Begin VB.ListBox lst_On_What 
      Height          =   255
      ItemData        =   "OutlineForm.frx":0000
      Left            =   6540
      List            =   "OutlineForm.frx":0002
      TabIndex        =   21
      Top             =   600
      Visible         =   0   'False
      Width           =   1860
   End
   Begin VB.PictureBox pic_pics 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   6675
      Left            =   8400
      ScaleHeight     =   6645
      ScaleWidth      =   630
      TabIndex        =   11
      Top             =   480
      Width           =   665
      Begin VB.PictureBox Picture2 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   0  'None
         DragIcon        =   "OutlineForm.frx":0004
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   384
         Left            =   60
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   19
         Top             =   3600
         Visible         =   0   'False
         Width           =   384
      End
      Begin VB.PictureBox pic_refresh 
         AutoSize        =   -1  'True
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   0  'None
         Height          =   384
         Left            =   60
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   18
         Top             =   2580
         Visible         =   0   'False
         Width           =   384
      End
      Begin VB.PictureBox pic_log 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   0  'None
         DragIcon        =   "OutlineForm.frx":030E
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   384
         Left            =   60
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   17
         Top             =   2100
         Visible         =   0   'False
         Width           =   384
      End
      Begin VB.PictureBox pic_print 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   0  'None
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   384
         Left            =   60
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   16
         Top             =   1580
         Visible         =   0   'False
         Width           =   384
      End
      Begin VB.PictureBox pic_delete 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   384
         Left            =   60
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   15
         Top             =   1020
         Visible         =   0   'False
         Width           =   384
      End
      Begin VB.PictureBox pic_upd 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   0  'None
         DragIcon        =   "OutlineForm.frx":0618
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   384
         Left            =   60
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   14
         Top             =   540
         Visible         =   0   'False
         Width           =   384
      End
      Begin VB.PictureBox pic_add 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         DragIcon        =   "OutlineForm.frx":0922
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   480
         Left            =   60
         ScaleHeight     =   480
         ScaleWidth      =   480
         TabIndex        =   13
         Top             =   60
         Visible         =   0   'False
         Width           =   480
      End
      Begin VB.PictureBox Picture1 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   0  'None
         DragIcon        =   "OutlineForm.frx":0C2C
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   384
         Left            =   60
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   12
         Top             =   3120
         Visible         =   0   'False
         Width           =   384
      End
   End
   Begin VB.PictureBox SSP_Tab 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   495
      Left            =   3120
      ScaleHeight     =   495
      ScaleWidth      =   6495
      TabIndex        =   5
      Top             =   0
      Visible         =   0   'False
      Width           =   6495
      Begin VB.CommandButton cmd_View 
         Caption         =   "cmd_General"
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   396
         Index           =   1
         Left            =   0
         TabIndex        =   10
         Top             =   0
         Visible         =   0   'False
         Width           =   1272
      End
      Begin VB.CommandButton cmd_View 
         Caption         =   "cmd_Logistic"
         Enabled         =   0   'False
         Height          =   396
         Index           =   2
         Left            =   1260
         TabIndex        =   9
         Top             =   0
         Visible         =   0   'False
         Width           =   1272
      End
      Begin VB.CommandButton cmd_View 
         Caption         =   "cmd_Marketing"
         Enabled         =   0   'False
         Height          =   396
         Index           =   3
         Left            =   2520
         TabIndex        =   8
         Top             =   0
         Visible         =   0   'False
         Width           =   1272
      End
      Begin VB.CommandButton cmd_View 
         Caption         =   "cmd_Products"
         Enabled         =   0   'False
         Height          =   396
         Index           =   4
         Left            =   3780
         TabIndex        =   7
         Top             =   0
         Visible         =   0   'False
         Width           =   1260
      End
      Begin VB.CommandButton cmd_View 
         Caption         =   "cmd_Documents"
         Enabled         =   0   'False
         Height          =   396
         Index           =   5
         Left            =   5040
         TabIndex        =   6
         Top             =   0
         Visible         =   0   'False
         Width           =   1272
      End
   End
   Begin VB.PictureBox SSPanel1 
      Align           =   3  'Align Left
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H80000008&
      Height          =   6765
      Left            =   0
      ScaleHeight     =   6735
      ScaleWidth      =   3060
      TabIndex        =   0
      Top             =   0
      Width           =   3090
      Begin VB.PictureBox ssp_ico 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         BorderStyle     =   0  'None
         ForeColor       =   &H80000008&
         Height          =   570
         Left            =   0
         ScaleHeight     =   570
         ScaleWidth      =   3075
         TabIndex        =   1
         Top             =   0
         Width           =   3075
         Begin VB.PictureBox pic_OutlFullRefresh 
            AutoSize        =   -1  'True
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   480
            Left            =   720
            ScaleHeight     =   480
            ScaleWidth      =   480
            TabIndex        =   20
            Top             =   60
            Width           =   480
         End
         Begin VB.PictureBox pic_search 
            Appearance      =   0  'Flat
            AutoSize        =   -1  'True
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            DragIcon        =   "OutlineForm.frx":0F36
            DrawStyle       =   5  'Transparent
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   480
            Left            =   1320
            ScaleHeight     =   480
            ScaleWidth      =   480
            TabIndex        =   4
            Top             =   60
            Width           =   480
         End
         Begin VB.PictureBox pic_OutlRefresh 
            AutoSize        =   -1  'True
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   480
            Left            =   120
            ScaleHeight     =   480
            ScaleWidth      =   480
            TabIndex        =   3
            Top             =   60
            Width           =   480
         End
         Begin VB.PictureBox pic_quit 
            Appearance      =   0  'Flat
            AutoSize        =   -1  'True
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   480
            Left            =   1920
            ScaleHeight     =   480
            ScaleWidth      =   480
            TabIndex        =   2
            Top             =   60
            Width           =   480
         End
      End
      Begin Project1.CTreeView tv_Outline 
         Height          =   6015
         Left            =   0
         TabIndex        =   22
         Top             =   660
         Width           =   3015
         _ExtentX        =   6588
         _ExtentY        =   4471
      End
   End
End
Attribute VB_Name = "QuotMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit




Public Event FormEvtActionChangeView(ByVal li_NewView As Integer)
Public Event FormEvtActionLeafClick(ByVal ls_OutLineCode As String, ByVal ls_OutlineDesc As String)
Public Event FormEvtActionNodeClick(ByVal ls_OutLineCode As String, ByVal ls_OutlineDesc As String)
Public Event FormEvtActionLooseSelection()
Public Event FormEvtActionAdd()
Public Event FormEvtActionOptionalAdd(ByVal li_OptionNumber As Integer)
Public Event FormEvtActionClose()
Public Event FormEvtSearch()



Private Sub OptionalAddAddOne(ByVal ls_PossibleOption)
'------------------------------------------------------------------
' Name : OptionalAddAddOne
'
' Purpose : Go to the mode : Show a list of possible entity to add when the user click on the add button
'           And raise the event EvtActionOptionalAdd when the user choose an element in the list. (element number is passed in parameter of the event)
'
' Parameters : None
' Return values : None
'
'
' review : Fev/01/2000 by JJB
'-
    gb_MultipleChoiceWhenAdd = OK
    QuotMain.lst_On_What.AddItem ls_PossibleOption
    QuotMain.lst_On_What.Height = 255 * QuotMain.lst_On_What.ListCount
End Sub

Private Sub cmd_View_Click(Index As Integer)
'------------------------------------------------------------------
' Name :cmd_View_Click
'
' Purpose :update the visual state of the fake tabs and raise this event
'
' review : 27/Oct/1999 by JJB
'------------------------------------------------------------------

Dim li_Count As Integer
    MouseOff
    ' de-select the old view and select the good one
    For li_Count = 1 To Index - 1
        cmd_View(li_Count).Font.Bold = False
    Next li_Count
    cmd_View(Index).Font.Bold = True
    For li_Count = Index + 1 To mi_NbScreenView
        cmd_View(li_Count).Font.Bold = False
    Next li_Count
    'raise the event
    RaiseEvent FormEvtActionChangeView(Index)
    MouseOn
End Sub

Private Sub Form_Click()
'------------------------------------------------------------------
' Name :Form_Click
'
' Purpose :Hide the list of optional element to add
'
' review : Fev/1/2000 by JJB
'------------------------------------------------------------------
    QuotMain.lst_On_What.Visible = KO
End Sub

Private Sub Form_Load()
'------------------------------------------------------------------
' Name :Form_Load
'
' Purpose :initialize the form
'
' review : 27/Oct/1999 by JJB
' review : 30/Mars/2000 by JJB now gb_AddButtonVisible defined if pic_add must be visible or not
'------------------------------------------------------------------
Dim lo_TempPicure As Object
Dim li_Count As Integer

    gb_FormLoaded = OK
    MouseOff
    
    
    
    'define the size of window
    Me.Top = 0
    Me.Left = 0
    Me.Height = mi_FormHeight
    Me.Width = mi_FormWidth
    
    'Let the outline to take the whole screen (in height)
    tv_Outline.Height = Me.Height - tv_Outline.Top - 405
    ml_TopView = Me.Top + tv_Outline.Top + 300
    ml_LeftView = Me.Left + tv_Outline.Left + tv_Outline.Width + 90
    
    'Positionning the ToolsBar
    QuotMain.pic_pics.Top = ml_TopToolsbar
    QuotMain.pic_pics.Left = ml_LeftToolsbar
    QuotMain.lst_On_What.Top = ml_TopToolsbar + 120
    QuotMain.lst_On_What.Left = ml_LeftToolsbar - 1860
    
    'initialize the view
    If mi_NbScreenView > 5 Then
        mi_NbScreenView = 5
    End If
    For li_Count = 1 To mi_NbScreenView
        cmd_View(li_Count).Visible = OK
        cmd_View(li_Count).Enabled = OK
    Next li_Count
    
    ' load all pictures
    pic_search.Picture = LoadResPicture(RES_SEARCH, 1)
    pic_OutlRefresh.Picture = LoadResPicture(RES_REFRESH, 1)
    pic_OutlFullRefresh.Picture = LoadResPicture(RES_LONGREFRESH, 1)
    pic_quit.Picture = LoadResPicture(RES_QUIT, 1)
    pic_add.Picture = LoadResPicture(RES_ADD, 1)

    
    ' get the traduction of each fields
    Getcsts
        
    'load picture for the outline
    Set lo_TempPicure = LoadResPicture(RES_OUTLINEFOLDER, 0)
    tv_Outline.ListImageAdd "RES" & CStr(RES_OUTLINEFOLDER), lo_TempPicure
    
    Set lo_TempPicure = LoadResPicture(RES_OUTLINELEAF, 0)
    tv_Outline.ListImageAdd "RES" & CStr(RES_OUTLINELEAF), lo_TempPicure
    
    Set lo_TempPicure = LoadResPicture(RES_OUTLINEVOID, 0)
    tv_Outline.ListImageAdd "RES" & CStr(RES_OUTLINEVOID), lo_TempPicure
        
    'Initialize the outline
    tv_Outline.i_OutlineFilterCount = 0
    tv_Outline.b_FirstLevelInCombo = KO
    tv_Outline.b_LeafStringData = KO
    tv_Outline.s_LanguageCode = gut_LangLogin.Code
    tv_Outline.s_ParamSystem = ms_SystemName
    tv_Outline.s_SearchReq = "EXEC Search_" & ms_SystemName & "_lst $3$, '$1$', '$2$'"
    tv_Outline.Reinit
    
    'define if the pic_add must be visible or not
    pic_add.Visible = gb_AddButtonVisible
        
     'Special case for technical managers
    If gb_TestCanUpd Then
        pic_add.Visible = OK
        pic_delete.Visible = OK
        pic_upd.Visible = OK
    Else
        'if the user can manage at least one sales office
'        If UBound(gs_SO_UPDRigth, 1) > 0 Then
'            pic_add.Visible = OK
'        Else
'            pic_add.Visible = KO
'        End If
    pic_delete.Visible = KO
    pic_upd.Visible = KO
    End If
       
    MouseOn
End Sub

Private Function SoundLike(ByVal ls_Ref As String, ByVal ls_Compare As String) As Integer
'------------------------------------------------------------------
' Name :SoundLike
'
' Purpose : Compare two string and return the number of first characteres equal
'
' Param
'       ls_Ref      : a string to compare
'       ls_Compare  : a string
'
' return the number of first characteres equal
'
' review : 27/Oct/1999 by JJB
'------------------------------------------------------------------
Dim ls_TempRef As String
Dim ls_TempCompare As String
Dim li_CurrChar As Integer
    ls_TempRef = ls_Ref
    ls_TempCompare = ls_Compare
    If Len(ls_TempRef) > 1 And Len(ls_TempCompare) > 1 Then
        For li_CurrChar = 1 To Len(ls_Ref)
            If Left(ls_TempRef, 1) <> Left(ls_TempCompare, 1) Then
                Exit For
            End If
            If Len(ls_TempRef) > 1 And Len(ls_TempCompare) > 1 Then
                ls_TempRef = right(ls_TempRef, Len(ls_TempRef) - 1)
                ls_TempCompare = right(ls_TempCompare, Len(ls_TempCompare) - 1)
            Else
                Exit For
            End If
        Next li_CurrChar
        SoundLike = li_CurrChar - 1
    Else
        SoundLike = 0
    End If
End Function

Public Sub FLocalAddItem(ByVal ls_OutLineCode As String, ByVal ls_OutlineDesc As String)

'------------------------------------------------------------------
' Name :FLocalAddItem
'
' Purpose :take a new code of an element of the outline, then add this element at each opened branch where it must appear
'
' param :
'   ls_OutLineCode : the code of the element to add
'   ls_OutlineDesc : the description of the element to add (not used any more)
'
'
' review : 27/Nov/1999 by JJB
' review : 30/Mars/2000 by JJB use CTreeView component
'------------------------------------------------------------------

    tv_Outline.LocalAddItem (ls_OutLineCode)

End Sub


Public Sub FLocalDelItem(ByVal ls_OutLineCode As String)
'------------------------------------------------------------------
' Name :FLocalDelItem
'
' Purpose : delete a leaf from the outline
'
' param
'   ls_OutLineCode :    code of the element to remove
'
' review : 27/Nov/1999 by JJB
' review : 30/Mars/2000 by JJB use CTreeView component
'------------------------------------------------------------------
    tv_Outline.LocalDelItem (ls_OutLineCode)

End Sub


Public Sub FSearchOutline(ByVal ls_OutLineCode As String)
'------------------------------------------------------------------
' Name :FSearchOutline
'
' Purpose : Open the outline to show an item given by it's code with ls_OutLineCode
'           the outline try to open the outline the most closely where it already open
'
' param
'       ls_OutlineCode  : the code of the item to find
'
' review : 27/Oct/1999 by JJB
' review : 30/Mars/2000 by JJB use CTreeView component
'------------------------------------------------------------------
    tv_Outline.SearchLeaf ls_OutLineCode
End Sub



Private Sub Form_Unload(Cancel As Integer)
'------------------------------------------------------------------
' Name :Form_Unload
'
' Purpose :
'
' review : 27/Oct/1999 by JJB
' review : 30/Mars/2000 by JJB  remove desalocate memory for the old picture of the outline
'------------------------------------------------------------------

    MouseOff
    RaiseEvent FormEvtActionClose
    MouseOn

End Sub

Private Sub lst_On_What_Click()
'------------------------------------------------------------------
' Name :lst_On_What_Click
'
' Purpose : raise an event with the opional chosen
'
' review : 2/Fev/2000 by JJB
'------------------------------------------------------------------
    If lst_On_What.ListIndex = -1 Then Exit Sub
    RaiseEvent FormEvtActionOptionalAdd(lst_On_What.ListIndex)
    lst_On_What.Visible = KO
End Sub




Private Sub pic_add_Click()
'------------------------------------------------------------------
' Name :
'
' Purpose :
'
' review : 27/Oct/1999 by JJB
'------------------------------------------------------------------
    If gb_MultipleChoiceWhenAdd = KO Then
        RaiseEvent FormEvtActionAdd
    Else
        MouseOff
        lst_On_What.Visible = OK
        lst_On_What.SetFocus
        MouseOn
    End If
End Sub

Private Sub pic_OutlFullRefresh_Click()
'------------------------------------------------------------------
' Name :pic_OutlFullRefresh_Click
'
' Purpose : refresh all sub-branch of the current selected element of the outline
'
' review : 2/Dec/1999 by JJB
'------------------------------------------------------------------

    MouseOff
    ReFillChildOutline
    MouseOn
End Sub

Private Sub pic_OutlRefresh_Click()
'------------------------------------------------------------------
' Name :pic_OutlRefresh_Click
'
' Purpose :close the outline, and open-it to the current selected element
'
' review : 2/Dec/1999 by JJB
' review : 30/Mars/2000 by JJB  use CTreeView
'------------------------------------------------------------------
Dim ls_path As String
Dim li_Count As Integer

    MouseOff
    
    ls_path = tv_Outline.GetPath
    tv_Outline.Reinit
    If ls_path <> "" Then
        tv_Outline.SetPath ls_path
    End If
    
    MouseOn
End Sub

Private Sub pic_quit_Click()
'------------------------------------------------------------------
' Name :pic_quit_Click
'
' Purpose :
'
' review : 27/Oct/1999 by JJB
'------------------------------------------------------------------

    MouseOff
    SetOwner Me.hwnd, gl_OldquotationoutlineHwnd
    Unload Me
    MouseOn

End Sub



Public Sub ReFillChildOutline()

'------------------------------------------------------------------
' Name :ReFillChildOutline
'
' Purpose : refresh a part of the outline. Clear then try to re-open all visible open sub-branch of the current position
'
'
' review : 2/Dec/1999 by JJB
' review : 30/Mars/2000 by JJB  use CTreeView
'------------------------------------------------------------------
    tv_Outline.ReFillChildOutline
End Sub


Public Sub OpenTestOutline(ByVal ls_path As String)
'------------------------------------------------------------------
' Name : OpenTestOutline
'
' Purpose :open the outline in a specific path
'
' Parameters :
'       ls_path : the path to open the outline
'
' review : 27/Oct/1999 by JJB
' review : 30/Mars/2000 by JJB use CTreeView component
'------------------------------------------------------------------
 tv_Outline.SetPath ls_path
End Sub




Private Sub Getcsts()
'------------------------------------------------------------------
' Name : Getcsts
'
' Purpose : Get all traduction for labels on the form
'
' Parameters : None
'
' review : 27/Oct/1999 by JJB
'------------------------------------------------------------------

Dim ls_Req As String
Dim ll_Statement As Long
Dim li_Status As Integer
Dim ls_Field As String, ls_Text As String

On Error GoTo suite

ls_Req = "EXEC Screen_Csts '" & ms_SystemName & "', '" & gut_LangLogin.Code & "'"
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_Req) Then
    li_Status = SQL_SUCCESS
Else
    li_Status = SQL_ERROR
End If
Do While li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        ls_Field = ODBCData(ll_Statement, 1)
        ls_Text = Left(ODBCData(ll_Statement, 2), 30)
        Select Case ls_Field
        Case "title":
            Caption = ls_Text
            ms_FormTitle = ls_Text
        Case "cmd_View1":
            cmd_View(1).Caption = ls_Text
        Case "cmd_View2":
            cmd_View(2).Caption = ls_Text
        Case "cmd_View3":
            cmd_View(3).Caption = ls_Text
        Case "cmd_View4":
            cmd_View(4).Caption = ls_Text
        Case "cmd_View5":
            cmd_View(5).Caption = ls_Text
        Case "lbl_Option1":
            OptionalAddAddOne ls_Text
        Case "lbl_Option2":
            OptionalAddAddOne ls_Text
        Case "lbl_Option3":
            OptionalAddAddOne ls_Text
        Case "lbl_Option4":
            OptionalAddAddOne ls_Text
        Case "lbl_Option5":
            OptionalAddAddOne ls_Text
        Case "lbl_Option6":
            OptionalAddAddOne ls_Text
        Case "lbl_Option7":
            OptionalAddAddOne ls_Text
        Case "lbl_Option8":
            OptionalAddAddOne ls_Text
        Case "lbl_Option9":
            OptionalAddAddOne ls_Text
        End Select
    End If
Loop
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
Exit Sub

suite:
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
StdError
End Sub

'Private Sub GetOutlineParameter()
''------------------------------------------------------------------
'' Name : GetOutlineParameter
''
'' Purpose : Get all stored procedure for filling the outline
''
'' Parameters : None
''
'' review : 27/Oct/1999 by JJB
''------------------------------------------------------------------
'End Sub


Private Sub pic_search_Click()
    RaiseEvent FormEvtSearch
End Sub

Private Sub tv_Outline_EvtLeafClick(ByVal ls_OutLineCode As String, ByVal ls_OutlineDesc As String)
    RaiseEvent FormEvtActionLeafClick(ls_OutLineCode, ls_OutlineDesc)
    SSP_Tab.Visible = OK
End Sub

Private Sub tv_Outline_EvtLooseSelection()
    RaiseEvent FormEvtActionLooseSelection
    SSP_Tab.Visible = KO
End Sub

Private Sub tv_Outline_EvtNodeClick(ByVal ls_OutLineCode As String, ByVal ls_OutlineDesc As String)
'------------------------------------------------------------------
' Name :tv_Outline_EvtNodeClick
'
' Purpose : Send the notification that a node has been clicked
'
' review : 20/mars/2000 by JJB
'------------------------------------------------------------------

RaiseEvent FormEvtActionNodeClick(ls_OutLineCode, ls_OutlineDesc)
SSP_Tab.Visible = KO

End Sub

