VERSION 5.00
Begin VB.Form TestRes_mtnc 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form1"
   ClientHeight    =   4230
   ClientLeft      =   3000
   ClientTop       =   1770
   ClientWidth     =   6720
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   4230
   ScaleWidth      =   6720
   StartUpPosition =   1  'CenterOwner
   Begin VB.ListBox lst_toolbox 
      ForeColor       =   &H00000000&
      Height          =   840
      ItemData        =   "TESTRES2.frx":0000
      Left            =   1200
      List            =   "TESTRES2.frx":0002
      TabIndex        =   31
      Top             =   600
      Visible         =   0   'False
      Width           =   1935
   End
   Begin VB.PictureBox ButtonBox 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      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          =   612
      Left            =   0
      ScaleHeight     =   585
      ScaleWidth      =   9405
      TabIndex        =   25
      Top             =   0
      Width           =   9432
      Begin VB.PictureBox pic_Camera 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         Height          =   384
         Left            =   1740
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   30
         Top             =   120
         Visible         =   0   'False
         Width           =   384
      End
      Begin VB.PictureBox pic_Toolbox 
         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          =   384
         Left            =   1200
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   29
         Top             =   120
         Width           =   384
      End
      Begin VB.PictureBox pic_Undo 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         DragIcon        =   "TESTRES2.frx":0004
         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            =   660
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   28
         Top             =   120
         Width           =   384
      End
      Begin VB.PictureBox pic_Quit 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         Height          =   384
         Left            =   2280
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   27
         Top             =   120
         Width           =   384
      End
      Begin VB.PictureBox pic_Save 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         DragIcon        =   "TESTRES2.frx":030E
         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            =   120
         ScaleHeight     =   390
         ScaleWidth      =   390
         TabIndex        =   26
         Top             =   120
         Width           =   384
      End
   End
   Begin VB.ComboBox cbo_result2 
      Height          =   300
      Index           =   5
      Left            =   4080
      Style           =   2  'Dropdown List
      TabIndex        =   24
      Top             =   2880
      Visible         =   0   'False
      Width           =   555
   End
   Begin VB.ComboBox cbo_result2 
      Height          =   300
      Index           =   4
      Left            =   3960
      Style           =   2  'Dropdown List
      TabIndex        =   23
      Top             =   2460
      Visible         =   0   'False
      Width           =   555
   End
   Begin VB.ComboBox cbo_result2 
      Height          =   300
      Index           =   3
      Left            =   3960
      Style           =   2  'Dropdown List
      TabIndex        =   22
      Top             =   2040
      Visible         =   0   'False
      Width           =   555
   End
   Begin VB.ComboBox cbo_result2 
      Height          =   300
      Index           =   2
      Left            =   4020
      Style           =   2  'Dropdown List
      TabIndex        =   21
      Top             =   1620
      Visible         =   0   'False
      Width           =   555
   End
   Begin VB.ComboBox cbo_result2 
      Height          =   300
      Index           =   1
      Left            =   4080
      Style           =   2  'Dropdown List
      TabIndex        =   20
      Top             =   1200
      Visible         =   0   'False
      Width           =   555
   End
   Begin VB.ComboBox cbo_result 
      Height          =   300
      Index           =   5
      Left            =   2940
      Style           =   2  'Dropdown List
      TabIndex        =   14
      Top             =   2880
      Visible         =   0   'False
      Width           =   3315
   End
   Begin VB.ComboBox cbo_result 
      Height          =   300
      Index           =   4
      Left            =   2940
      Style           =   2  'Dropdown List
      TabIndex        =   13
      Top             =   2460
      Visible         =   0   'False
      Width           =   3375
   End
   Begin VB.ComboBox cbo_result 
      Height          =   300
      Index           =   3
      Left            =   2940
      Style           =   2  'Dropdown List
      TabIndex        =   12
      Top             =   2040
      Visible         =   0   'False
      Width           =   3375
   End
   Begin VB.ComboBox cbo_result 
      Height          =   300
      Index           =   2
      Left            =   2940
      Style           =   2  'Dropdown List
      TabIndex        =   11
      Top             =   1620
      Visible         =   0   'False
      Width           =   3375
   End
   Begin VB.ComboBox cbo_result 
      Height          =   300
      Index           =   1
      Left            =   2940
      Style           =   2  'Dropdown List
      TabIndex        =   10
      Top             =   1200
      Visible         =   0   'False
      Width           =   3375
   End
   Begin VB.TextBox txt_Result 
      Height          =   285
      Index           =   5
      Left            =   2940
      MaxLength       =   40
      TabIndex        =   9
      Top             =   2880
      Visible         =   0   'False
      Width           =   3195
   End
   Begin VB.TextBox txt_Result 
      Height          =   285
      Index           =   4
      Left            =   2940
      MaxLength       =   40
      TabIndex        =   8
      Top             =   2460
      Visible         =   0   'False
      Width           =   3195
   End
   Begin VB.TextBox txt_Result 
      Height          =   285
      Index           =   2
      Left            =   2940
      MaxLength       =   40
      TabIndex        =   7
      Top             =   1620
      Visible         =   0   'False
      Width           =   3195
   End
   Begin VB.TextBox txt_Result 
      Height          =   285
      Index           =   1
      Left            =   2940
      MaxLength       =   40
      TabIndex        =   6
      Top             =   1200
      Visible         =   0   'False
      Width           =   3195
   End
   Begin VB.CommandButton cmd_result 
      Caption         =   "..."
      Height          =   285
      Index           =   5
      Left            =   6240
      TabIndex        =   5
      Top             =   2895
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton cmd_result 
      Caption         =   "..."
      Height          =   285
      Index           =   4
      Left            =   6240
      TabIndex        =   4
      Top             =   2475
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton cmd_result 
      Caption         =   "..."
      Height          =   285
      Index           =   3
      Left            =   6240
      TabIndex        =   3
      Top             =   2055
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton cmd_result 
      Caption         =   "..."
      Height          =   285
      Index           =   2
      Left            =   6240
      TabIndex        =   2
      Top             =   1635
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton cmd_result 
      Caption         =   "..."
      Height          =   285
      Index           =   1
      Left            =   6240
      TabIndex        =   1
      Top             =   1215
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.TextBox txt_Result 
      Height          =   285
      Index           =   3
      Left            =   2940
      MaxLength       =   40
      TabIndex        =   0
      Top             =   2040
      Visible         =   0   'False
      Width           =   3195
   End
   Begin VB.Label lbl_Result 
      Caption         =   "Result 5"
      Height          =   255
      Index           =   5
      Left            =   180
      TabIndex        =   19
      Top             =   2955
      Visible         =   0   'False
      Width           =   2595
   End
   Begin VB.Label lbl_Result 
      Caption         =   "Result 4"
      Height          =   255
      Index           =   4
      Left            =   180
      TabIndex        =   18
      Top             =   2535
      Visible         =   0   'False
      Width           =   2595
   End
   Begin VB.Label lbl_Result 
      Caption         =   "Result 3"
      Height          =   255
      Index           =   3
      Left            =   180
      TabIndex        =   17
      Top             =   2055
      Visible         =   0   'False
      Width           =   2595
   End
   Begin VB.Label lbl_Result 
      Caption         =   "Result 2"
      Height          =   255
      Index           =   2
      Left            =   180
      TabIndex        =   16
      Top             =   1635
      Visible         =   0   'False
      Width           =   2595
   End
   Begin VB.Label lbl_Result 
      Caption         =   "Result 1"
      Height          =   255
      Index           =   1
      Left            =   180
      TabIndex        =   15
      Top             =   1275
      Visible         =   0   'False
      Width           =   2595
   End
