急求用SQL sever做一个简单 学生java简单图书管理系统统Q:1643192810

当前位置: >>
计算机毕业论文设计模板(学生信息管理系统VB+SQL sever)
贵州师范大学计算机网络技术毕业设计 计算机网络技术毕业设计 网络技术题目:学生信息管理系统系别:计算机工程系专业、 班级: 专业、 班级:2009 级计算机网络技术 2009 级计算机网络技术姓名:於博学号:指 导 教 师:邓老师完 成 时 间: 年 2 月 27-4 月 6 日 摘要人类有几千年的历史,计算机从产生到现在只不过 50 多年,而网络的迅速 发展也不过 10 年的时间。但是,计算机和网络对社会的影响已经迅速扩大,甚 至在改变人们的生活。特别是 90 年代以来,多媒体和网络技术的飞速发展正在以惊人的速度改变着人们的工作方式、交往方式和生活方式。正像著名的未来学家尼葛洛庞帝(1997)所说的: “数字不再只和计算有关,它决定我们的生存。 ”科学技术是第一生产力,是最先进的生产力。现在,已经没有人怀疑信息技术的发展将会引起人类社会全面和深刻的变革,使人类社会由工业社会迈向信息社会。目前,在社会各个方面都呈现出了与工业社会显著不同的特点。网上书店,网上医院,网上学校,网上购物,网上银行,政府上网等新事物如雨后春笋般涌现出来,对人们的传统生活方式、工作方式产生极大的冲击。使人们感受到技术发展的脉搏和信息时代前进的步伐。学生信息管理系统是典型的信息管理系统,经过分析,我们使用MICROSOFT 公司的 VISUAL BASIC 开发工具,利用其提供的各种面向对象的开发工具,尤其首先在短时间内建立系统应用原型,然后,对初始原型系统进行需求迭代,不断修正和改进,直到形成用户满意的可行系统。 ―目录― 目录―第一章 引言 ................................................................................................... 1 1.1 研究的目的及意义 .......................................................................................... 1 2.1 学生信息管理系统概述 ................................................................................. 2 2.2 系统开发工具与技术 ...................................................................................... 2 2.2.1 MICROSOFT VISUAL BASIC 6.0 中文版 ............................................ 2 2.2.2 SQL Server 2000 介绍 ...................................................................... 3 2.2.3 其它相关技术及知识 ......................................................................... 4 第三章 系统需求分析 .............................................................................................. 73.1 系统建设目标 .................................................................................................. 7 3.2 系统涉众角色划分 .......................................................................................... 7 3.3 系统功能需求分析 .......................................................................................... 7 第四章 系统的设计 .................................................................................................. 84.1 系统总体功能设计 .......................................................................................... 8 4.1.1 系统功能结构图 .................................................................................. 8 4.2 系统功能模块设计 .......................................................................................... 9 4.2.1 登录模块设计 ...................................................................................... 10 4.2.2 学生信息模块设计 ................................................................................ 3 4.2.2 管理员模块设计 .................................................................................... 4 4.2.2 管理员模块设计 .................................................................................. 12 4.3 数据库设计设计 ............................................................................................ 19 第五章 总结与展望 ................................................................................................... 21 致谢 ............................................................................................................................. 22 参考文献 ..................................................................................................................... 22 附录(源程序) 附录(源程序) ......................................................................................................... 23 第一章 引言1.1 研究的目的及意义由于现今的学生信息管理非常繁琐,行政人员付出大量的工作时间,得到的 效率很低。因此为提高工作效率,减轻校方人员的工作负担,决定开发学生信息 管理系统。 计算机已经成为我们学习和工作的得力助手:今天,计算机的价格已经十分 低廉,性能有了长足的进步。它已经被应用于许多领域,计算机之所以如此流行 的原因主要有以下几个方面: 首先,计算机可以代替人工进行许多繁杂的劳动; 其次,计算机可以节省许多资源; 第三,计算机可以大大的提高人们的工作效率; 第四,计算机可以使敏感文档更加安全等等。 为了解决传统学生信息的管理正面临着的这些问题, 我所设计的学生信息管 理系统也就应运而生了。1.2 课题研究的主要内容学生信息管理系统是一个信息管理平台,应该需求能够添加一个新学生信 息,之后还要添加这个学生的成绩等,学生有一个 ID,能用这个 ID 号登录上这 个平台,能查询自己的基本信息跟学习成绩等。老师也有基本信息,也有一个自 己的 ID,教师登录进管理系统时可以录入学生成绩信息等。老师能查询学生的 个人信息及学习成绩。一个信息管理系统应该要有管理员,拥有最高权限,能添 加、删除学生信息,老师信息等操作。 界面人性化,友好化,简单化,可上手性强。数据库要有可扩展性,不重复 性,通用性等特点。根据研究需求,得出一个学生信息管理系统所以应该有的功 能,我简单的把这些功能例出来,一个一个慢慢实现。1.3 论文的组织结构论文由六个部分结成,从第一章引言开始,讲述了论文的初期实现目标探究 及定向,研究了开题的意义跟研究的对象及内容;第二章是对系统开发的软件进 行选择、安装、介绍、调试等操作,先介绍开发的相关技术及工具,有 SQL Sever2000 的介绍,VB 的介绍。其它的技术等;第三章,我们提到了系统需求 分析,一个系统,是因为我们有需求,有需要才会去操作他,才会去开发他。有 相关的系统成员跟权限;根据需求我们开始设计系统,首先是总体功能设计,系 统功能设计,界面设计,相关的模块设计等,最后根据需要进行数据库设计;第 五章是对系统进行实现, 根据功能一步步的实现, 进行分析需求和各种权限设计, 代码修改等; 最后是对整个系统开发的总结和展望, 希望自己做的系统有所改进。 第二章 系统开发方法及相关技术2.1 学生信息管理系统概述高校学生信息的管理是一项既重要又繁琐的工作。为更好的做好这项工作, 提过工作效率, 更好的为学校的发展和一线教学服务, 决定: 结合我校实际情况, 自行研制一个学生信息管理系统。2.2 系统开发工具与技术该软件是在 Windows XP Professional + Visual Basic 6.0 + SQL Server 2000 的环境下完成的。本系统采用面向对象的软件开发办法,以 Microsoft 公司的可 视开发环境 Visual Basic6.0 作为主要开发工具,后台数据库是用 Microsoft 公司 的 SQL Sever 2000 作为后台数据库。下面就对这些开发工具进行介绍:2.2.1 MICROSOFT VISUAL BASIC 6.0 中文版Visual Basic 6.0 是一种可视化、面向对象和采用事件驱动方式的结构化高级 程序设计语言,可用于开发 Windows 环境下的各类应用程序。它简单易学、效 率高、且功能强大。在 Visual Basic 环境下,利用事件驱动的编程机制、新颖易 用的可视化设计工具,使用 Windows 内部的应用程序接口(API)函数,以及动 、动态数据交换(DDE) 、对象的链接与嵌入(OLE) 、开放式 态链接库(DLL) 数据连接(ODBC)等技术,可以高效、快速地开发出 Windows 环境功能强大、 图形界面丰富的应用软件系统。总的来看,Visual Basic 有以下主要特点: Visual Basic 语言用其设计应用程序时具有两个基本特点:可视化设计和事 件驱动编程。 Visual Basic 语言的出现为 Windows 下的编程提出了一个新概念,利用 Visual Basic 的动态数据交换、对象的链接和嵌入、动态链接库、ActiveX 技术 可以很方便地设计出功能强大的应用程序。 利用 Visual Basic 语言编程有以下几个特点: 1) 、可视化程序设计 在 Visual Basic 中开发的应用程序,不但有丰富的图形界面,同时由用户 为开发图形界面添加的代码真是少而又少, 因为在设计图形界面的过程中只需设 置 ActiveX 控件的属性即可。 2) 、强大的数据库和网络功能 随着 Visual Basic 语言的向前发展,它在数据库和网络方面的功能优势就 愈加明显,利用 Visual Basic 中的 ODBC――开放式的数据库访问技术可以很方 便地开发出自己的数据库应用程序;利用 Visual Basic 自带的可视化数据管理 器和报表生成器,完全可以在 Visual Basic 就完成数据库的开发工作。 3) 、其他特性 在 Visual Basic 以前的版本中,由于仍然摆脱不了解释执行的代码运行机 制,所以在相当的程度上制约了 Visual Basic 的发展。 从 Visual Basic5.0 版本开始,在 Visual Basic 中制作的应用程序都改变 为编译执行, 使得 Visual Basic 的代码效率有了很大的提高, 同时执行的速度 也 加快了解 30%(同 Visual Basic4.0 相比)。 当然在 Visual Basic 中还有其它特性,例如: 面向对象的编程语言; 结构化程序设计; 事件驱动的程序设计: 在传统的或“过程化”的应用程序中,应用程序自身控制了执行哪一部分代 码和按何种顺序执行代码。 从第一行代码执行程序并按应用程序中预定的路径执 行,必要时才会调用过程。 在事件驱动的应用程序中,代码不是按预定的路径执行,而是在响不同的事 件时执行不同的代码片段。事件可以由用户操作触发、也可以由来自操作系统或 其它应用程序的消息触发、甚至由应用程序本身的消息触发。这些事件的顺序, 决定了代码执行的顺序,因此应用程序每次运行时所经过的路径都是不同的。 支持动态链接库; 应用程序之间的资源共享; 事件驱动的程序设计; 在传统的或“过程化”的应用程序中,应用程序自身控制了执行哪一部分代 码和按何种顺序执行代码。 从第一行代码执行程序并按应用程序中预定的路径执 行,必要时才会调用过程。 在事件驱动的应用程序中,代码不是按预定的路径执行,而是在响不同的事 件时执行不同的代码片段。事件可以由用户操作触发、也可以由来自操作系统或 其它应用程序的消息触发、甚至由应用程序本身的消息触发。这些事件的顺序, 决定了代码执行的顺序,因此应用程序每次运行时所经过的路径都是不同的。 支持动态链接库; 应用程序之间的资源共享2.2.2 SQL Server 2000 介绍SQL Server 2000 是 Microsoft 公司推出的 SQL Server 数据库管理系统的一 个版本。该版本继承 了 SQL Server 7.0 版本的优点同时又比它增加了许多更先 进的功能,具有使用方便,可伸缩性好与相关软件集成程度高等优点,可跨越从 运行 Microsoft Windows 98 的膝上型电脑到运行 Microsoft Windows 2000 的大 型多处理器的服务器等多种平台使用。 概括起来,SQL Server 2000 数据库管理系统具有以下主要特点。 1) 、丰富的图形管理工具,使系统管理、操作更为直观方便。SQL Server 企业管理器是一个基于图形用户界面(GUI)的集成管理工具,利用它可以配置 管理 SQL Server 服务器、管理数据库和数据库对象、备份和恢复数据、调度任 务和管理警报、实现数据复制和转换操作等。此外,SQL Server 2000 还提供了 SQL 事件探查器、SQL 查询分析器、SQL Server 服务管理器和多种操作向导等图 形界面管理工具,大大简化了用户操作,从而增强了系统的易用性。 2) 、动态自动管理和优化功能。即使 SQL Server 数据库管理员不做任何设 置,SQL Server 也能够在运行过程中根据环境配置和用户访问情况动态自动配 置,以达到最优性能,从而减轻管理员工作。 3) 、充分的 Internet 技术支持。Internet 网络发展到今天已经成为一条重 要的信息发布渠道,SQL Server 增强了对 Internet 技术支持,它除保留了前期 版本中的数据库 Web 出版工具“Web 助手”外,还增强了对 XML 和 HTTP 技术的 支持,这使得电子商务系统能够通过 XML 等访问 SQL Server 数据库系统,也扩 展了 SQL Server 在数据挖掘和分析服务领域的应用。 4) 、丰富的编程接口工具,使用户开发 SQL Server 数据库应用程序更加灵 活。SQL Server 提供了 Transact-SQL、DB-Library for C、嵌入式 SQL(ESQL) 等开发工具,Transact-SQL 与工业标准 SQL 语言兼容,并在其基础上加以扩充, 使它更适合事务处理方面的需要。此外,SQL Server 2000 还支持 ODBC、OLE DB、 ADO 规范,可以使用 ODBC、OLE DB、ADO 接口访问 SQL Server 数据库。 5) 、具有很好的伸缩性和可靠性。SQL Server 2000 既能运行在 Windows 桌 面操作系统下,又可运行在服务器操作系统(包括 Windows NT 和 Windows 2000) 下;既能运行在单 CPU 计算机上,又能运行在对称多处理系统下。所以,它具有 很好的伸缩性, 能够满足从桌面应用到大型企业分布式应用到不同层次用户的要 求。 6) 、简单的管理方式。SQL Server 2000 与 Microsoft Windows 2000 有机 集成,所以可以使用 Windows 2000 的活动目录(Active Directory)功能对 SQL Server 进行集中管理,大大简化大型企业中的系统管理工作。此外,与 Windows 2000 的集成还使 SQL Server 能够充分利用操作系统所提供的服务和功能(如安 全管理、 事件日志、 性能监视器、 内存管理和异步 I/O 等) 从而增强了 SQL Server , 数据库系统的功能,并且只需要占用很少的系统资源。2.2.3 2.2.3 其它相关技术及知识VB 连接数据库过程:
数据库操作指令: Adodc1.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=denglu& Adodc1.CommandType = adCmdText Adodc2.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc2.CommandType = adCmdText Adodc3.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc3.CommandType = adCmdText Adodc4.Recordset.Update Adodc4.Recordset.Fields(&密码&).Value = Text3.Text Adodc4.Recordset.Update Adodc4.Refresh Adodc5.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=denglu& Adodc5.CommandType = adCmdText 查询如: Adodc3.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc3.CommandType = adCmdText Adodc3.RecordSource = &select * FROM & & Trim(Label17.Caption) + Trim(Label35.Caption) & & & Adodc3.Refresh 第三章3.1 系统建设目标系统需求分析学生信息管理系统应该具备这些特点: 要求有良好的人机交互界面; 由于该系统使用对象多,要求有较好的权限管理; 原始数据修改简单方便,支持多条件修改 方便的数据查询,支持多条件查询; 在相应的权限下,删除数据方便,数据稳定性好; 数据计算自动完成,尽量减少人工干预。 预期结果,用户使用帐号,能登录,查询自己信息,教师能添加成绩,管理 能删除信息等。面向用户的简单操作,外观简洁,美观等结果。希望能有一 个完美而又不失本质的学生信息管理系统, 但过程中还不知道有多少问会出 现,所以希望在过程中能顺利完成,如有问题也希望自我解决能力强,处理 能力强。3.2 系统涉众角色划分根据学生信息管理系统的分析,在此软件里面出现三个角色,一个是学生, 主角, 一个是教师, 一个是管理系统的人员。 所以这个系统使用人群就三种角色, 成员人数也就三类人。3.3 系统功能需求分析学生信息管理系统是一个信息管理平台,应该需求能够添加一个新学生信 息,之后还要添加这个学生的成绩等,学生有一个 ID,能用这个 ID 号登录上这 个平台,能查询自己的基本信息跟学习成绩等。老师也有基本信息,也有一个自 己的 ID,教师登录进管理系统时可以录入学生成绩信息等。老师能查询学生的 个人信息及学习成绩。一个信息管理系统应该要有管理员,拥有最高权限,能添 加、删除学生信息,老师信息等操作。 界面人性化,友好化,简单化,可上手性强。数据库要有可扩展性,不重复 性,通用性等特点。根据研究需求,得出一个学生信息管理系统所以应该有的功 能,我简单的把这些功能例出来,一个一个慢慢实现。 本系统主要包括注册管理、界面管理、学生信息查询、添加、修改、删除和 帮助等部分。其功能主要有: 学生信息的添加,包括输入学生基本信息和成绩 学生信息的查询,包括查询学生基本信息和成绩。 学生信息的修改,包括修改学生基本信息和成绩。 学生信息的删除,包括修改学生基本信息和成绩。 登录用户密码修改,用户登录到系统可进行相应的用户密码修改。 管理员用户对其它用户名的管理,包括添加新用户、修改用户密码、删 除用户名和查询用户和修改相关信息。 第四章4.1 系统总体功能设计学生信息管理系统总体功能图:系统的设计打开程序进入登录界面学生登录教师登录管理员登录成绩查询个人信息录入成绩成绩修改学生教师信息管理课程查询退出系统4.1.1 系统功能结构图学生个人信息简图 老师信息简图管理员信息简图4.2 系统功能模块设计在 VB 中添加一个工程,创建一些窗体,一个为登录窗体,一个是学生登录后 的窗体,一个是教师登录后的窗体,一个是管理员登录后的窗体。4.2.1 登录模块设计 登录模块设计登录界面实现代码: Private Sub Command1_Click() Dim num As Integer num = 0If ID.Text = && Then MsgBox &用户名不能空&, vbOKOnly + vbExclamation, &警告& Exit Sub End If If Combo1.Text = &管理员& Then Adodc1.RecordSource = &select * from Administrator where UserID='& & Trim(ID.Text) & &' and Password='& & Trim(password.Text) & &'& Adodc1.Refresh End If If Combo1.Text = &教师& Then Adodc1.RecordSource = &select * from 教 师 信 息 where 教 师 编 号 ='& & Trim(ID.Text) & &' and 密 码 ='& & Trim(password.Text) & &'& Adodc1.Refresh End If If Combo1.Text = &学生& Then Adodc1.RecordSource = &select * from 学 生 信 息 where 学 生 学 号 ='& & Trim(ID.Text) & &' and 密 码 ='& & Trim(password.Text) & &'& Adodc1.Refresh End If If Adodc1.Recordset.EOF Then MsgBox & 用 户 名 或 密 码 错 误 &, vbOKOnly + vbExclamation, &提示& ID.SetFocus ID.SelStart = 0 ID.SelLength = Len(ID.Text) Exit Sub End If If Combo1.Text = &教师& Then Form1.Show Unload Me End If If Combo1.Text = &学生& Then Form2.Show Unload Me End If If Combo1.Text = &管理员& Then Form3.Show Unload Me End If End SubPrivate Sub Form_Load() denglu.Top = (Screen.Height denglu.Height) / 2 denglu.Left = (Screen.Width denglu.Width) / 2 Adodc1.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=denglu& Adodc1.CommandType = adCmdText If Combo1.Text = &系统管理员& Then Adodc1.RecordSource = &select * from Administrator& Adodc1.Refresh End If If Combo1.Text = &教师& Then Adodc1.RecordSource = &select * from 教师信息& Adodc1.Refresh End If If Combo1.Text = &学生& Then Adodc1.RecordSource = &select * from 学生信息& Adodc1.Refresh End If End Sub Private Sub Label1_Click() Dim num As Integer num = 0 If ID.Text = && Then MsgBox &用户名不能空&, vbOKOnly + vbExclamation, &警告& Exit Sub End If If Combo1.Text = &系统管理员& Then Adodc1.RecordSource = &select * from Administrator where UserID='& & Trim(ID.Text) & &' and Password='& & Trim(password.Text) & &'& Adodc1.Refresh End If If Combo1.Text = &教师& Then Adodc1.RecordSource = &select * from 教 师 信 息 where 教 师 编 号 ='& & Trim(ID.Text) & &' and 密 码 ='& & Trim(password.Text) & &'& Adodc1.Refresh End If If Combo1.Text = &学生& Then Adodc1.RecordSource = &select * from 学 生 信 息 where 学 生 学 号 ='& & Trim(ID.Text) & &' and 密 码 ='& & Trim(password.Text) & &'& Adodc1.Refresh End If If Adodc1.Recordset.EOF Then MsgBox & 用 户 名 或 密 码 错 误 &, vbOKOnly + vbExclamation, &提示& ID.SetFocus ID.SelStart = 0 ID.SelLength = Len(ID.Text) Exit Sub End If If Combo1.Text = &教师& ThenForm1.Show Unload Me End If If Combo1.Text = &学生& Then Form2.Show Unload Me End If If Combo1.Text = &系统管理员& Then Form3.Show Unload Me End If End Sub Private Sub Label2_Click() Unload Me End Sub Private Sub Timer1_Timer() Label4.Caption = Trim(FormatDateTime(Now())) End Sub4.2.2 学生信息模块设计 学生信息模块设计学生进入界面 实现代码如下: Private Sub Dir1_Change() End Sub Private Sub Command1_Click() If Text1.Text && Adodc3.Recordset.Fields(&密码&) Then MsgBox &当前密码输入错误& Exit Sub End If If Text2.Text && Text3.Text Then MsgBox &新密码输入错误& Else Adodc3.Recordset.Update Adodc3.Recordset.Fields(&密 码 &).Value = Text3.Text Adodc3.Recordset.Update Adodc3.Refresh MsgBox &修改成功& End If End Sub Private Sub Command2_Click() End End Sub Private Sub Form_Load() Form2.Top = (Screen.Height Form2.Height) / 2Form2.Left = (Screen.Width Form2.Width) / 2 Picture2.Visible = False Picture1.Visible = False Picture4.Visible = False Label8.Caption = denglu.ID.Text Adodc1.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=denglu& Adodc1.CommandType = adCmdText Adodc1.RecordSource = &select * from 学 生 信 息 where 学 生 学 号 ='& & Trim(Label8.Caption) & &'& Adodc1.Refresh Label9.Caption = Adodc1.Recordset.Fields(&姓名&) Label10.Caption = Adodc1.Recordset.Fields(&性别&) Label11.Caption = Adodc1.Recordset.Fields(&出生日期&) Label12.Caption = Adodc1.Recordset.Fields(&入学时间&) Label13.Caption = Adodc1.Recordset.Fields(&学院&) Label14.Caption = Adodc1.Recordset.Fields(&班级&) Label31.Caption = Adodc1.Recordset.Fields(&姓名&) Label37.Caption = Adodc1.Recordset.Fields(&姓名&) End Sub Private Sub gb_Click() Unload Me End Sub Private Sub stuCJ_Click() Picture1.Visible = False Picture2.Visible = True Picture3.Visible = False Picture4.Visible = False Adodc2.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc2.CommandType = adCmdText Adodc2.RecordSource = &select * from & & Trim(Label14.Caption) & & where 学生学号='& & Trim(Label8.Caption) & &'& Adodc2.Refresh Label15.Caption = Adodc2.Recordset.Fields(1).Name Label16.Caption = Adodc2.Recordset.Fields(2).Name Label17.Caption = Adodc2.Recordset.Fields(3).Name Label18.Caption = Adodc2.Recordset.Fields(4).Name Label19.Caption = Adodc2.Recordset.Fields(1).Name Label20.Caption = Adodc2.Recordset.Fields(2).Name Label21.Caption = Adodc2.Recordset.Fields(3).Name Label22.Caption = Adodc2.Recordset.Fields(4).Name If Label19.Caption & 60 Then Label26.Caption = &不及格&End If If Label19.Caption &= 60 Label19.Caption & 70 Then Label26.Caption = &合格& End If If Label19.Caption &= 70 Label19.Caption & 80 Then Label26.Caption = &中等& End If If Label19.Caption &= 80 Label19.Caption & 90 Then Label26.Caption = &良好& End If If Label19.Caption &= 90 Label19.Caption &= 100 Then Label26.Caption = &优秀& End If If Label20.Caption & 60 Then Label27.Caption = &不及格& End If If Label20.Caption &= 60 Label20.Caption & 70 Then Label27.Caption = &合格& End If If Label20.Caption &= 70 Label20.Caption & 80 Then Label27.Caption = &中等& End If If Label20.Caption &= 80 Label20.Caption & 90 Then Label27.Caption = &良好& End If If Label20.Caption &= 90 Label20.Caption &= 100 Then Label27.Caption = &优秀& End If If Label21.Caption & 60 Then Label28.Caption = &不及格& End If If Label21.Caption &= 60 Label21.Caption & 70 Then Label28.Caption = &合格& End If If Label21.Caption &= 70AndAndAndAndAndAndAndAndAndAnd Label21.Caption & 80 Then Label28.Caption = &中等& End If If Label21.Caption &= 80 Label21.Caption & 90 Then Label28.Caption = &良好& End If If Label21.Caption &= 90 Label21.Caption &= 100 Then Label28.Caption = &优秀& End If If Label22.Caption & 60 Then Label29.Caption = &不及格& End If If Label22.Caption &= 60 Label22.Caption & 70 Then Label29.Caption = &合格& End If If Label22.Caption &= 70 Label22.Caption & 80 Then Label29.Caption = &中等& End If If Label22.Caption &= 80 Label22.Caption & 90 Then Label29.Caption = &良好& End If If Label22.Caption &= 90 Label22.Caption &= 100 Then Label29.Caption = &优秀& End If End Sub Private Sub stuXX_Click() Picture1.Visible = TrueAndAndAndAndAndAndPicture2.Visible = False Picture3.Visible = False Picture4.Visible = False End Sub Private Sub Timer1_Timer() Label30.Caption = Trim(FormatDateTime(Now())) Label32.Caption = Trim(FormatDateTime(Now())) Label33.Caption = Trim(FormatDateTime(Now())) Label23.Caption = Trim(FormatDateTime(Now())) End Sub Private Sub xgmm_Click() Adodc3.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=denglu& Adodc3.CommandType = adCmdText Adodc3.RecordSource = &select * from 学 生 信 息 where 学 生 学 号 ='& & Trim(Label8.Caption) & &'& Adodc3.Refresh Picture1.Visible = False Picture4.Visible = True Picture3.Visible = False Picture2.Visible = False End Sub Private Sub zx_Click() denglu.Show Unload Me End Sub4.2.2 管理员模块设计 管理员模块设计 实现代码如下: Private Sub Combo1_click() If Combo1.Text = &学生学号& Then Command5.Enabled = True Command6.Enabled = True Else Command5.Enabled = False Command6.Enabled = False End If End Sub Private Sub Combo2_Click() If Combo2.Text = &查询信息& Then Text2.Enabled = False Text3.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Combo3.Enabled = False Command3.Enabled = False Else Text2.Enabled = True Text3.Enabled = TrueText5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Combo3.Enabled = True Command3.Enabled = True End If End Sub Private Sub Combo4_click() If Combo4.Text = &查询成绩& Then Command7.Enabled = False Else Command7.Enabled = True End If End Sub Private Sub Combo5_click() If Combo5.Text = &学生学号& Then Command8.Enabled = True Command9.Enabled = True Else Command8.Enabled = False Command9.Enabled = False End If End Sub Private Sub Command1_Click() If Combo1.Text = && Then MsgBox &选择操作方式& Exit Sub Else If Combo2.Text = && Then MsgBox &选择查询方式& Exit Sub End If End If Adodc2.RecordSource = &select * from 学 生 信 息 where & & Trim(Combo1.Text) & & = '& & Trim(Text1.Text) & &'& Adodc2.Refresh If Adodc2.Recordset.RecordCount = 0 Then MsgBox &没有记录 & Else Text2.Text = Adodc2.Recordset.Fields(0) Text3.Text = Adodc2.Recordset.Fields(2) Combo3.Text = Adodc2.Recordset.Fields(3) Text5.Text = Adodc2.Recordset.Fields(4) Text6.Text = Adodc2.Recordset.Fields(5) Text7.Text = Adodc2.Recordset.Fields(6) Text8.Text = Adodc2.Recordset.Fields(7) End If If Text8.Text && Label17.Caption Then MsgBox &该学生非本班学生不能查询 & Text1.Text = && Text2.Text = && Combo3.Text = && Text3.Text = && Text5.Text = &&Text6.Text = && Text7.Text = && Text8.Text = && End If End Sub Private Sub Command10_Click() Text9.Text = && Text10.Text = && Text11.Text = && Text12.Text = && Text13.Text = && Text14.Text = && End Sub Private Sub Command11_Click() If Text15.Text && Adodc4.Recordset.Fields(&密码&) Then MsgBox &当前密码输入错误& Exit Sub End If If Text16.Text && Text17.Text Then MsgBox &新密码输入错误& Else Adodc4.Recordset.Update Adodc4.Recordset.Fields(&密 码 &).Value = Text3.Text Adodc4.Recordset.Update Adodc4.Refresh MsgBox &修改成功& End If End Sub Private Sub Command2_Click() If Combo4.Text = && Then MsgBox &选择操作方式& Else If Combo5.Text = && Then MsgBox &选择查询条件& Exit Sub End If End If Adodc3.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc3.CommandType = adCmdText Adodc3.RecordSource = &select * FROM & & Trim(Label17.Caption) + Trim(Label35.Caption) & & where & & Trim(Combo5.Text) & &='& & Trim(Text4.Text) & &' & Adodc3.Refresh If Adodc3.Recordset.RecordCount = 0 Then MsgBox &没有记录 & Else Text9.Text = Adodc3.Recordset.Fields(1) Text10.Text = Adodc3.Recordset.Fields(0) Text11.Text = Adodc3.Recordset.Fields(2) Text12.Text = Adodc3.Recordset.Fields(3) Text13.Text = Adodc3.Recordset.Fields(4) Text14.Text = Adodc3.Recordset.Fields(5) End If End Sub Private Sub Command3_Click() If Text1.Text = && Or Text2.Text = && Or Combo3.Text = && Or Text3.Text = && Or Text5.Text = && Or Text6.Text = && Or Text7.Text = && Or Text8.Text = && Then MsgBox &请输入完整信息!& Else With Adodc2.Recordset If .RecordCount = 0 Then MsgBox &没有记录 & Else Adodc2.Recordset.MoveLast Adodc2.Recordset.Update End If Adodc2.Recordset.Fields(& 学 生 学 号 &).Value = Text2.Text Adodc2.Recordset.Fields(&姓 名 &).Value = Text3.Text Adodc2.Recordset.Fields(&性 别 &).Value= Combo3.Text Adodc2.Recordset.Fields(& 出 生 日 期 &).Value = Text5.Text Adodc2.Recordset.Fields(& 入 学 时 间 &).Value = Text6.Text Adodc2.Recordset.Fields(&学 院 &).Value = Text7.Text Adodc2.Recordset.Fields(&班 级 &).Value = Text8.Text Adodc2.Recordset.Update End With Text1.Text = && Text2.Text = && Combo3.Text = && Text3.Text = && Text5.Text = && Text6.Text = && Text7.Text = && Text8.Text = && 'Text2.SetFocus Adodc2.Refresh End If End Sub Private Sub Command4_Click() Text1.Text = && Text2.Text = && Combo3.Text = && Text3.Text = && Text5.Text = && Text6.Text = && Text7.Text = && Text8.Text = && End Sub Private Sub Command5_Click() If Text1.Text = && Then MsgBox &查询条件为空& Else Text1.Text = Text1.Text - 1 Adodc2.RecordSource = &select * from 学生信息 where & & Combo1.Text & &='& & Text1.Text & &'& Adodc2.Refresh If Adodc2.Recordset.RecordCount = 0 Then MsgBox &没有记录 & Text1.Text = Text1.Text + 1 Else Text2.Text = Adodc2.Recordset.Fields(0) Text3.Text = Adodc2.Recordset.Fields(2) Combo3.Text = Adodc2.Recordset.Fields(3) Text5.Text = Adodc2.Recordset.Fields(4) Text6.Text = Adodc2.Recordset.Fields(5) Text7.Text = Adodc2.Recordset.Fields(6) Text8.Text = Adodc2.Recordset.Fields(7) End If End If End Sub Private Sub Command6_Click() If Text1.Text = && Then MsgBox &查询条件为空& Else Text1.Text = Text1.Text + 1 Adodc2.RecordSource = &select * from 学生信息 where & & Combo1.Text & &='& & Text1.Text & &'& Adodc2.Refresh If Adodc2.Recordset.RecordCount = 0 Then MsgBox &没有记录 & Text1.Text = Text1.Text - 1 Else Text2.Text = Adodc2.Recordset.Fields(0) Text3.Text = Adodc2.Recordset.Fields(2) Combo3.Text = Adodc2.Recordset.Fields(3) Text5.Text = Adodc2.Recordset.Fields(4) Text6.Text = Adodc2.Recordset.Fields(5)Text7.Text = Adodc2.Recordset.Fields(6) Text8.Text = Adodc2.Recordset.Fields(7) End If End If End Sub Private Sub Command7_Click() If Text11.Text = && Or Text12.Text = && Or Text13.Text = && Or Text14.Text = && Then MsgBox &请输入完整信息!& Else With Adodc3.Recordset If Adodc3.Recordset.RecordCount = 0 Then MsgBox &没有记录 & Else Adodc3.Recordset.Update End If Adodc3.Recordset.Fields(2).Value = Text11.Text Adodc3.Recordset.Fields(3).Value = Text12.Text Adodc3.Recordset.Fields(4).Value = Text13.Text Adodc3.Recordset.Fields(5).Value = Text14.Text Adodc3.Recordset.Update End With Text9.Text = Adodc3.Recordset.Fields(1) Text10.Text = Adodc3.Recordset.Fields(0) Text11.Text = Adodc3.Recordset.Fields(2) Text12.Text = Adodc3.Recordset.Fields(3) Text13.Text = Adodc3.Recordset.Fields(4) Text14.Text = Adodc3.Recordset.Fields(5) 'Text2.SetFocus Adodc3.Refresh End If End Sub Private Sub Command8_Click() If Text4.Text = && Then MsgBox &查询条件为空& Else Text4.Text = Text4.Text - 1 Adodc3.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc3.CommandType = adCmdText Adodc3.RecordSource = &select * FROM & & Trim(Label17.Caption) + Trim(Label35.Caption) & & where & & Trim(Combo5.Text) & &='& & Trim(Text4.Text) & &' & Adodc3.Refresh If Adodc3.Recordset.RecordCount = 0 Then MsgBox &没有记录 & Text4.Text = Text4.Text + 1 Else Text9.Text = Adodc3.Recordset.Fields(1) Text10.Text = Adodc3.Recordset.Fields(0) Text11.Text = Adodc3.Recordset.Fields(2) Text12.Text = Adodc3.Recordset.Fields(3) Text13.Text = Adodc3.Recordset.Fields(4) Text14.Text = Adodc3.Recordset.Fields(5) End If End If End Sub Private Sub Command9_Click() If Text4.Text = && Then MsgBox &查询条件为空& Else Text4.Text = Text4.Text + 1Adodc3.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc3.CommandType = adCmdText Adodc3.RecordSource = &select * FROM & & Trim(Label17.Caption) + Trim(Label35.Caption) & & where & & Trim(Combo5.Text) & &='& & Trim(Text4.Text) & &' & Adodc3.Refresh If Adodc3.Recordset.RecordCount = 0 Then MsgBox &没有记录 & Text4.Text = Text4.Text - 1 Else Text9.Text = Adodc3.Recordset.Fields(1) Text10.Text = Adodc3.Recordset.Fields(0) Text11.Text = Adodc3.Recordset.Fields(2) Text12.Text = Adodc3.Recordset.Fields(3) Text13.Text = Adodc3.Recordset.Fields(4) Text14.Text = Adodc3.Recordset.Fields(5) End If End If End Sub Private Sub Form_Load() Text2.Enabled = False Text3.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Combo3.Enabled = False Command3.Enabled = False Form1.Top = (Screen.Height Form1.Height) / 2 Form1.Left = (Screen.Width - Form1.Width) / 2 Picture2.Visible = False Picture1.Visible = False Picture3.Visible = False Picture4.Visible = True Picture5.Visible = False Picture6.Visible = False Picture7.Visible = False Label10.Caption = denglu.ID.Text Adodc1.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc1.CommandType = adCmdText Adodc1.RecordSource = &select * from 教 师 信 息 where 教 师 编 号 ='& & Trim(Label10.Caption) & &'& Adodc1.Refresh Label11.Caption = Adodc1.Recordset.Fields(2) Label12.Caption = Adodc1.Recordset.Fields(3) Label13.Caption = Adodc1.Recordset.Fields(4) Label14.Caption = Adodc1.Recordset.Fields(5) Label15.Caption = Adodc1.Recordset.Fields(6) Label16.Caption = Adodc1.Recordset.Fields(7) Label17.Caption = Adodc1.Recordset.Fields(8) Label18.Caption = Adodc1.Recordset.Fields(9) Label32.Caption = Adodc1.Recordset.Fields(&姓名&) Adodc2.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc2.CommandType = adCmdText Adodc2.RecordSource = &select * from学 生 信 息 where 班 级 ='& Trim(Label17.Caption) & &'& Adodc2.Refresh End Sub Private Sub gb_Click() End End Sub Private Sub Label28_Click() End Sub Private Sub Tbanji_Click() Picture1.Visible = False Picture2.Visible = True Picture3.Visible = False Picture4.Visible = False Picture5.Visible = False Picture6.Visible = False Picture7.Visible = False End Sub Private Sub TeacherGR_Click() Picture2.Visible = False Picture1.Visible = True Picture3.Visible = False Picture4.Visible = False Picture5.Visible = False Picture6.Visible = False Picture7.Visible = False End Sub Private Sub Timer1_Timer() Label31.Caption Trim(FormatDateTime(Now())) Label19.Caption Trim(FormatDateTime(Now())) Label20.Caption Trim(FormatDateTime(Now())) Label21.Caption Trim(FormatDateTime(Now())) Label22.Caption Trim(FormatDateTime(Now())) Label23.Caption Trim(FormatDateTime(Now())) Label24.Caption Trim(FormatDateTime(Now())) Label25.Caption Trim(FormatDateTime(Now()))&= = = = = = = = End Sub Private Sub xgmm_Click() Adodc4.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=denglu& Adodc4.CommandType = adCmdText Adodc4.RecordSource = &select * from 教 师 信 息 where 教 师 编 号 ='& & Trim(Label10.Caption) & &'& Adodc4.Refresh Picture2.Visible = False Picture7.Visible = True Picture3.Visible = False Picture4.Visible = False Picture5.Visible = False Picture6.Visible = False Picture1.Visible = False End Sub Private Sub xiugai_Click() Picture5.Visible = False Picture3.Visible = True Picture2.Visible = False Picture1.Visible = False Picture4.Visible = False Command5.Enabled = False Command6.Enabled = False Picture7.Visible = False End Sub Private Sub xiugaicj_Click() Picture5.Visible = False Picture6.Visible = True Picture2.Visible = False Picture1.Visible = False Picture4.Visible = False Command5.Enabled = False Command3.Enabled = False Command7.Enabled = False Command8.Enabled = False Command9.Enabled = False Picture7.Visible = False Adodc3.ConnectionString = &Provider=MSDASQL.1;PersistSecurity Info=FData Source=Initial Catalog=StudentManage& Adodc3.CommandType = adCmdText Adodc3.RecordSource = &select * FROM & & Trim(Label17.Caption) + Trim(Label35.Caption) & & & Adodc3.Refresh Label40.Caption = Adodc3.Recordset.Fields(2).Name Label41.Caption = Adodc3.Recordset.Fields(3).Name Label42.Caption = Adodc3.Recordset.Fields(4).Name Label43.Caption = Adodc3.Recordset.Fields(5).Name End Sub Private Sub xuescji_Click() Adodc3.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc3.CommandType = adCmdText Adodc3.RecordSource = &select * FROM & & Trim(Label17.Caption) + Trim(Label35.Caption) & & & Adodc3.Refresh Picture2.Visible = False Picture5.Visible = True Picture3.Visible = False Picture4.Visible = False Picture1.Visible = False Picture6.Visible = False Picture7.Visible = False End Sub Private Sub zx_Click() denglu.Show Unload Me End Sub 4.2.2 管理员模块设计 管理员模块设计管理员欢迎界面实现代码: Private Sub bjckxx_Click() Picture11.Visible = True Picture2.Visible = False Picture6.Visible = False Picture4.Visible = False Picture5.Visible = False Picture3.Visible = False Picture7.Visible = False Picture8.Visible = False Command6.Enabled = False Command7.Enabled = False Picture9.Visible = False Picture10.Visible = False End Sub Private Sub ckjsxx_Click() Picture2.Visible = False Picture3.Visible = False Picture4.Visible = False Picture5.Visible = False Picture6.Visible = FalsePicture7.Visible = True Picture8.Visible = False Picture9.Visible = False Picture10.Visible = False Picture11.Visible = False End Sub Private Sub ckkcxx_Click() Picture10.Visible = True Picture2.Visible = False Picture6.Visible = False Picture4.Visible = False Picture8.Visible = False Picture3.Visible = False Picture7.Visible = False Picture5.Visible = False Picture9.Visible = False Picture11.Visible = False End Sub Private Sub ckxsxx_Click() Picture2.Visible = False Picture6.Visible = False Picture4.Visible = False Picture8.Visible = False Picture3.Visible = False Picture7.Visible = False Picture5.Visible = True Picture9.Visible = False Picture10.Visible = False Picture11.Visible = False End Sub Private Sub Combo1_click() If Combo1.Text = &修改& Then Command2.Enabled = True Command3.Enabled = False Else Command3.Enabled = True Command2.Enabled = False End If End Sub Private Sub Combo4_click() If Combo4.Text = &修改& Then Command7.Enabled = True Command6.Enabled = False Else Command6.Enabled = True Command7.Enabled = False End If End Sub Private Sub Combo7_click() If Combo7.Text = &增加课程& Then Label15.Visible = False Text24.Enabled = False Command17.Enabled = False txthao.Enabled = True txtming.Enabled = True Else txthao.Enabled = False txtming.Enabled = False Label15.Visible = True Text24.Enabled = True Command17.Enabled = True End If End Sub Private Sub Command1_Click()If Combo1.Text = && Then MsgBox &选择操作方式& Else If Combo2.Text = && Then MsgBox &选择查询条件& Exit Sub End If End If Adodc5.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=Initial Catalog=StudentManage& Adodc5.CommandType = adCmdText Adodc5.RecordSource = &select * FROM 学 生 信 息 where & & Trim(Combo2.Text) & &='& & Trim(Text1.Text) & &' & Adodc5.Refresh If Adodc5.Recordset.RecordCount = 0 Then MsgBox &没有记录 & Else Text2.Text = Adodc5.Recordset.Fields(0) Text3.Text = Adodc5.Recordset.Fields(2) Text4.Text = Adodc5.Recordset.Fields(4) Text5.Text = Adodc5.Recordset.Fields(5) Text6.Text = Adodc5.Recordset.Fields(6) Text7.Text = Adodc5.Recordset.Fields(7) Combo3.Text = Adodc5.Recordset.Fields(3) Command10.Enabled = True End If End Sub Private Sub Command10_Click() Adodc5.Recordset.Delete Adodc5.Refresh MsgBox &删除成功& Text2.Text = && Text3.Text = && Text4.Text = && Text5.Text = && Text6.Text = && Text7.Text = && Combo3.Text = && Text2.SetFocus Adodc5.Refresh End Sub Private Sub Command11_Click() Adodc4.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=denglu& Adodc4.CommandType = adCmdText Adodc4.RecordSource = &select * FROM 学 生 信 息 where 班 级 ='& & Trim(Text16.Text) & &' & Adodc4.Refresh End Sub Private Sub Command12_Click() If Text17.Text = && Then MsgBox &用户名不能空&, vbOKOnly + vbExclamation, &警告& End If Adodc7.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=chengji& Adodc7.CommandType = adCmdText Adodc7.RecordSource = &select * FROM & & Trim(Text17.Text) + Trim(Label41.Caption) & && Adodc7.Refresh End Sub Private Sub Command13_Click() Adodc8.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=chengji& Adodc8.CommandType = adCmdText Adodc8.RecordSource = &select * FROM & & Trim(Text17.Text) & &where 学 生 学 号 ='& & Trim(Text18.Text) & &'& Adodc8.Refresh Text20.Text = Adodc8.Recordset.Fields(1) Text21.Text = Adodc8.Recordset.Fields(2) Text22.Text = Adodc8.Recordset.Fields(3) Text23.Text = Adodc8.Recordset.Fields(4) Label37.Caption = Adodc8.Recordset.Fields(1).Name Label38.Caption = Adodc8.Recordset.Fields(2).Name Label39.Caption = Adodc8.Recordset.Fields(3).Name Label40.Caption = Adodc8.Recordset.Fields(4).Name Adodc9.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=chengji& Adodc9.CommandType = adCmdText Adodc9.RecordSource = &select * FROM 学生信息 where 学生学号='& & Trim(Text18.Text) & &'& Adodc9.Refresh Text19.Text = Adodc9.Recordset.Fields(&姓名&) End Sub Private Sub Command14_Click() Adodc8.Recordset.Update Adodc8.Recordset.Fields(1).Value = Text20.Text Adodc8.Recordset.Fields(2).Value = Text21.Text Adodc8.Recordset.Fields(3).Value = Text22.Text Adodc8.Recordset.Fields(4).Value = Text23.Text Adodc8.Recordset.Update Adodc8.Refresh MsgBox &修改成功& End Sub Private Sub Command16_Click() rtxbz.Text = && Text24.Text = && txthao.Text = && txtming.Text = && txtshi.Text = && If Trim(Combo7.Text) = &修 改 课 程 & Then Adodc11.RecordSource = &select * from 课 程 表 where 课 程 号 ='& & Trim(txthao.Text) & &' and 课程名 ='& & Trim(txtming.Text) & &'& Adodc11.Refresh If Adodc1.Recordset.EOF Then MsgBox &没有该课程信息或课程号与 课程名不匹配& Else Adodc11.Recordset.Update Adodc11.Recordset.Fields(& 课 时 &).Value = txtshi.Text Adodc11.Recordset.Fields(& 备 注 &).Value = rtxbz.Text Adodc11.Recordset.Update MsgBox &修改成功& End If End If If (Combo7.Text) = &删除课程& Then Adodc11.RecordSource = &select * from 课 程 表 where 课 程 号 ='& & Trim(txthao.Text) & &' and 课程名 ='& & Trim(txtming.Text) & &'& Adodc11.Refresh If Adodc1.Recordset.EOF Then MsgBox &没有该课程信息或课程号与 课程名不匹配& Else Adodc11.Recordset.Delete MsgBox &删除成功& End If End If If (Combo7.Text) = Trim(&增加课程&) Then Adodc11.ConnectionString =&Provider=MSDASQL.1;Persist Security Info=FData Source=chengji& Adodc11.CommandType = adCmdText Adodc11.RecordSource = &select * from 课程表 & Adodc11.Refresh Adodc11.Recordset.MoveNext Adodc11.Recordset.AddNew Adodc11.Recordset.Fields(& 课 程 号 &).Value = txthao.Text Adodc11.Recordset.Fields(& 课 程 名 &).Value = txtming.Text Adodc11.Recordset.Fields(& 课 时 &).Value = txtshi.Text Adodc11.Recordset.Fields(& 备 注 &).Value = rtxbz.Text Adodc11.Recordset.Update Adodc11.Refresh MsgBox &添加成功& End If End Sub Private Sub Command17_Click() If Text24.Text = && Then MsgBox & 请 输 入 课 程 号 检 索 &, vbOKOnly + vbExclamation, &警告& Else 'If (Combo7.Text) = & 删 除 课 程 & Or Combo7.Text = &修改课程& Then Adodc11.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=chengji& Adodc11.CommandType = adCmdText Adodc11.RecordSource = &select * from 课 程 表 where 课 程 号 ='& & Trim(Text24.Text) & &'& Adodc11.Refresh txthao.Text = Adodc11.Recordset.Fields(0) txtming.Text = Adodc11.Recordset.Fields(1) txtshi.Text = Adodc11.Recordset.Fields(2) rtxbz.Text Adodc11.Recordset.Fields(3) End If End Sub Private Sub Command18_Click() rtxbz.Text = && Text24.Text = && txthao.Text = && txtming.Text = && txtshi.Text = && End Sub Private Sub Command2_Click() Adodc5.Recordset.Update Adodc5.Recordset.Fields(0).Value Text2.Text Adodc5.Recordset.Fields(2).Value Text3.Text Adodc5.Recordset.Fields(4).Value Text4.Text Adodc5.Recordset.Fields(5).Value Text5.Text Adodc5.Recordset.Fields(6).Value Text6.Text Adodc5.Recordset.Fields(7).Value Text7.Text Adodc5.Recordset.Fields(3).Value Combo3.Text Adodc5.Recordset.Update Adodc5.Refresh MsgBox &修改成功& End Sub Private Sub Command3_Click() Adodc5.Recordset.AddNew Adodc5.Recordset.Fields(0).Value Text2.Text Adodc5.Recordset.Fields(2).Value Text3.Text Adodc5.Recordset.Fields(4).Value Text4.Text Adodc5.Recordset.Fields(5).Value Text5.Text Adodc5.Recordset.Fields(6).Value Text6.Text Adodc5.Recordset.Fields(7).Value== = = = = = == = = = = =Text7.Text Adodc5.Recordset.Fields(3).Value = Combo3.Text Adodc5.Recordset.AddNew Text2.Text = && Text3.Text = && Text4.Text = && Text5.Text = && Text6.Text = && Text7.Text = && Combo3.Text = && Text2.SetFocus Adodc5.Refresh MsgBox &添加成功& End Sub Private Sub Command4_Click() Text2.Text = && Text3.Text = && Text4.Text = && Text5.Text = && Text6.Text = && Text7.Text = && End Sub Private Sub Command5_Click() If Combo4.Text = && Then MsgBox &选择操作方式& Else If Combo5.Text = && Then MsgBox &选择查询条件& Exit Sub End If End If Adodc6.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=denglu& Adodc6.CommandType = adCmdText Adodc6.RecordSource = &select * FROM 教 师 信 息 where & & Trim(Combo5.Text) & &='& & Trim(Text15.Text) & &' & Adodc6.Refresh If Adodc6.Recordset.RecordCount = 0 Then MsgBox &没有记录 & Else Text8.Text Adodc6.Recordset.Fields(0) Text9.Text Adodc6.Recordset.Fields(2) Text10.Text Adodc6.Recordset.Fields(4) Text11.Text Adodc6.Recordset.Fields(5) Text12.Text Adodc6.Recordset.Fields(6) Text13.Text Adodc6.Recordset.Fields(7) Text14.Text Adodc6.Recordset.Fields(8) RichTextBox1.Text Adodc6.Recordset.Fields(9) Combo6.Text Adodc6.Recordset.Fields(3) Command9.Enabled = True End If End Sub Private Sub Command6_Click() Adodc6.Recordset.AddNew Adodc6.Recordset.Fields(0).Value Text8.Text Adodc6.Recordset.Fields(2).Value Text9.Text Adodc6.Recordset.Fields(4).Value Text10.Text Adodc6.Recordset.Fields(5).Value Text11.Text Adodc6.Recordset.Fields(6).Value Text12.Text Adodc6.Recordset.Fields(7).Value Text13.Text Adodc6.Recordset.Fields(8).Value Text14.Text Adodc6.Recordset.Fields(9).Value RichTextBox1.Text Adodc6.Recordset.Fields(3).Value Combo6.Text Adodc6.Recordset.AddNew= = = = = = = = == = = = = = = = =Text9.Text = && Text10.Text = && Text11.Text = && Text12.Text = && Text13.Text = && Text14.Text = && Combo6.Text = && RichTextBox1.Text = && Text8.SetFocus Adodc6.Refresh MsgBox &添加成功& End Sub Private Sub Command7_Click() Adodc6.Recordset.Update Adodc6.Recordset.Fields(0).Value Text8.Text Adodc6.Recordset.Fields(2).Value Text9.Text Adodc6.Recordset.Fields(4).Value Text10.Text Adodc6.Recordset.Fields(5).Value Text11.Text Adodc6.Recordset.Fields(6).Value Text12.Text Adodc6.Recordset.Fields(7).Value Text13.Text Adodc6.Recordset.Fields(8).Value Text14.Text Adodc6.Recordset.Fields(9).Value RichTextBox1.Text Adodc6.Recordset.Fields(3).Value Combo6.Text Adodc6.Recordset.Update Adodc6.Refresh MsgBox &修改成功& End Sub Private Sub Command9_Click() Adodc6.Recordset.Delete Adodc6.Refresh MsgBox &删除成功& Text9.Text = && Text10.Text = && Text11.Text = && Text12.Text = &&= = = = = = = = = Text13.Text = && Text14.Text = && Combo6.Text = && RichTextBox1.Text = && Text8.SetFocus Adodc6.Refresh End Sub Private Sub Form_Load() If Combo7.Text = &增加课程& Then Command7.Enabled = False Else Command7.Enabled = True End If Form3.Top = (Screen.Height Form3.Height) / 2 Form3.Left = (Screen.Width Form3.Width) / 2 Picture2.Visible = False Picture3.Visible = False Picture4.Visible = False Picture5.Visible = False Picture6.Visible = False Picture7.Visible = False Picture8.Visible = False Picture9.Visible = False Picture10.Visible = False Picture11.Visible = False Adodc5.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=denglu& Adodc5.CommandType = adCmdText Adodc5.RecordSource = &select * from 学生信息& Adodc5.Refresh End Sub Private Sub gly_Click() Picture2.Visible = True Picture6.Visible = False Picture4.Visible = False Picture5.Visible = False Picture3.Visible = False Picture7.Visible = False Picture8.Visible = FalsePicture9.Visible = False Picture10.Visible = False Picture11.Visible = False End Sub Private Sub js_Click() Picture2.Visible = False Picture6.Visible = False Picture4.Visible = False Picture5.Visible = False Picture8.Visible = False Picture7.Visible = False Picture3.Visible = True Picture9.Visible = False Picture10.Visible = False Picture11.Visible = False End Sub Private Sub tc_Click() End End Sub Private Sub Timer1_Timer() Label1.Caption Trim(FormatDateTime(Now())) Label2.Caption Trim(FormatDateTime(Now())) Label3.Caption Trim(FormatDateTime(Now())) Label4.Caption Trim(FormatDateTime(Now())) Label5.Caption Trim(FormatDateTime(Now())) Label6.Caption Trim(FormatDateTime(Now())) Label7.Caption Trim(FormatDateTime(Now())) Label8.Caption Trim(FormatDateTime(Now())) Label19.Caption Trim(FormatDateTime(Now())) Label20.Caption Trim(FormatDateTime(Now())) Label9.Caption Trim(FormatDateTime(Now())) Label10.Caption Trim(FormatDateTime(Now()))= = = = = = = = = = = = Label16.Caption = Trim(FormatDateTime(Now())) End Sub Private Sub xgjsxx_Click() Picture2.Visible = False Picture6.Visible = False Picture4.Visible = False Picture5.Visible = False Picture3.Visible = False Picture7.Visible = False Picture8.Visible = True Command6.Enabled = False Command7.Enabled = False Picture9.Visible = False Picture10.Visible = False Picture11.Visible = False End Sub Private Sub xgxsxx_Click() Adodc5.ConnectionString = &Provider=MSDASQL.1;Persist Security Info=FData Source=denglu& Adodc5.CommandType = adCmdText Adodc5.RecordSource = &select * from 学生信息& Adodc5.Refresh Picture2.Visible = False Picture6.Visible = True Picture4.Visible = False Picture5.Visible = False Picture3.Visible = False Picture7.Visible = False Picture8.Visible = False Command2.Enabled = FalsePicture11.Visible = False Command3.Enabled = False Picture9.Visible = False Picture10.Visible = False End Sub Private Sub xscjgl_Click() Picture2.Visible = False Picture6.Visible = False Picture8.Visible = False Picture5.Visible = False Picture3.Visible = False Picture7.Visible = False Picture9.Visible = True Picture4.Visible = False Picture10.Visible = False Picture11.Visible = False End Sub Private Sub xx_Click() Picture2.Visible = False Picture6.Visible = False Picture8.Visible = False Picture5.Visible = False Picture3.Visible = False Picture7.Visible = False Picture4.Visible = True Picture9.Visible = False Picture10.Visible = False Picture11.Visible = False End Sub Private Sub zx_Click() denglu.Show Unload Me End Sub4.3 数据库设计设计
第五章 总结与展望在毕业设计中, 我们遇到的困难很多, 在解决它们的同时我又学到了很多, 受益匪浅, 特别是如何分析、建立、开发一个系统。 在一个系统开发的过程中编码不是重要的,重要的是分析系统、建立起系统模型。在 分析一个系统前,分析人员必须要对将要开发的系统所涉及到的各方面知识有一个认识, 然后将系统的模型建立起来。而且一个成功的软件要符合用户的需要,要以用户为中心, 开发出用户想要的软件,而不能自以为是、想当然的做。 在程序编写中,我认识到软件要有简便的界面,良好的程序风格,较全的代码注释。 拥有这些条件,程序的可读性才会好,开发的复杂度才能大大减少,修改代码时更加容易 下手。 我认为,所谓友好的界面,就是用户需要的界面,力求简便全面。所以设计一个界面 时,开发人员必须要了解用户的想法,从用户的角度去设计,当然,开发不能全听用户的 意见,在详细分析了系统后,开发人员可以向用户提出一些修改的意见,在双方多次交流 后定出程序所需的功能,以决定界面的实现。 在编码中,良好的编程风格与习惯是提高工作效率的一个重要方面,而且良好的编程 风格与习惯也是使软件便于维护的基础。那如何是良好的编程风格与习惯呢?我认为主要 是程序的模块化、必要的注释。所谓模块化就是使程序的功能实现分成多个单独的功能模 块,而不能在一大段代码中实现多个功能,如果这样做,别的人是非常难读懂你的程序。 必要的注释,显而易见是要在程序的编写中加入对程序的说明,原因就是为了别人能读懂 你的程序,过一段时间后你自己还能读懂自己的程序。 总结这次毕业设计给我感受最深的至少有三点: 1.进行软件开发这样的工作,要有恒心,要能静下新来做,而不能浮躁。 2.要善于同别人交流与合作,善于获取各种有用的资源。 3.要真真实实的多查资料,多问,多看。 致谢经过一个多月的毕业设计, 我学会了很多知识, 个人的能力有了很大的提高, Visual 对 Basic 6.0 和 SQL Server 2000 有了更深刻的认识,并用 Visual Basic 6.0 结合 SQL Server 2000 顺利的开发了这样的一个学生信息管理系统,我的毕业设计取得了应有的效果。 在这里,我还要感谢我的指导老师邓老师,他帮助我解决了设计中的疑难和困惑,提 出了我的毕业论文跟设计方向,为我完成毕业设计提供了极大的帮助。在我遇到问题时她 总是耐心的为我解答,并帮我查找相关资料;在我遇到困难时帮助解决了不少的难点,使 得系统能及时完成。 我之所以选择邓老师,是因为邓老师认真负责的工作态度,严谨的治学精神和深厚的 理论水平都使我受益匪浅,使我得到不少的提高,这对于我以后的工作和学习都有一种巨 大的帮助,感谢指导老师耐心的辅导。能够顺利完成毕业课题,我还要感谢贵州师范大学 职业技术学院计算机工程系计算机网络技术班,给我们提供了良好实习和设计环境。 本人在此对所有向我提供帮助的老师和同学致以最诚挚的敬意。参考文献[1] 《学用 Visual Basic 编程》潭浩著西安电子科技大学出版社 [2] 《数据库原理》 丁宝康 施伯乐著 经济科学出版社 夏邦贵著 北京机械工业出版社[3] 《SQL Server 数据库开发入门与范例解析》 [4] 《SQL Server 2005 应用开发技术指南》彭东著北京清华大学出版社[5] 《程序设计教程》 许薇 方修丰著 清华大学出版社 [6] 《项目开发案例精粹》 冯小燕 刘斌 俞磊 牛小梅著 电子工业出版社 [7] 《Visual Basic 6.0 程序设计》 张云鹏著 电子工业出版社 [8] 《数据库原理与应用》 刘峰著 国防科技大学出版社 附录(源程序) 附录(源程序)
更多搜索:
All rights reserved Powered by
文档资料库内容来自网络,如有侵犯请联系客服。

我要回帖

更多关于 php简单学生管理系统 的文章

 

随机推荐