📄 memberdata.vb
字号:
Option Strict On
Option Explicit On
Imports System
Imports System.Data
Imports System.Runtime.Serialization
Namespace Data
Public Class MemberData
Inherits DataSet
Public Const TABLE As String = "memberdata"
Public ReadOnly Property ItemArray() As Object()
Get
Return MyBase.Tables(0).Rows(0).ItemArray
End Get
End Property
Public Property Code() As String
Get
Return CType(item("s_code"), String)
End Get
Set(ByVal Value As String)
item("s_code") = Value
End Set
End Property
Public Property Name() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_name"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_name") = Value
End Set
End Property
Public Property IntroducerCode() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_introducer"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_introducer") = Value
End Set
End Property
Public Property Password() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_password"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_password") = Value
End Set
End Property
Public Property AddTime() As Date
Get
Return CType(MyBase.Tables(0).Rows(0).Item("t_add_time"), Date)
End Get
Set(ByVal Value As Date)
MyBase.Tables(0).Rows(0).Item("t_add_time") = Format(Value, "yyyy-MM-dd")
End Set
End Property
Public Property BankAccounts() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_bank_accounts"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_bank_accounts") = Value
End Set
End Property
Public Property Sex() As Boolean
Get
Return CType(MyBase.Tables(0).Rows(0).Item("n_sex"), Boolean)
End Get
Set(ByVal Value As Boolean)
MyBase.Tables(0).Rows(0).Item("n_sex") = Value
End Set
End Property
Public Property IDCard() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_idcard"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_idcard") = Value
End Set
End Property
Public Property Province() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_province"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_province") = Value
End Set
End Property
Public Property City() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_city"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_city") = Value
End Set
End Property
Public Property Town() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_town"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_town") = Value
End Set
End Property
Public Property Road() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_road"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_road") = Value
End Set
End Property
Public Property PostCode() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_postcode"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_postcode") = Value
End Set
End Property
Public Property Tel() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_tel"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_tel") = Value
End Set
End Property
Public Property ConsortName() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_consort_name"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_consort_name") = Value
End Set
End Property
Public Property ConsortSex() As Boolean
Get
Return CType(MyBase.Tables(0).Rows(0).Item("n_consort_sex"), Boolean)
End Get
Set(ByVal Value As Boolean)
Dim v As Integer
If Value Then
v = 1
Else
v = 0
End If
MyBase.Tables(0).Rows(0).Item("n_consort_sex") = v
End Set
End Property
Public Property ConsortIDCard() As String
Get
Return CType(MyBase.Tables(0).Rows(0).Item("s_consort_idcard"), String)
End Get
Set(ByVal Value As String)
MyBase.Tables(0).Rows(0).Item("s_consort_idcard") = Value
End Set
End Property
Public Property PeriodDate() As Date
Get
Try
Return CType(MyBase.Tables(0).Rows(0).Item("t_card_period"), Date)
Catch
Return DateAdd(DateInterval.Year, 1, Today())
End Try
End Get
Set(ByVal Value As Date)
MyBase.Tables(0).Rows(0).Item("t_card_period") = Format(Value, "yyyy-MM-dd")
End Set
End Property
Public Property Activity() As Boolean
Get
With MyBase.Tables(0).Rows(0)
If .IsNull("n_active") Then Return False
Return CType(.Item("n_active"), Boolean)
End With
End Get
Set(ByVal Value As Boolean)
If Value Then
MyBase.Tables(0).Rows(0).Item("n_active") = 1
Else
MyBase.Tables(0).Rows(0).Item("n_active") = 0
End If
End Set
End Property
Public Property ShopID() As Int32
Get
Return CType(item("n_shop"), Integer)
End Get
Set(ByVal Value As Int32)
item("n_shop") = Value
End Set
End Property
Public ReadOnly Property isNull(ByVal Name As String) As Boolean
Get
With MyBase.Tables(0).Rows(0)
Return .IsNull(Name)
End With
End Get
End Property
Public Property item(ByVal Name As String) As Object
Get
With MyBase.Tables(0).Rows(0)
If .IsNull(Name) Then Return DBNull.Value
Return .Item(Name)
End With
End Get
Set(ByVal Value As Object)
MyBase.Tables(0).Rows(0).Item(Name) = Value
End Set
End Property
Public Sub New()
MyBase.New()
MyBase.Tables.Add(TABLE)
End Sub
Public Overloads Function ReadXml(ByVal reader As System.IO.TextReader) As System.Data.XmlReadMode
MyBase.ReadXml(reader)
With MyBase.Tables(0).Rows
If .Count > 1 Then
.RemoveAt(0)
End If
End With
End Function
End Class
End Namespace
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -