【正文】
[8] James D. Foxall .VISUAL BASIC 編程標準。機械工業(yè)出版社。2000,5:7879。[9] 李玉東,李罡,李雷,VISUAL BASIC . 電子工業(yè)出版社,2000。[10] 張學忠、王福成,Visual Basic 。1998,3:4548。[11] 王虹 等 《Visual basic 中文版高級應用與開發(fā)指南》, 人民郵電出版社, 2002。[12] 伍俊良 主編 等 《VB課程設計與系統(tǒng)開發(fā)案例》清華大學出版社, 2002。[13] 姚巍,《Visual Basic數據庫開發(fā)及工程實例》,人民郵電出版社。[14] 劉瑞新,汪遠征,《Visual Basic程序設計教程》,機械工業(yè)出版社,2001,129180。[15] 劉萌,周學明,郭安源,《Visual Basic企業(yè)辦公系統(tǒng)開發(fā)實例導航》,人民郵電出版社,2003,5:123128。[16] 孟小峰,王珊,《數據庫系統(tǒng)導論》,機械工業(yè)出版社,2000,6:105120。附錄 I 源代碼摘錄管理員登陸驗證:Public Class login Inherits Region Windows 窗體設計器生成的代碼 Public Sub New() () 39。該調用是Windows 窗體設計器所必需的。 InitializeComponent() 39。在InitializeComponent() 調用之后添加任何初始化 End Sub 39。窗體重寫dispose 以清理組件列表。 Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (ponents Is Nothing) Then () End If End If (disposing) End Sub 39。Windows 窗體設計器所必需的 Private ponents As 39。注意: 以下過程是Windows 窗體設計器所必需的 39。可以使用Windows 窗體設計器修改此過程。 39。不要使用代碼編輯器修改它。 Friend WithEvents Button1 As Friend WithEvents Label1 As Friend WithEvents Label2 As Friend WithEvents UserName As Friend WithEvents PassWord As Friend WithEvents Button2 As () Private Sub InitializeComponent() = New = New = New = New = New = New () 39。 39。Button1 39。 = = New (112, 112) = Button1 = New (40, 24) = 0 = 登陸 39。 39。Label1 39。 = = New (宋體, !, , , CType(134, Byte)) = New (48, 32) = Label1 = New (56, 24) = 2 = 用戶名: 39。 39。Label2 39。 = = New (宋體, !, , , CType(134, Byte)) = New (48, 80) = Label2 = New (56, 16) = 3 = 密 碼: 39。 39。UserName 39。 = New (104, 32) = UserName = New (120, 21) = 4 = admin 39。 39。PassWord 39。 = New (104, 72) = PassWord = (42) = New (120, 21) = 5 = 39。 39。Button2 39。 = = = New (184, 112) = Button2 = New (40, 24) = 6 = 關閉 39。 39。login 39。 = = New (6, 14) = = = New (322, 159) () () () () () () = = = False = login = 管理員登陸 (False) End SubEnd Region Private Sub Button1_Click(ByVal sender As , ByVal e As ) Handles Select Case Case (請?zhí)顚懹脩裘? () Return Case (請?zhí)顚懨艽a) () Return End Select Dim sqlstr As String, user As String, pass As String user = (39。, ‘) pass = (39。, ‘) Dim conn As = New (strConn) Try () Dim m As = New (select * from admin where username=39。 + user + 39。 and password=39。 + pass + 39。, conn) Dim dr As = () If () Then quanxian = (qx).ToString() userid = (id).ToString() () Else (帳號或密碼錯誤) = = () End If Catch ex As Exception () End Try End Sub Private Sub Form1_Load(ByVal sender As , ByVal e As ) Handles () End Sub Private Sub Button2_Click(ByVal sender As , ByVal e As ) Handles () End End SubEnd Class添加用戶信息代碼:Public Class jm_add Inherits Region Windows 窗體設計器生成的代碼 Public Sub New() () 39。該調用是Windows 窗體設計器所必需的。 InitializeComponent() 39。在InitializeComponent() 調用之后添加任何初始化 End Sub 39。窗體重寫dispose 以清理組件列表。 Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (ponents Is Nothing) Then () End If End If (disposing) End Sub 39。Windows 窗體設計器所必需的 Private ponents As 39。注意: 以下過程是Windows 窗體設計器所必需的 39??梢允褂肳indows 窗體設計器修改此過程。 39。不要使用代碼編輯器修改它。 Friend WithEvents Label1 As Friend WithEvents Label3 As Friend WithEvents Label4 As Friend WithEvents Label5 As Friend WithEvents Label6 As Friend WithEvents Label7 As Friend WithEvents Label11 As Friend WithEvents jm_no As Friend WithEvents jm_name As Friend WithEvents jm_sex As Friend WithEvents Button1 As Friend WithEvents Button2 As Friend WithEvents jm_sfz As Friend WithEvents jm_addr As Friend WithEvents jm_lxfs As () Private Sub InitializeComponent() = New = New = New = New = New = New = New = New = New = New = New = New = New = New = New () 39。 39。Label1 39。 = New (40, 16) = Label1 = New (72, 16) = 0 = 居民編號: 39。 39。Label3 39。 = New (34, 135) = Label3 = New (80, 16) = 2 = 身份證號碼: 39。 39。Label4 39。 = New (48, 98) = Label4 = New (72, 16) = 3 = 性 別: 39。