15vb和SQL做的学生成绩管理系统

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Form1的代码:PrivateSubCommand1_Click()UnloadMeForm3.ShowEndSubPrivateSubCommand2_Click()UnloadMeForm2.ShowEndSubPrivateSubCommand3_Click()IfMsgBox(确定退出管理系统?,_vbQuestion+vbYesNo+vbDefaultButton2,警告!)=vbYesThenEndEndIfEndSubPrivateSubPicture1_Click()EndSubPrivateSubTimer1_Timer()Command4.Caption=Time$()EndSubPrivateSubForm_Load()Timer1.Interval=1000Timer1.Enabled=TrueEndSubForm2的代码:PrivateSubCommand1_Click()Adodc1.Recordset.MoveFirstAdodc1.Recordset.Find用户名='&Text1.Text&'IfAdodc1.Recordset.EOF=TrueThenAdodc1.Recordset.MoveFirstIf((Trim(Text1.Text))=(Trim(Text3.Text)))And((Trim(Text2.Text))=(Trim(Text4.Text)))ThenAdodc1.Enabled=FalseForm4.Text3.Text=Text1.TextUnloadMeForm8.ShowElseMsgBox非法的账号!,vbOKOnly+vbExclamation,请重新输入!Text1.Text=Text2.Text=Text1.SetFocusEndIfEndSubPrivateSubCommand2_Click()Text1.Text=Text2.Text=EndSubPrivateSubCommand3_Click()UnloadMeForm1.ShowEndSubPrivateSubForm_Load()Text2.Text=Text1.Text=Text2.PasswordChar=*EndSubPrivateSubPicture1_Click()EndSubForm3的代码:PrivateSubCommand1_Click()Adodc1.Recordset.MoveFirstAdodc1.Recordset.Find用户名='&Text1.Text&'IfAdodc1.Recordset.EOF=TrueThenAdodc1.Recordset.MoveFirstIf((Trim(Text1.Text))=(Trim(Text3.Text)))And((Trim(Text2.Text))=(Trim(Text4.Text)))ThenAdodc1.Enabled=FalseForm4.Text1.Text=Text1.TextForm4.Text2.Text=Text4.TextUnloadMeForm5.ShowElseMsgBox非法的账号!,vbOKOnly+vbExclamation,请重新输入!Text1.Text=Text2.Text=Text1.SetFocusEndIfEndSubPrivateSubCommand2_Click()Option1.Value=FalseOption2.Value=FalseText1.Text=Text2.Text=EndSubPrivateSubCommand3_Click()UnloadMeForm1.ShowEndSubPrivateSubForm_Load()Text2.Text=Text1.Text=Text2.PasswordChar=*EndSub无代码Form5的代码:PrivateSubcjcx_Click(IndexAsInteger)UnloadMeForm7.ShowEndSubPrivateSubCommand1_Click()OnErrorResumeNextIfCommand1.Caption=修改ThenCommand1.Caption=确认Adodc2.Recordset.RequeryText5.SetFocusElseCommand1.Caption=修改Adodc2.Recordset.UpdateMsgBox修改成功EndIfEndSubPrivateSubForm_Load()Adodc1.CommandType=adCmdUnknownAdodc1.RecordSource=Select*FromstudentwelWhere用户名='&Form4.Text1.Text&'Adodc1.RefreshText1.Visible=TrueText3.Visible=TrueTimer1.Interval=1000Timer1.Enabled=TrueEndSubPrivateSubPicture1_Click()EndSubPrivateSubtcxt_Click(IndexAsInteger)UnloadMeForm3.ShowEndSubPrivateSubTimer1_Timer()Text2.Text=Time$()EndSubPrivateSubxgmm_Click()Label5.Visible=TrueLabel7.Visible=TrueText4.Visible=TrueText5.Visible=TrueCommand1.Visible=TrueAdodc2.CommandType=adCmdUnknownAdodc2.RecordSource=Select*FromstudententerWhere用户名='&Form4.Text1.Text&'Adodc2.RefreshEndSubPrivateSubxxcx_Click(IndexAsInteger)UnloadMeForm6.ShowEndSubForm6的代码:PrivateSubCommand1_Click()UnloadMeForm5.ShowEndSubPrivateSubCommand2_Click()OnErrorResumeNextIfCommand2.Caption=修改ThenText1.SetFocusCommand2.Caption=确认Adodc1.Recordset.RequeryMsgBox信息修改成功ElseCommand2.Caption=修改Adodc1.Recordset.UpdateEndIfEndSubPrivateSubForm_Load()Adodc1.CommandType=adCmdUnknownAdodc1.RecordSource=Select*FromstudentinforWhere学号='&Form4.Text1.Text&'Adodc1.RefreshText1.Visible=TrueText2.Visible=TrueText3.Visible=TrueText4.Visible=TrueText5.Visible=TrueText6.Visible=TrueText7.Visible=TrueText8.Visible=TrueEndSubPrivateSubPicture1_Click()EndSubPrivateSubCommand1_Click()UnloadMeForm5.ShowEndSubPrivateSubForm_Load()Adodc1.Recordset.MoveFirstDimaAsStringa=Form4.Text1.TextAdodc1.Recordset.Find学号='&a&'Text1.Visible=TrueText2.Visible=TrueText4.Visible=TrueText6.Visible=TrueDimbAsIntegerb=Text2.TextIfb=90ThenText3.Text=优ElseIfb=80ThenText3.Text=良ElseIfb=70ThenText3.Text=中ElseIfb=60ThenText3.Text=及格ElseText3.Text=不及格EndIfDimcAsIntegerc=Text4.TextIfc=90ThenText5.Text=优ElseIfc=80ThenText5.Text=良ElseIfc=70ThenText5.Text=中ElseIfc=60ThenText5.Text=及格ElseText5.Text=不及格EndIfDimdAsIntegerd=Text6.TextIfd=90ThenText7.Text=优ElseIfd=80ThenText7.Text=良ElseIfd=70ThenText7.Text=中ElseIfd=60ThenText7.Text=及格ElseText7.Text=不及格EndIfIfText3.Text=不及格ThenText2.ForeColor=&HFF&EndIfIfText5.Text=不及格ThenText4.ForeColor=&HFF&EndIfIfText7.Text=不及格ThenText6.ForeColor=&HFF&EndIfEndSubPrivateSubPicture1_Click()EndSubForm8的代码:PrivateSubCommand1_Click()OnErrorResumeNextIfCommand1.Caption=修改ThenCommand1.Caption=确认Adodc1.Recordset.RequeryText2.SetFocusElseCommand1.Caption=修改Adodc1.Recordset.UpdateMsgBox修改成功EndIfEndSubPrivateSubfile1_Click()UnloadMeForm10.ShowEndSubPrivateSubfile2_Click()UnloadMeForm9.ShowEndSubPrivateSubfile4_Click()UnloadMeForm12.ShowEndSubPrivateSubfile5_Click()UnloadMeForm11.ShowEndSubPrivateSubfile7_Click()UnloadMeForm2.ShowEndSubPrivateSubfile8_Click()Label3.Visible=TrueLabel4.Visible=TrueText1.Visible=TrueText2.Visible=TrueCommand1.Visible=TrueAdodc1.CommandType=adCmdUnknownAdodc1.RecordSource=Select*FromteacherenterWhere用户名='&Form4.Text3.Text&'Adodc1.RefreshEndSubPrivateSubPicture1_Click()EndSubForm9的代码:PrivateSubCommand1_Click()DimmnoAsStringmno=InputBox(请输入学号,查找窗)Adodc1.Recordset.MoveFirstAdodc1.Recordset.Find学号='&mno&'IfAdodc1.Recordset.EOF=TrueThenMsgBox无此学号!,,提示EndSubPrivateSubCommand2_Click()UnloadMeForm8.ShowEndSubPrivateSubCommand3_Click()DimmnonAsStringmnon=InputBox(请输入姓名,查找窗)Adodc1.Recordset.M

1 / 21
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功