0

I want to know how to read out of a file and display the data on different labels. If anybody can suggest an efficient way of doing this 100 items for diffident file locations, that will appropriated .

 Private Sub BtnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSave.Click         If RadFriday.Checked = True Then
            Select Case Row 
                Case 0 
                    Customer(0, 0) = New StreamWriter("D:\theater seats\friday\A1Seat.txt") 
                    Customer(0, 0).Write(ArrayFS(0, 0, 0) & (" ") & ArrayFS(0, 0, 1) & (", ") & ArrayFS(0, 0, 2) & (", ") & ArrayFS(0, 0, 3) & (", ") & ArrayFS(0, 0, 4) & (", ") & ArrayFS(0, 0, 5) & (", ") & ArrayFS(0, 0, 6) & (", ") & ArrayFS(0, 0, 7))
                    MsgBox("Data has been stored.") 
                    Customer(0, 0).Close() 
            End Select 
  End If

    End Sub
Private Sub BtnRead_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnRead.Click 
            Select Case Row 
                Case 0 
                    LblName.Text = "" 
                    CustomerLoad(0, 0, 0) = New StreamReader("D:\theater seats\friday\A1Seat.txt")
                    LblName.Text = CustomerLoad(0, 0, 0).ReadToEnd
                    If LblName.Text = "" Then
                        MsgBox("There is no data stored for this seat!")
                    Else
                        CustomerLoad(0, 0, 0).Close()
                    End If
            End Select
        ElseIf RadSaturday.Checked = True Then

        End If
End Sub
4

0 回答 0