学生选课系统设计_第1页
学生选课系统设计_第2页
学生选课系统设计_第3页
学生选课系统设计_第4页
学生选课系统设计_第5页
已阅读5页,还剩29页未读 继续免费阅读

下载本文档

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

文档简介

1、精选优质文档-倾情为你奉上精选优质文档-倾情为你奉上专心-专注-专业专心-专注-专业精选优质文档-倾情为你奉上专心-专注-专业一需求分析1.1设计任务本设计的任务是学生选课系统的设计与实现,其中要实现,课程信息管理(录入、查询、维护);学生信息管理(录入、查询、维护);教师信息管理(录入、查询、维护);选课管理(选课、退课、选课信息查询);教师输入成绩管理(查询学生选的课并给学生成绩)。1.2 系统性能需求实用性:为学生选课提供方便,可以有效的管理学生选课。先进性:产品的系统设计和开发应紧跟着整个计算机发展潮流,采用当时最先进的设计思想,利用最新的开发技术和开发工具。使系统能够无论在功能设计上

2、,还是在技术实现上,都处于同行业的领先地位。操作简单:本系统应该适用于不同水平的使用者,同时系统不应太复杂和烦琐,因此要求系统的操作尽可能简单易行。适应性:应该能广泛应用于不同类型的大、中、小学院校,系统采用模块化设计,用户可以根据自己的实际情况自行组合,使系统在不同的硬件环境下都能得以应用。 代码可读性好:文中的代码将尽可能简洁,易懂。1.3可行性分析经济可行性:由于本系统的主要背景是课程设计,不注重直接的经济效益和其后的发展方向,只在注重自身水平和能力的提高,对自身的经济要求也不高,只要有一台能运Microsoft Visual Studio 2008软件的电脑便可,所以不用考虑到经济问题

3、。技术可行性: 本系统的开发使用数据库,只需考虑安装SQL sever数据库的问题,在技术上要求并不高,因此本系统在技术上是可行的。运行可行性: 本系统是一个学生选课系统,所耗费的资源非常的小,现在一般的电脑无论是硬件还是软件都能够满足条件,因此,本系统在运行上是可行的。综上所述,本系统的设计与开发在技术上和硬件设备上的条件都是满足的,因此,它在技术上是可行的。二数据库设计21实体关系图学号性别学生表班级出生日期期期姓名 图2.11 学生实体关系图 教师表所在系所授课程教师名教师编号图2.12 教师实体关系图课程名称学分课程表开课系课程编号任课老师图2.13 课程实体关系图教师编号课程名称学分

4、选课表教师姓名课程编号成绩名班级学号姓名图2.14 选课实体关系图2.2 数据字典 数据项是数据库的关系中不可再分的数据单位,下表分别列出了数据的名称、数据类型、长度、取值能否为空。利用SQL Server 2000建立“学生选课”数据库,其基本表清单及表结构描述如下:表2.1 数据库中用到的表:数据库表名关系模式名称备注Student学生表学生基本信息表Course课程表课程基本信息表Teach教师表教师基本信息Stu_Cour选课表学生选课信息 表2.2 Student基本情况数据表:字段名字段类型Not Null说明SnoCharPrimary key学号SnamecharNot Nul

5、l姓名Sclasschar班级Sageintr出生日期Ssexchar性别表2.3Teach基本情况数据表:字段名字段类型Not Null说明TnoCharPrimary key教师编号TnamecharNot Null教师名Cnochar外部码所授课程Tdeptchar所在系表2.4Course数据表:字段名字段类型约束控制说明Cnochar主键(primary key)课程号Cnamecharnot null课程名称Ctimeint课时Ccreditint学分Cteachenchar任课老师表2.5Stu_cour情况数据表:字段名字段类型约束控制说明Cnochar外部键课程编号Snoch

