klharding
Member
I have created a class called clsLogIn
So from frmLogIn I am using this code...
Now I am on a different form, frmSchedule, and I want to get the ProviderNum property from clsLogin into a text box. How can I do this?
Thanks in advance for any help/advice!
Kristen
VB.NET:
Public Class clsLogin
Private _user_id As Long
Private _fullname As String
Private _user_name As String
Private _user_providernum As String
Private _dept_id As Long
Private _group_id As Long
Public Sub New(ByVal cUser_id As Long, ByVal cFullName As String, _
ByVal cUser_Name As String, ByVal cUser_ProviderNum As String, _
ByVal cDept_ID As Long, ByVal cGroup_ID As Long)
_user_id = cUser_id
_fullname = cFullName
_user_name = cUser_Name
_user_providernum = cUser_ProviderNum
_dept_id = cDept_ID
_group_id = cGroup_ID
End Sub
Public ReadOnly Property UserId() As Long
Get
Return _user_id
End Get
End Property
Public ReadOnly Property FullName() As String
Get
Return _fullname
End Get
End Property
Public ReadOnly Property UserName() As String
Get
Return _user_name
End Get
End Property
Public ReadOnly Property ProviderNum() As String
Get
Return _user_providernum
End Get
End Property
Public ReadOnly Property DeptID() As Long
Get
Return _dept_id
End Get
End Property
Public ReadOnly Property GroupID() As Long
Get
Return _group_id
End Get
End Property
End Class
So from frmLogIn I am using this code...
VB.NET:
Dim MyLogin As New clsLogin(results("user_id"), _
fullname, _
results("user_name"), _
results("user_providernum"), _
results("user_dept_id"), _
results("user_group_id"))
Thanks in advance for any help/advice!
Kristen