End
Attribute VB_Name = "TestRes_mtnc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Const C_FORM = "TestRes_mtnc"

Dim ms_FormTitle As String
Dim ms_TitleModeUpd As String
Dim mi_NewIconcurrency(5) As Integer
Private mla_TYTTranslate(4) As Long       ' task 462 used to translate index->tyt_code in GetCode()

Public Property Let TYTtranslate(ByVal al_Index As Long, ByVal al_value As Long)
    mla_TYTTranslate(al_Index) = al_value
End Property



Private Function Control()
Dim i As Integer

Control = KO

For i = 1 To gi_nbresult
    If gv_result(GetCode(i), 2) = 2 Then
        If Not (CheckNumericValue(txt_Result(i))) Then
            txt_Result(i).SetFocus
            SendMessage 18, "Only numeric field is valid", gut_LangLogin.Code
            Exit Function
        End If
    End If
    
Next i
Control = OK

End Function

Private Sub cbo_result_DropDown(Index As Integer)

Dim ls_Result As String
Dim ls_Req As String

MouseOff
'If mb_resultNotLoaded Then
'    mb_resultNotLoaded = KO
    If cbo_result(Index).ListIndex <> -1 Then
        ls_Result = cbo_result2(Index).List(cbo_result(Index).ListIndex)
    Else
        ls_Result = ""
    End If
    cbo_result2(Index).Clear
    cbo_result(Index).Clear
    
    ls_Req = "Exec Test_dtl_result_cbo " & gv_result(GetCode(Index), 1) & ", '" & gut_LangLogin.Code & "'"
    FillCbo ls_Req, cbo_result2(Index), cbo_result(Index)
    
    If ls_Result <> "" Then
        cbo_result(Index).ListIndex = ComboFindItem(cbo_result2(Index), ls_Result)
    End If
