提交作业的附件14经济_第1页
提交作业的附件14经济_第2页
提交作业的附件14经济_第3页
提交作业的附件14经济_第4页
提交作业的附件14经济_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

2015119□验证性□设计性☑ 2、设计菜单、PublicClassPrivateSub退出ToolStrip Item_Click(senderAsSystem.Object,eAsSystem.EventArgs)Handles退出ToolStrip EndPrivateSub退出ToolStrip Item1_Click(senderAsSystem.Object,eAsSystem.EventArgs)Handles退出ToolStrip EndPrivateSub打开ToolStrip Item_Click(senderAsSystem.Object,eAsSystem.EventArgs)Handles打开ToolStrip EndPrivateSub打开ToolStrip Item1_Click(senderAsSystem.Object,eAsSystem.EventArgs)Handles打开ToolStrip EndSubPrivateSub退出QToolStrip Item_Click(senderAsSystem.Object,eAsSystem.EventArgs)Handles退出QToolStrip EndPrivateSubToolStripButton2_Click(senderAsSystem.Object,eAsSystem.EventArgs)HandlesToolStripButton2.ClickEndPrivateSubToolStripButton1_Click(senderAsSystem.Object,eAsSystem.EventArgs)HandlesToolStripButton1.Click ("C:\ProgramFiles\ EndSubPrivateSub打开ToolStrip Item2_Click(senderAsSystem.Object,eAsSystem.EventArgs)Handles打开ToolStrip ("C:\ProgramFiles\ EndSubPrivateSub帮助HToolStrip Item_Click(senderAsSystem.Object,eAsSystem.EventArgs)Handles帮助HToolStrip EndSubPrivateSubForm1_Load(senderAsSystem.Object,eAsSystem.EventArgs)HandlesLabel1.Text="欢迎使用学生信息管理系统"Label1.LeftMe.Width2Label1.Width2Label1.ForeColor=Color.BlueEndSubEndClassSqlDataAdapterName“DaStudentPublicClassPublicstudatasetAsDataSet=NewDataSetPubliclinenum,linesumAsIntegerPublicSubLabel6.Text说明:第&Str(linenum1)&条,共&Str(linesum)&"条"Iflinesum>=0ThenDaStudent.Fill(studataset,DimmyrowAsDataRowstudataset.Tables("student_inf").Rows(linenum)TextBox1.Text=myrow("学号")TextBox2.Text= TextBox3.Textmyrow("")TextBox4.Textmyrow("")TextBox5.Text=myrow("学院Label6.Text没有记录了!"EndIfEndPrivateSubForm2_Load(senderAsSystem.Object,eAsSystem.EventArgs)HandlesDaStudent.Fill(studataset,Dimcurrrow()AsDataRow=studataset.Tables("student_inf").Select(Nothing,Nothing,DataViewRowState.CurrentRows)linesum=currrow.Lengthlinenum=0Button6.Enabled=FalseEndPrivateSubButton3_Click(senderAsSystem.Object,eAsSystem.EventArgs)HandlesIflinenum<linesum-1Thenlinenum=linenum+1EndIfEndPrivateSubButton2_Click(senderAsSystem.Object,eAsSystem.EventArgs)HandlesIflinenum>0Thenlinenum=linenum-1EndIfEndPrivateSubButton1_Click(senderAsSystem.Object,eAsSystem.EventArgs)Handleslinenum=0EndPrivateSubButton4_Click(senderAsSystem.Object,eAsSystem.EventArgs)Handleslinenum=linesum-1EndPrivateSubButton5_Click(senderAsSystem.Object,eAsSystem.EventArgs)HandlesTextBox1.Text=""TextBox2.Text=""TextBox3.Text=""TextBox4.Text=""TextBox5.Text=""Button1.Enabled=FalseButton2.Enabled=TrueButton3.Enabled=FalseButton4.Enabled=EndPrivateSubButton6_Click(senderAsSystem.Object,eAsSystem.EventArgs)HandlesIfTextBox1.Text=""ThenDimmyrowAsDataRowstudataset.Tables("").NewRowmyrow("学号")=TextBox1.Textmyrow("")=TextBox2.Textmyrow("")=TextBox3.Textmyrow("")=TextBox4.Textmyrow("学院DaStudent.Update(studataset,"student_inf")linesum=linesum+1linenum=linesum-1Button1.Enabled=TrueButton2.Enabled=FalseButton3.Enabled=TrueButton4.Enabled=TrueEndIfEndSubPrivateSubButton8_Click(senderAsSystem.Object,eAsSystem.EventArgs)HandlesDimmyrowAsDataRowIflinesum>0Thenmyrow=studataset.Tables("student_inf").Rows(linenum)DaStudent.Update(studataset,"student_inf")linesum=linesum-1Iflinenum=linesumThenlinenum=linenum-EndIfEndIfEndPrivateSubButton7_Click(senderAsSystem.Object,eAsSystem.EventArgs)HandlesDimmyrowAsDataRowstudataset.Tables("student_inf").Rows(linenum)myrow("学号")=TextBox1.Textmyrow("")=TextBox2.Textmyrow("")=TextBox3.Textmyrow("")=TextBox4.Textmyrow("学院DaStudent.Update(studataset,"student_inf")EndSubEnd建立新项目,并在窗体中添加button、textbox、labelDataGridCaptionTextSqlDataAdapterName“DaStudentPublicClassPrivateSubButton2_Click(senderAsSystem.Object,eAsSystem.EventArgs)HandlesDimstrSQLAsDimmydatasetAsNewstrSQL="select*fromstudent_inf" mandText= DataGrid1.DataSource=mydataset.Tables("student_inf")EndPrivateSubButton1_Click(senderAsSystem.Object,eAsSystem.EventArgs)HandlesDimstrSQL,strWhere,str AsString,flagAsIntegerDimmydatasetAsNewDataSetflag=strSQL="select*fromstudent_infwhereIfCheckBox1.Checked=TruestrWhere=" like'%"&Trim(TextBox1.Text)&"%'"flag=1EndIfCheckBox2.Checked=TrueIfRadioButton1.CheckedTrueThen ="男" 女"EndIfIfflag=0strWhere= ='"& &strWhere=strWhere& ='"& &EndIfflag=1EndstrSQL=strSQL&strWhereIfflag=1Then mandText= DataGrid1.DataSource=mydataset.Tables("student_inf")EndIfEndSubEndClass四、实验结果(题解或运行结果 点击帮助点击游戏,打开扫雷游戏界SqlDataAdapterName“DaStudent点击第一点击末一点击上一①②③点击下一①②点击添

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论