【正文】
圖 41 數(shù)據(jù)庫設(shè)計(jì) 數(shù)據(jù)庫采用了 Microsoft 推出的 SQL Server 數(shù)據(jù)庫,使用 SQL Server 的好處還在于,如果 你的系統(tǒng)擴(kuò)展到 Client/Server 模式的時(shí)候,可以使用 Microsoft 的數(shù)據(jù)庫服務(wù)器軟件 SQL Server,此時(shí),程序只需要簡單的修改一下鏈接( ADO 的數(shù)據(jù)源)就可接受數(shù)據(jù) 處理中心 班級管理 檔案管理 交費(fèi)管理 課程管理 成績管理 打印報(bào)表 12 以,這樣,為程序的平滑擴(kuò)展提供了非常有力的條件。 amp。 amp。 Private Sub Command1_Click() If Trim(Text1(0).Text) = Then MsgBox 用戶名不能為空! , vbExclamation + vbOKOnly, 警告 Text1(0).SetFocus Exit Sub End If If Trim(Text1(1).Text) = Then MsgBox 密碼不能為空! , vbExclamation + vbOKOnly, 警告 Text1(1).SetFocus Exit Sub End If If Trim(Text1(2).Text) = Then MsgBox 確認(rèn)密碼不能為空! , vbExclamation + vbOKOnly, 警告 35 Text1(2).SetFocus Exit Sub End If If Trim(Text1(1).Text) Trim(Text1(2).Text) Then MsgBox 確認(rèn)密碼不正確! , vbExclamation + vbOKOnly, 警告 Text1(2).SetFocus Exit Sub End If Dim aa As Integer aa = 0 If Option1(2).Value = True Then For i = 0 To 3 If Check1(i).Value = 1 Then aa = 1 Exit For End If Next i If aa = 0 Then MsgBox 普通用戶至少要有一項(xiàng)權(quán)限! , vbExclamation + vbOKOnly, 警告 Exit Sub End If End If Dim mrc As txtsql = select * from use where username=39。 39。 42 繼續(xù)會(huì)導(dǎo)致該班級在成績和學(xué)費(fèi)記錄的數(shù)據(jù)丟失,繼續(xù)嗎? , vbOKCancel + vbExclamation, 警告 ) = vbOK Then txtsql = delete * from xj where 班級 =39。) Set mrc = ExecuteSQL(txtsql) 39。 Trim((, 2)) amp。Else 39。 or 班級 =39。雖然網(wǎng)絡(luò)在學(xué)生管理系統(tǒng)中的應(yīng)用不是很多,但是未來的發(fā)展方向,在本次開發(fā)過程由于硬件的限制,未能實(shí)現(xiàn)網(wǎng)絡(luò)功能,因此在以后的系統(tǒng)更新過程中可能會(huì)造成一些不必要的數(shù)據(jù)損失。 另外,我還要感謝在這幾年來對我有所教導(dǎo)的老師,他們孜孜不倦的教誨不但讓我學(xué)到了很多知識(shí),而且讓我掌握了學(xué)習(xí)的方法,更教會(huì)了我做人處事的道理,在此表示感謝。 在本次畢業(yè)設(shè)計(jì)中,我從指導(dǎo)老師 閻 老師,身上學(xué)到了很多東西。 order by 年級 ,班級 printstr = txtsql = 瀏覽班級 47 Exit Sub ss: End Sub 結(jié) 論 在本系統(tǒng)的開發(fā)過程中,由于本人是初次開發(fā)軟件,在知識(shí)、經(jīng)驗(yàn)方面都存在著不足。 1 Loop Set mrc = Nothing Set mrc1 = Nothing End Sub Private Sub TreeView1_DblClick() On Error GoTo ss If = 0 Then Exit Sub End If txtsql = () txtsql = select * from class where 年級 =39。 TreeView1_DblClick 39。 39。 Set mrc = ExecuteSQL(txtsql) txtsql = delete * from jf where 學(xué)號 in (select from xj where 班級 =39。 Trim((, 2)) amp。 Set mrc = ExecuteSQL(txtsql) If = False Then MsgBox 已存在該用戶! , vbExclamation + vbOKOnly, 警告 Text1(0).SetFocus Text1(0).SelStart = 0 36 Text1(0).SelLength = Len(Text1(0).Text) Exit Sub End If txtsql = select * from use Set mrc = ExecuteSQL(txtsql) (0) = Trim(Text1(0).Text) (1) = Trim(Text1(1).Text) For i = 0 To 2 If Option1(i).Value = True Then Select Case i Case 0 (admin) = y Case 1 (readonly) = y Case 2 For j = 0 To 3 If Check1(j).Value = 1 Then Select Case j Case 0 (qx1) = y Case 1 (qx2) = y Case 2 (qx3) = y Case 3 (qx4) = y End Select End If Next j 37 End Select End If Next i MsgBox 用戶添加成功! , vbExclamation + vbOKOnly, 警告 Text1(0).Text = Text1(1).Text = Text1(2).Text = End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Form_Load() Option1(2).Value = True End Sub Private Sub Form_Resize() Text1(0).SetFocus End Sub Private Sub Option1_Click(Index As Integer) If Index 2 Then For i = 0 To 3 Check1(i).Enabled = False 38 Next i Else For i = 0 To 3 Check1(i).Enabled = True Next i End If End Sub 5. 4學(xué)生繳費(fèi)管理模塊 因?yàn)楸鞠到y(tǒng)中有些功能模塊具有相似之處,因此在本文只用此模塊進(jìn)行一個(gè)簡單的說明。 24 Private Declare Function SetWindowPos Lib user32 (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Dim find1 As Integer Dim liulan1 As Integer Private Sub add_Click() qxstr = Executeqx(2) If qxstr = false Or qxstr = readonly Then ss = MsgBox(對不起,你沒有管理本功能的權(quán)限,請與管理員聯(lián)系! , vbInformation + vbOKOnly, 警告 ) Exit Sub End If 25 modi = False (0) End Sub Private Sub cjadd_Click() fenshumodi = False qxstr = Executeqx(4) If qxstr = false Or qxstr = readonly Then ss = MsgBox(對不起,你沒有管理本功能的權(quán)限,請與管理員聯(lián) 系! , vbInformation + vbOKOnly, 警告 ) Exit Sub End If 0 End Sub Private Sub cjbrowse_Click() qxstr = Executeqx(4) If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權(quán)限,請與管理員聯(lián)系! , vbInformation + vbOKOnly, 警告 ) Exit Sub End If 0 End Sub 26 Private Sub claasfind_Click() qxstr = Executeqx(2) If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權(quán)限,請與管理員聯(lián)系! , vbInformation + vbOKOnly, 警告 ) Exit Sub End If (0) i = SetWindowPos(, 1, 0, 0, 0, 0, 3) End Sub Private Sub classapp_Click() qxstr = Executeqx(2) If qxstr = false Or qxstr = readonly Then ss = MsgBox(對不起,你沒有管理本功能的權(quán)限,請與管理員聯(lián)系! , vbInformation + vbOKOnly, 警告 ) Exit Sub End If classmodi = False (0) End Sub Public Sub clabrowse() txtsql = select * from class (0) = 瀏覽班級設(shè)置 27 End Sub Private Sub classbrowse_Click() qxstr = Executeqx(2) If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權(quán)限,請與管理員聯(lián)系! , vbInformation + vbOKOnly, 警告 ) Exit Sub End If End Sub Private Sub classfind_Click() qxstr = Executeqx(2) If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權(quán)限,請與管理員聯(lián)系! , vbInformation + vbOKOnly, 警告 ) Exit Sub End If (0) End Sub Private Sub find_Click() End Sub 28 Private Sub classkecheng_Click() qxstr = Executeqx(4) If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權(quán)限,請與管理員聯(lián)系! , vbIn