'End If
MouseOn
End Sub


Private Sub cmd_result_Click(Index As Integer)

'iconcurrency
gut_Param.Str25 = gv_result(GetCode(Index), 3)
'field code
gut_Param.Str26 = gv_result(GetCode(Index), 1)
'test code
gut_Param.Str27 = CStr(gi_TestCode)
'concatenated field
gut_Param.Str28 = gv_result(GetCode(Index), 4)
'curve ID
gut_Param.Str29 = gv_result(GetCode(Index), 5)

If gv_result(GetCode(Index), 2) = 3 Then
    'curve with 6 items
    gs_ParamReqIns = "exec Test_Value_Curve_ins1"
    gs_ParamReqUpd = "exec Test_Value_Curve_upd1"
    gut_Param.Str1 = "Test_6"
    gut_Param.Str23 = "exec Screen_Csts 'mtnc_Curve_6v'"
ElseIf gv_result(GetCode(Index), 2) = 4 Then
    'curve with 18 items
    gs_ParamReqIns = "exec Test_Value_Curve_ins2"
    gs_ParamReqUpd = "exec Test_Value_Curve_upd2"
    gut_Param.Str1 = "Test_18"
    gut_Param.Str23 = "exec Screen_Csts 'mtnc_Curve_18v'"
End If

'If gi_TestType = TEST_ASSESSMENT Then
'    gs_Action = "MoreInfo"
'Else
'    Select Case mi_mode
'        Case MODE_UPD
            If txt_Result(Index) = "" Then
                gs_Action = "Add"
            Else
                gs_Action = "Update"
            End If
'        Case Else
 '           gs_Action = "MoreInfo"
 '   End Select
'End If
Tech_Value_Curve.show 1

'récupère l'ID de la courbe ainsi que la description
Select Case gs_Action
Case "Add"
    gv_result(GetCode(Index), 5) = gut_Param.Str29
    gv_result(GetCode(Index), 4) = gut_Param.Str28
Case "Update"
    gv_result(GetCode(Index), 4) = gut_Param.Str28
End Select

'update iconcurrency
gv_result(GetCode(Index), 3) = gut_Param.Str25

FillTabResults CStr(gi_TestCode), gut_LangLogin.Code
MouseOn

End Sub


Private Sub Form_Click()
lst_toolbox.Visible = KO
End Sub

Private Sub Form_Load()

On Error GoTo suite

