If ("ຈະກະ") IsNot Nothing Then
MsgBox("ນັ່ງກັມຖານຮ້ອຍປີ เหงี่ยนเหงี่ยนเหงี่ยนກໍບໍ່ໄດ້ອີຫຍັງแสลงบองบองเจี๊ยกเจี๊ยก")
Else
MsgBox("แสลงบองบองນັ່ງກັມຖານຮ້ອຍປີ ກໍບໍ່ໄດ້ອີຫຍັງแสลงดเหงี่ยนเหงี่ยนเหงี่ยนบองเจี๊ยกเจี๊ยก ")
End If
Imports MySql.Data.MySqlClient
Imports System.Data
Public Class frmMain
Dim strUser As String
Public Property _strUser() As String
Get
Return strUser
End Get
Set(ByVal value As String)
strUser = value
End Set
End Property
Public Sub LoadInfor()
Dim objConn As New MySqlConnection
Dim objCmd As New MySqlCommand
Dim dtAdapter As MySqlDataAdapter
Dim dt As New DataTable
Dim strConnString, strSQL As String
strConnString = "Server=localhost;User Id=root; Password=0000; Database=members; Pooling=false"
objConn.ConnectionString = strConnString
objConn.Open()
strSQL = "SELECT * FROM member WHERE Username = '" & strUser & "' "
dtAdapter = New MySqlDataAdapter(strSQL, objConn)
dtAdapter.Fill(dt)
If dt.Rows.Count > 0 Then
Me.lblUser.Text = strUser
Me.lblName.Text = dt.Rows(0)("Name")
Me.lblEmail.Text = dt.Rows(0)("Email")
Me.lblAge.Text = dt.Rows(0)("Age")
End If
objConn.Close()
objConn = Nothing
End Sub
Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
Dim frm As New frmLogin
frm.Show()
Me.Hide()
End Sub
End Class