6、ar外部键学号Snamechar姓名Sclasschar班级SCgradechar成绩Tnamechar教师名Tnochar教师编号Cnamechar课程名称Ccreditint成绩Ccreditint学分三概要设计3.1 系统总体功能根据本设计的要求可以得到如图3-1所示的系统功能图。学生选课系统用户登录学生用户管理员教师用户个人信息选课结果选课列表选课要求删除修改浏览添加个人信息删除修改浏览退出登录图3-1 系统功能图3.2 系统功能模块设计本系统需要完成的功能主要有:(1)有关学生信息的输入,包括输入学生基本信息、所选课程。(2)学生信息的查询、修改、删除。(3)课程管理信息的添加、修改

7、、删除和浏览等。(4)学生选课管理信息的查询、添加、修改、删除。(5)学生实现选择课程和退选课程的功能。 (6)教师实现查询学生选的课并给学生成绩。 四详细设计4.1登陆界面的设计 登录模块提供用户登录界面,用户输入正确的用户名和密码后,则可进入系统主窗口(即导航页面),从而可以选择进入相应的子系统。 在系统登录界面中,单击【确定】按钮验证用户名和用户密码,若正确则进入系统主界面;否则弹出错误提示,并等待用户的重新输入。单击【取消】按钮则关闭登录界面,退出系统。首先打开Visual Studio 2008,新建一个Windows 应用程序,命名为“学生选课系统”,再为应用程序添加一个窗体。然后