MouseOff

If gl_CodePage <> 1252 And gl_CodePage <> 0 Then ChangeCharSet Me

pic_Camera.Picture = LoadResPicture(RES_PHOTO, 1)
pic_Undo.Picture = LoadResPicture(RES_CANCEL, 1)
pic_Save.Picture = LoadResPicture(RES_OK, 1)
pic_Quit.Picture = LoadResPicture(RES_QUIT, 1)
pic_Toolbox.Picture = LoadResPicture(RES_TOOL, 1)
Top = 0
Left = 0

ReadConstants
Select Case gs_Action
'Case "Add"
   
Case "Update"
    FillTabResults gi_TestCode, gut_LangLogin.Code
'    GetValues
'Case "Delete"
   
'    GetValues
End Select

MouseOn
Exit Sub

suite:
MouseOn
StdError
End Sub

Private Function UpdTestResult() As Boolean
'------------------------------------------------------------------
' Purpose : insert or update a row in table result and launch the right proc stock for string or integer
'
' Parameters : None
' Return values : true if updated otherwise false
'
' review : 04/20/1999 by D. Pozzera
'------------------------------------------------------------------

Dim ls_Req As String
Dim ll_Statement As Long
Dim li_Status As Integer
Dim ll_lngrows As Long
Dim ls_Line As String
Dim li_Count As Integer
Dim i As Integer

UpdTestResult = False
On Error GoTo Err_UpdTestResult

For i = 1 To gi_nbresult
  'add
  If gv_result(GetCode(i), 4) = "" Then
      Select Case gv_result(GetCode(i), 2)
          Case 1 'string
              If txt_Result(i).Text <> "" Then
                  ls_Req = "EXEC Test_Result_ins1 " _
                      & CStr(gi_TestCode) & ", " _
                      & gv_result(GetCode(i), 1) & ", '" _
                      & QuoteParam(txt_Result(i).Text) & "'"
                  mi_NewIconcurrency(i) = 1
              Else
                  ls_Req = ""
              End If
          Case 2 'integer
              If txt_Result(i).Text <> "" Then
                  ls_Req = "EXEC Test_Result_ins2 " _
                      & CStr(gi_TestCode) & ", " _
                      & gv_result(GetCode(i), 1) & ", " _
                      & txt_Result(i).Text
                  mi_NewIconcurrency(i) = 1
              Else
                  ls_Req = ""
              End If
          Case 5 'global set string
              If cbo_result(i).Text <> "" Then
                  ls_Req = "EXEC Test_Result_ins5 " _
                      & CStr(gi_TestCode) & ", " _
                      & gv_result(GetCode(i), 1) & ", " _
                      & cbo_result2(i).List(cbo_result(i).ListIndex)
                  mi_NewIconcurrency(i) = 1
              Else
                  ls_Req = ""
              End If
          Case Else
              ls_Req = ""
          End Select
  Else
          'update
          Select Case gv_result(GetCode(i), 2)
              Case 1 'string
                  If txt_Result(i).Text = "" Then
                      'delete
                      ls_Req = "EXEC Test_Result_del " _
                      & CStr(gi_TestCode) & ", " _
                      & gv_result(GetCode(i), 1) & ", " _
                      & gv_result(GetCode(i), 3)
                      mi_NewIconcurrency(i) = 0
                  Else
                      ls_Req = "EXEC Test_Result_upd1 " _
                      & CStr(gi_TestCode) & ", " _
                      & gv_result(GetCode(i), 1) & ", " _
                      & gv_result(GetCode(i), 3) & ", '" _
                      & QuoteParam(txt_Result(i).Text) & "'"
                      mi_NewIconcurrency(i) = gv_result(GetCode(i), 3) + 1
                  End If
              Case 2 'integer
                  If txt_Result(i).Text = "" Then
                      'delete
                      ls_Req = "EXEC Test_Result_del " _
                      & CStr(gi_TestCode) & ", " _
                      & gv_result(GetCode(i), 1) & ", " _
                      & gv_result(GetCode(i), 3)
                      mi_NewIconcurrency(i) = 0
                  Else
                      ls_Req = "EXEC Test_Result_upd2 " _
                      & CStr(gi_TestCode) & ", " _
                      & gv_result(GetCode(i), 1) & ", " _
                      & gv_result(GetCode(i), 3) & ", " _
                      & txt_Result(i).Text
                      mi_NewIconcurrency(i) = gv_result(GetCode(i), 3) + 1
                  End If
              Case 5 'global set string
                  If cbo_result(i).Text = "" Then
                      'delete
                      ls_Req = "EXEC Test_Result_del " _
                      & CStr(gi_TestCode) & ", " _
                      & gv_result(GetCode(i), 1) & ", '" _
                      & gv_result(GetCode(i), 3)
                      mi_NewIconcurrency(i) = 0
                  Else
                      ls_Req = "EXEC Test_Result_upd5 " _
                      & CStr(gi_TestCode) & ", " _
                      & gv_result(GetCode(i), 1) & ", " _
                      & gv_result(GetCode(i), 3) & ", " _
                      & cbo_result2(i).List(cbo_result(i).ListIndex)
                      mi_NewIconcurrency(i) = gv_result(GetCode(i), 3) + 1
                  End If
              Case Else
              ls_Req = ""
          End Select
  End If
  
  If ls_Req <> "" Then
      If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_Req) Then
          li_Status = SQLRowCount(ll_Statement, ll_lngrows)
          li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
          If ll_lngrows = 0 Then
              Err.Raise C_ERRORRAISE + 3, C_FORM & "/UpdTestResult", "Update result failed"
          End If
      Else
          li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
          Err.Raise C_ERRORRAISE + 3, C_FORM & "/UpdTestResult", "Update result failed"
      End If
  End If
