毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

面向对象语言程序设计 第3页

更新时间:2014-9-11:  来源:毕业论文

面向对象语言程序设计 第3页             

4.3数据库连接方法
用ADODC部件使Microsoft Access 2003与Visual Basic 6.0(SP6)连接。
5软件详细开发
登录系统,主要编写管理员登录主界面的程序
 
Private Sub Command1_Click()
Dim a As String, b As String
a = Trim(Text1.Text)
b = Trim(Text2.Text)
   Adodc1.RecordSource = "select * from 管理员 where 管理员='" & a & "'"
      Adodc1.Refresh
       If Adodc1.Recordset.RecordCount = 0 Then
             MsgBox "该管理员不存在!", 48
            Text1.Text = ""
            Text1.SetFocus
            Else
           Adodc1.Recordset.Find "密码= '" & b & "'"
           If Adodc1.Recordset.EOF = True Then
              MsgBox "密码错误!", 48
                Text2.Text = ""
                Text2.SetFocus
            Else
                MsgBox "欢迎进入理工大学学籍管理系统!", 48
                学籍管理系统.Show
                Unload Me
           End If
        End If
End Sub
Private Sub Command2_Click()
  End
End Sub
增加学生界面,增加学生的主要信息和辅助信息
 
Private Sub Command1_Click()
Adodc1.Recordset.MoveLast
Adodc1.Recordset.AddNew
End Sub
Private Sub Command4_Click()
学籍管理系统.Show
  Unload Me
End Sub
删除学生界面,删除已经毕业或退学的学生的信息
 
Private Sub Command1_Click()
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
End Sub
Private Sub Command2_Click()
学籍管理系统.Show
  Unload Me
End Sub
修改学生信息界面,主要对学生的辅助信息进行修改,即对成绩的修改
 
Private Sub Command1_Click()
Adodc1.Recordset.Update
End Sub
Private Sub Command4_Click()
学籍管理系统.Show
  Unload Me
End Sub
按学生学号查询界面,在只知道学生学号的情况下,对学生的信息进行查询
 
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from 学生信息 where 学号='" & DataCombo1.Text & "'"
Adodc1.Refresh
End Sub
Private Sub Command2_Click()
学籍管理系统.Show
  Unload Me
End Sub
按学生姓名查询界面,在只知道学生姓名的情况下,对学生的信息进行查询

 
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from 学生信息 where 姓名='" & DataCombo1.Text & "'"
Adodc1.Refresh
End Sub
Private Sub Command2_Click()
学籍管理系统.Show
  Unload Me
End Sub
按学生家庭地址查询界面,在只知道学生家庭地址的情况下,对学生的信息进行查询
 
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from 学生信息 where 家庭地址='" & DataCombo1.Text & "'"
Adodc1.Refresh
End Sub
Private Sub Command2_Click()
学籍管理系统.Show
  Unload Me
End Sub
管理员设置界面,添加、修改、查询和删除管理员
 
Private Sub Command1_Click()
Adodc1.Recordset.MoveLast
Adodc1.Recordset.AddNew
End Sub
Private Sub Command2_Click()
s = Trim(InputBox("请输入要查找的管理员名称", "查找"))
bm = "管理员='" & s & "'"
Adodc1.Recordset.Find bm
If Adodc1.Recordset.EOF = True Then
MsgBox "找不到管理员名称为" & s & "的管理员!"
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.Update
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
End Sub
Private Sub Command5_Click()
学籍管理系统.Show
  Unload Me
End Sub

上一页  [1] [2] [3] [4] 下一页

面向对象语言程序设计 第3页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。