8、在窗体合适位置添加所需要的组件并设置相应属性。 接下来编写登录模块的代码,部分代码如下所示。string LJ = server=.;database=myd;uid=sa;pwd=;/建立连接 SqlConnection conn = new SqlConnection(LJ); conn.Open();/读取所输入的用户名和密码 SqlCommand comm = conn.CreateCommand(); if (rbAdmin.Checked) string sql = SELECT adminname,adminpas FROM admin WHERE(adminname= + tb

9、Name.Text + ); comm.CommandText = sql; SqlDataReader datar = comm.ExecuteReader(); DateTime dt = new DateTime(2008, 1, 1); if (DateTime.Now = dt) MessageBox.Show(程序已经过期,请联系开发商!, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Information); Close();/判断是否存在输入的用户 else if (!datar.HasRows) MessageBox.Show(用户

10、名不存在,请重新输入!); tbName.Focus(); return; /读取数据库的内容,并与输入的进行比较; while (datar.Read() /判断用户输入是否正确 if (dataradminpas.ToString().Trim() != tbPas.Text.Trim() MessageBox.Show(用户密码不正确,请重新输入!); tbPas.Focus(); return; else AdminLogin f2 = new AdminLogin(); f2.ShowDialog(); Close(); else if (rbStudent.Checked) str

11、ing sql = SELECT sno,spas FROM student WHERE(sno= + tbName.Text + ); comm.CommandText = sql; SqlDataReader datar = comm.ExecuteReader(); DateTime dt = new DateTime(2008, 1, 1); if (DateTime.Now = dt) MessageBox.Show(程序已经过期,请联系开发商!, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Information); Close(); /

12、判断是否存在输入的用户 else if (!datar.HasRows) MessageBox.Show(用户名不存在,请重新输入!); tbName.Focus(); return; /读取数据库的内容,并与输入的进行比较; while (datar.Read() /判断用户输入是否正确 if (datarspas.ToString().Trim() != tbPas.Text.Trim() MessageBox.Show(用户密码不正确,请重新输入!); tbPas.Focus(); return; else StudentLogin f3 = new StudentLogin(); f3

13、.ShowDialog(); Close(); else string sql = SELECT tno,tpas FROM teacher WHERE(tno= + tbName.Text + ); comm.CommandText = sql; SqlDataReader datar = comm.ExecuteReader(); DateTime dt = new DateTime(2008, 1, 1); if (DateTime.Now = dt) MessageBox.Show(程序已经过期,请联系开发商!, 系统提示:, MessageBoxButtons.OK, Message

14、BoxIcon.Information); Close(); /判断是否存在输入的用户 else if (!datar.HasRows) MessageBox.Show(用户名不存在,请重新输入!); tbName.Focus(); return; /读取数据库的内容,并与输入的进行比较; while (datar.Read() /判断用户输入是否正确 if (datartpas.ToString().Trim() != tbPas.Text.Trim() MessageBox.Show(用户密码不正确,请重新输入!); tbPas.Focus(); return; else TeacherL

15、ogin f4 = new TeacherLogin(); f4.ShowDialog(); Close(); 完成后的界面效果如图4.1所示图4.1登陆界面4.2管理员登陆界面设计按照以上步骤设计一个管理员登陆界面如图4.2所示。 图4.2管理员登陆界面4.3教师登陆界面设计 首先打开Visual Studio 2008,新建一个Windows 应用程序,再为应用程序添加一个窗体。然后在窗体合适位置添加所需要的组件并设置相应属性。 部分代码如下所示:using System;using System.Collections.Generic;using System.ComponentMode

16、l;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace myd public partial class TeacherLogin : Form public TeacherLogin() InitializeComponent(); private void butOK_Click(object sender, EventArgs e) if (tbSearch.Text.Length = 0) Mes

17、sageBox.Show(查询条件不能为空, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Information); return; int i; if (int.TryParse(tbSearch.Text, out i) if (tbSearch.Text.Length = 0) MessageBox.Show(学号必需为数字, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Information); return; SqlConnection cnn = new SqlConnection (Data

18、Source=.;Initial Catalog=myd;User ID=sa;Password=); SqlCommand cmd = new SqlCommand(); cmd.CommandText = SC_Info_Search; cmd.Parameters.Add(SearchType, SqlDbType.Decimal); cmd.Parameters.Add(SearchText, SqlDbType.VarChar, 50); i = 0; cmd.ParametersSearchType.Value = i; cmd.ParametersSearchText.Value

19、 = tbSearch.Text.Trim(); cmd.CommandType = CommandType.StoredProcedure; cmd.Connection = cnn; SqlDataAdapter sda = new SqlDataAdapter(cmd); try DataSet ds = new DataSet(); sda.Fill(ds);/填充数据集 sCBindingSource.DataSource = ds.Tables0;/将数据集显示出来 /把查询出来的数据绑定到相关控件 tbCj.DataBindings.Clear(); tbCj.DataBindi

20、ngs.Add(Text, sCBindingSource, score); catch (Exception ex) MessageBox.Show(出现错误,错误原因为 + ex.Message, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Error); private void butSave_Click(object sender, EventArgs e) string sql; sql = update SC set score= + tbCj.Text + where sno= + (DataRowView)sCBindingSour

21、ce.Current)sno.ToString(); SqlConnection cnn = new SqlConnection (Data Source=.;Initial Catalog=myd;User ID=sa;Password=); SqlCommand cmd = new SqlCommand(sql, cnn); try cnn.Open();/打开连接 cmd.ExecuteNonQuery(); MessageBox.Show(数据保存成功, 系统提示:); catch (Exception ex) MessageBox.Show(出现错误,错误原因为 + ex.Messa

22、ge, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Error); finally if (cnn.State = ConnectionState.Open) cnn.Close();/关闭连接 完成后的界面效果如图4.3所示 图4.3教师登陆界面4.4学生登陆界面设计1首先打开Visual Studio 2005。2新建一个工程,工程名为:StudentLogin3在窗体上放置数据显示工具DataGridView1、DataGridView24设置DataGridView1和DataGridView2任务,在选择数据源中,选择添加项目数据源,根据数

23、据源配置向导来添加,和数据库名为myd中的学生表连接起来,添加成功时,选择数据源为courseBindingSource和sCBindingSource。5在窗体上放置GroupBox组件GroupBox1,RadioButton组件RadioButton1、RadioButton2、RadioButton3、RadioButton 4、RadioButton 5,Label组件Label1、Label2、Label3,Button组件Button1、Button2、Button3、Button4、Button5,TextBox组件TextBox1到TextBox46设置GroupBox的属性

24、中的Text:GroupBox1的Text中输入:查询条件。7设置Button的属性中的Text:Button1到Button5的Text中分别输入:确认、返回、选中此课、退了此课、确定。8设置Button的属性中的Name:确认、返回、选中此课、退了此课、确定的Name中分别输入:btnOK、btnCancel、butXzck、butTlck、butOK2。9设置Label的属性中的Text:Label1到Label3的Text中分别输入:课程代码、输入自己的学号、输入自己的学号查找自己所选的课程和成绩。10设置RadioButton的属性中的Name:RadioButton1到RadioB

25、utton5的Name中分别输入:rbKcdm、rbKcmc、rbXf、rbKkx、rbRkls。11设置RadioButton的属性中的Text:RadioButton1到RadioButton3的Text中分别输入:课程代码、课程名称、学分、开课系、任课老师。12设置RadioButton1的属性中的checked设置为True。13设置TextBox的属性中的Name:TextBox1到TextBox4的Name中分别输入:tbSearch、tbNo、tbsno、tbSearch2。14分别双击确认、确认、返回、选中此课、退了此课、确定切换到代码窗口,输入代码,代码如下:using Sy

26、stem;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace myd public partial class StudentLogin : Form public StudentLogin() InitializeComponent(); private bool Insert_fl

27、ag = false; private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) Insert_flag = false; private void StudentLogin_Load(object sender, EventArgs e) this.courseTableAdapter.Fill(this.mydDataSet5.course); private void btnOK_Click(object sender, EventArgs e) if (tbSearch.Text.L

28、ength = 0) MessageBox.Show(查询条件不能为空, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Information); return; int i; if (rbXf.Checked & int.TryParse(tbSearch.Text, out i) if (tbSearch.Text.Length = 0) MessageBox.Show(学分必需为数字, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Information); return; SqlConnection c

29、nn = new SqlConnection (Data Source=.;Initial Catalog=myd;User ID=sa;Password=); SqlCommand cmd = new SqlCommand(); cmd.CommandText = Course_Info_Search; cmd.Parameters.Add(SearchType, SqlDbType.Decimal); cmd.Parameters.Add(SearchText, SqlDbType.VarChar, 50); if (rbKcdm.Checked) i = 0; else if (rbKc

30、mc.Checked) i = 1; else if (rbXf.Checked) i = 2; else if (rbKkx.Checked) i = 3; else i = 4; cmd.ParametersSearchType.Value = i; cmd.ParametersSearchText.Value = tbSearch.Text.Trim(); cmd.CommandType = CommandType.StoredProcedure; cmd.Connection = cnn; SqlDataAdapter sda = new SqlDataAdapter(cmd); tr

31、y DataSet ds = new DataSet(); sda.Fill(ds);/填充数据集 courseBindingSource.DataSource = ds.Tables0; /将数据集显示出来 /把查询出来的数据绑定到相关控件 tbNo.DataBindings.Clear(); tbNo.DataBindings.Add(Text, courseBindingSource, cno); if (ds.Tables0.Rows.Count = 0) Insert_flag = true; catch (Exception ex) MessageBox.Show(出现错误,错误原

32、因为 + ex.Message, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Error); private void btnCancel_Click(object sender, EventArgs e) Close(); private void butXzck_Click(object sender, EventArgs e) string sql; sql = Insert into SC(sno,cno) values( + tbsno.Text + , + tbNo.Text + ); SqlConnection cnn = new Sq

33、lConnection (Data Source=.;Initial Catalog=myd;User ID=sa;Password=); SqlCommand cmd = new SqlCommand(sql, cnn); try cnn.Open();/打开连接 cmd.ExecuteNonQuery(); MessageBox.Show(数据保存成功, 系统提示:); catch (Exception ex) MessageBox.Show(出现错误,错误原因为 + ex.Message, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Error

34、); finally if (cnn.State = ConnectionState.Open) cnn.Close();/关闭连接 private void butTlck_Click(object sender, EventArgs e) string sql; sql = delete from SC where cno= + tbNo.Text + ; SqlConnection cnn = new SqlConnection (Data Source=.;Initial Catalog=myd;User ID=sa;Password=); SqlCommand cmd = new S

35、qlCommand(sql, cnn); try cnn.Open();/打开连接 cmd.ExecuteNonQuery(); MessageBox.Show(数据删除成功, 系统提示:); catch (Exception ex) MessageBox.Show(出现错误,错误原因为 + ex.Message, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Error); finally if (cnn.State = ConnectionState.Open) cnn.Close();/关闭连接 private void butOK2_Click

36、(object sender, EventArgs e) if (tbSearch2.Text.Length = 0) MessageBox.Show(查询条件不能为空, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Information); return; int i; if (int.TryParse(tbSearch2.Text, out i) if (tbSearch2.Text.Length = 0) MessageBox.Show(学号必需为数字, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.I

37、nformation); return; SqlConnection cnn = new SqlConnection (Data Source=.;Initial Catalog=myd;User ID=sa;Password=); SqlCommand cmd = new SqlCommand(); cmd.CommandText = SC_Info_Search; cmd.Parameters.Add(SearchType, SqlDbType.Decimal); cmd.Parameters.Add(SearchText, SqlDbType.VarChar, 50); i = 0; c

38、md.ParametersSearchType.Value = i; cmd.ParametersSearchText.Value = tbSearch2.Text.Trim(); cmd.CommandType = CommandType.StoredProcedure; cmd.Connection = cnn; SqlDataAdapter sda = new SqlDataAdapter(cmd); try DataSet ds = new DataSet(); sda.Fill(ds);/填充数据集 sCBindingSource.DataSource = ds.Tables0; /

39、将数据集显示出来 catch (Exception ex) MessageBox.Show(出现错误,错误原因为 + ex.Message, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Error); 完成后的界面效果如图4.4所示。图4.4学生登陆界面4.5.学生信息维护界面设计1首先打开Visual Studio 2005。2新建一个工程,工程名为:StudentInfo3在新建的项目StudentInfo中添加一个名为SqlHelper.cs的类,并打开此类,找到public static string CONNSTR = Data Sourc

40、e=.;Initial Catalog=myd;User ID=sa;Password=;并修改。4在窗体上放置数据显示工具DataGridView。5设置DataGridView任务,在选择数据源中,选择添加项目数据源,根据数据源配置向导来添加,和数据库名为myd中的学生 表连接起来,添加成功时,选择数据源为studentBindingSource。6在窗体上放置GroupBox组件GroupBox1,RadioButton组件RadioButton1、RadioButton2、RadioButton3,Label组件Label1、Label2、Label3、Label4、Label5、La

41、bel6,Button组件Button1、Button2、Button3,TextBox组件TextBox1到TextBox77设置GroupBox的属性中的Text:GroupBox1的Text中输入:查询条件。8设置Button的属性中的Text:Button1到Button5的Text中分别输入:确认、返回、新增、存盘、删除。9设置Button的属性中的Name:确认、返回、新增、存盘、删除的Name中分别输入:btnOK、btnCancel、butNew、btnSave、butDel。10设置Label的属性中的Text:Label1到Label6的Text中分别输入:学号、姓名、所在

42、系、性别、出生日期、密码。11设置RadioButton的属性中的Name:RadioButton1到RadioButton3的Name中分别输入:rbXh、rbXm、rbSzx。12设置RadioButton的属性中的Text:RadioButton1到RadioButton3的Text中分别输入:学号、姓名、所在系。13设置RadioButton1的属性中的checked设置为True。14设置TextBox的属性中的Name:TextBox1到TextBox7的Name中分别输入:tbSearch、tbXh、tbXm、tbSzx、tbXb、tbCsrq、tbMm。15分别双击确认、返回、

43、新增、存盘、删除切换到代码窗口,输入代码,代码如下:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace myd public partial class StudentInfo : Form public StudentInfo() InitializeCom

44、ponent(); private bool Insert_flag = false; private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) Insert_flag = false; private void StudentInfo_Load(object sender, EventArgs e) / TODO: 这行代码将数据加载到表“mydDataSet1.student”中。您可以根据需要移动或移除它。 this.studentTableAdapter.Fill(this.mydD

45、ataSet1.student); private void btnOK_Click(object sender, EventArgs e) if (tbSearch.Text.Length = 0) MessageBox.Show(查询条件不能为空, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Information); return; int i; if (rbXh.Checked & int.TryParse(tbSearch.Text, out i) if (tbSearch.Text.Length = 0) MessageBox.Show(

46、学号必需为数字, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Information); return; SqlConnection cnn = new SqlConnection (Data Source=.;Initial Catalog=myd;User ID=sa;Password=); SqlCommand cmd = new SqlCommand(); cmd.CommandText = Student_Info_Search; cmd.Parameters.Add(SearchType, SqlDbType.Decimal); cmd.

47、Parameters.Add(SearchText, SqlDbType.VarChar, 50); if (rbXh.Checked) i = 0; else if (rbXm.Checked) i = 1; else i = 2; cmd.ParametersSearchType.Value = i; cmd.ParametersSearchText.Value = tbSearch.Text.Trim(); cmd.CommandType = CommandType.StoredProcedure; cmd.Connection = cnn; SqlDataAdapter sda = n

48、ew SqlDataAdapter(cmd); try DataSet ds = new DataSet(); sda.Fill(ds);/填充数据集 studentBindingSource.DataSource = ds.Tables0; /将数据集显示出来 /把查询出来的数据绑定到相关控件 tbXh.DataBindings.Clear(); tbXm.DataBindings.Clear(); tbSzx.DataBindings.Clear(); tbXb.DataBindings.Clear(); tbCsrq.DataBindings.Clear(); tbMm.DataBind

49、ings.Clear(); tbXh.DataBindings.Add(Text, studentBindingSource, sno); tbXm.DataBindings.Add(Text,studentBindingSource, sname); tbSzx.DataBindings.Add(Text,studentBindingSource, sdept); tbXb.DataBindings.Add(Text, studentBindingSource, ssex); tbCsrq.DataBindings.Add(Text, studentBindingSource, sdate)

50、; tbMm.DataBindings.Add(Text, studentBindingSource, spas); if (ds.Tables0.Rows.Count = 0) Insert_flag = true; catch (Exception ex) MessageBox.Show(出现错误,错误原因为 + ex.Message, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Error); private void btnCancel_Click(object sender, EventArgs e) Close(); private vo

51、id butNew_Click(object sender, EventArgs e) tbXh.Text = ; tbXm.Text = ; tbSzx.Text = ; tbXb.Text = ; tbCsrq.Text = ; tbMm.Text = ; Insert_flag = true; private void btnSave_Click(object sender, EventArgs e) string sql; if (Insert_flag) sql = Insert into student(sno,sname,sdept,ssex,sdate,spas) values

52、( + tbXh.Text + , + tbXm.Text + , + tbSzx.Text + , + tbXb.Text + , + tbCsrq.Text + , + tbMm.Text + ); else sql = update student set sno= + tbXh.Text + ,sname= + tbXm.Text + ,sdept= + tbSzx.Text + ,ssex= + tbXb.Text + ,sdate= + tbCsrq.Text + ,spas= + tbMm.Text + where CID= + (DataRowView)studentBindi

53、ngSource.Current)CID.ToString(); SqlConnection cnn = new SqlConnection (Data Source=.;Initial Catalog=myd;User ID=sa;Password=); SqlCommand cmd = new SqlCommand(sql, cnn); try cnn.Open();/打开连接 cmd.ExecuteNonQuery(); MessageBox.Show(数据保存成功, 系统提示:); catch (Exception ex) MessageBox.Show(出现错误,错误原因为 + ex

54、.Message, 系统提示:, MessageBoxButtons.OK, MessageBoxIcon.Error); finally if (cnn.State = ConnectionState.Open) cnn.Close();/关闭连接 private void fillByToolStripButton_Click(object sender, EventArgs e) try this.studentTableAdapter.FillBy(this.mydDataSet1.student); catch (System.Exception ex) System.Windows.Forms.MessageBox.Show(ex.Message); privat

温馨提示

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

评论

0/150

提交评论