Next i

UpdTestResult = True
Exit Function

Err_UpdTestResult:

End Function

Private Function GetCode(ByVal li_indexchamp As Integer) As Integer
'------------------------------------------------------------------
' Purpose : return the code of the field according to test category
'
' Parameters : li_indexchamp : field index
'
' Return values : (integer) the code of field
'
' review : 04/20/1999 by D. Pozzera
'------------------------------------------------------------------
    GetCode = mla_TYTTranslate(li_indexchamp - 1)

End Function

Private Sub ReadConstants()
Dim ls_Req As String
Dim ll_Statement As Long
Dim li_Status As Integer
Dim ls_Field As String
Dim ls_Text As String
Dim ls_Title As String

On Error GoTo Err_ReadConstants
ls_Req = "EXEC Screen_Csts 'TestRs" & gs_CodeCategory & "', '" & 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 = ODBCData(ll_Statement, 2)
        Select Case ls_Field
            Case "title":
                Caption = ls_Text
                ms_FormTitle = ls_Text
            Case "titleU":
                ms_TitleModeUpd = ls_Text
            Case "lbl_Result1":
                lbl_Result(1) = ls_Text
                lbl_Result(1).Visible = OK
                'txt_Result(1).Visible = OK
            Case "lbl_Result2":
                lbl_Result(2) = ls_Text
                lbl_Result(2).Visible = OK
                'txt_Result(2).Visible = OK
            Case "lbl_Result3":
                lbl_Result(3) = ls_Text
                lbl_Result(3).Visible = OK
                'txt_Result(3).Visible = OK
            Case "lbl_Result4":
                lbl_Result(4) = ls_Text
                lbl_Result(4).Visible = OK
                'txt_Result(4).Visible = OK
            Case "lbl_Result5":
                lbl_Result(5) = ls_Text
                lbl_Result(5).Visible = OK
            Case "ms_TradTestDtl"
                lst_toolbox.Clear
                lst_toolbox.AddItem ls_Text
        End Select
   End If
Loop
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
Exit Sub

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

Private Sub FillTabResults(ByVal li_tst_code As Integer, ByVal ls_Language_Code As String)
'------------------------------------------------------------------
' Purpose : fill in the results tab
'
' Parameters : li_tst_code : (integer) test code
'              ls_language_code : (string)
'
' review : 04/20/1999 by D. Pozzera
'------------------------------------------------------------------

Dim ls_Req As String
Dim ll_Statement As Long
Dim li_Status As Integer
Dim i As Integer

txt_Result(1) = ""
txt_Result(2) = ""
txt_Result(3) = ""
txt_Result(4) = ""
txt_Result(5) = ""

For i = 1 To gi_nbresult
    Select Case gv_result(GetCode(i), 2)
    Case 1, 2
        txt_Result(i).Visible = OK
        txt_Result(i) = gv_result(GetCode(i), 4)
        cmd_result(i).Visible = KO
        txt_Result(i).Locked = KO
    Case 3, 4
        'if result was a curve, command button was visible
        txt_Result(i).Visible = OK
        txt_Result(i) = gv_result(GetCode(i), 4)
        txt_Result(i).Locked = OK
        cmd_result(i).Visible = OK
        cbo_result(i).Visible = KO
    Case 5
        cbo_result(i).Visible = OK
        cbo_result(i).Clear
        cbo_result2(i).Clear
        cbo_result(i).AddItem gv_result(GetCode(i), 4)
        cbo_result2(i).AddItem gv_result(GetCode(i), 5)
        cbo_result(i).ListIndex = 0
        txt_Result(i).Visible = KO
    End Select
Next i

MouseOn
Exit Sub

End Sub



Private Sub UpdScreenResults(ByVal li_tst_code As Integer, ByVal ls_Language_Code As String)
'------------------------------------------------------------------
' Purpose : fill in the results tab in the consultation screen with the modification
'
' Parameters : li_tst_code : (integer) test code
'              ls_language_code : (string)
'
' review : 06/09/1999 by JJB
'------------------------------------------------------------------

Dim i As Integer

TestRes.txt_Result(1) = ""
TestRes.txt_Result(2) = ""
TestRes.txt_Result(3) = ""
TestRes.txt_Result(4) = ""
TestRes.txt_Result(5) = ""


For i = 1 To gi_nbresult
    Select Case gv_result(GetCode(i), 2)
    Case 1, 2
        TestRes.txt_Result(i) = txt_Result(i)
        gv_result(GetCode(i), 4) = txt_Result(i)
        gv_result(GetCode(i), 3) = mi_NewIconcurrency(i)
    Case 3, 4
        TestRes.txt_Result(i) = gv_result(GetCode(i), 4)
    Case 5
        TestRes.txt_Result(i) = cbo_result(i).List(cbo_result(i).ListIndex)
        gv_result(GetCode(i), 4) = cbo_result(i).List(cbo_result(i).ListIndex)
        gv_result(GetCode(i), 3) = mi_NewIconcurrency(i)
    End Select
Next i

Exit Sub

End Sub


Private Sub lst_toolbox_Click()
    OptDtlResults
    lst_toolbox.Visible = KO
End Sub

Private Sub pic_quit_Click()
MouseOff
Unload Me
MouseOn
End Sub


Private Sub pic_Save_Click()
On Error GoTo suite

MouseOff
If Control Then
    If BeginTran(gl_Environment, gl_Database) Then
        If UpdTestResult() Then
            If CommitTran(gl_Environment, gl_Database) Then
                gb_Return = OK
                UpdScreenResults gi_TestCode, gut_LangLogin.Code
                Unload Me
            End If
        Else
            RollbackTran gl_Environment, gl_Database
            SendMessage 3, "Update result failed", gut_LangLogin.Code
        End If
    Else
        SendMessage 3, "Update result failed", gut_LangLogin.Code
    End If
End If
MouseOn
Exit Sub

suite:
StdError
End Sub


Private Sub pic_ToolBox_Click()
lst_toolbox.Visible = OK
End Sub

Private Sub pic_UnDo_Click()

FillTabResults gi_TestCode, gut_LangLogin.Code

End Sub


