ImageVerifierCode 换一换
格式:DOCX , 页数:36 ,大小:386.16KB ,
资源ID:2496647      下载积分:12 金币
快捷注册下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/2496647.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

注意事项

本文(C与SQL数据库学生成绩标准管理系统完整代码.docx)为本站上传会员【a199****6536】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

C与SQL数据库学生成绩标准管理系统完整代码.docx

1、 数据库技术及应用项目设计汇报 学生成绩管理系统 姓名:Celia Yan -01-07 一.设计目标及意义 在现在高校日常管理中,学生成绩管理系统是其中很关键一环,尤其是目前学校规模不停扩大,学生人数日益增加,课程门类多,校区分散等实际情况,学生成绩统计功效越来越繁重,稍有疏忽就会出现差错。所以,学生成绩管理系统更含有很大实际应用意义。在互联网快速崛起今天,改革传统手工录入方法,公正,正确,立即反应学生信息和成绩情况,以适应信息时代要求,是学生成绩管理系统一个新理念。经过成绩管理能够大大提升学校工作效率。学生成绩管理系统应该完成以下两个方面内容:学

2、生档案资料管理、学生成绩管理。经过学生成绩管理系统能够做到信息规范管理,科学统计和快速查询、修改、增加、删除等,降低管理方面工作量。 二.关键功效 该系统关键用于学校学生信息管理,总体任务是实现学生信息关系系统化、规范化和自动化,其关键任务是用计算机对学生信息进行日常管理,如查询、修改、增加、删除,另外还考虑到用户登录权限,针对学生信息和权限登录学生成绩管理系统。 本系统关键包含注册管理、老师管理、学生信息查询、添加、修改、删除等部分。其关键功效有: (1) 学生信息添加,包含输入学生基础信息和成绩。 (2) 学生信息查询,包含查询学生基础信息和成绩。 (3) 学生信息修改,包含修

3、改学生基础信息和成绩。 (4) 学生信息删除,包含删除学生基础信息和成绩。 (5) 登录用户密码修改,用户登录到系统可进行对应用户密码修改。 (6) 管理员用户对用户名管理,包含添加新用户、删除用户。 学生成绩管理系统是经典信息管理系统,其开发关键包含后台数据库建立和维护和前端应用程序开发两个方面。对于前者要求建立起数据一致性和完整性强、数据安全性好数据库。对于后者则要求应用程序功效完备,易使用。 该管理系统我使用是Microsoft Visual Studio 及 Microsoft SQL Server 。 系统功效步骤图 图 2.1

4、系统功效步骤 三.数据库设计 3.1本系统数据库采取是SQL Server 。该数据库包含学生成绩表、用户登录表用于纪录学生基础信息数据库表结构以下: 成绩表物理结构 图3.1 图3.2 用户登录表物理结构: 图3.3 图3.4 3.2触发器 删除DLB中统计时同时删除CJB中姓名相同统计 USE [studentscore] GO /****** Object: Trigger [dbo].[dlb_delete] Script Date: 01/07/ 12:42:17 ******/ SET ANSI_NULLS ON GO SET

5、 QUOTED_IDENTIFIER ON GO ALTER trigger [dbo].[dlb_delete] on [dbo].[dlb] after delete as begin declare @leib varchar(50) select @leib='学生'from deleted delete from cjb where 姓名 in (select 用户名 from deleted) End 3.3数据库连接 string constr = "Password=617804;Persist Security Info=True;User I

6、D=ywj;Initial Catalog=studentscore;Data Source=YANJING"; SqlConnection conn = new SqlConnection(constr); string sqlstr = "select * from cjb"; SqlCommand cmd = new SqlCommand(sqlstr, conn); SqlDataReader reader = cmd.ExecuteReader(); Da

7、taSet ds = new DataSet(); while (reader.Read()) { string id = reader["学号"].ToString(); string name = reader["姓名"].ToString(); MessageBox.Show(string.Format("id={0},name={1},学号,姓名")); } 四.系统实现 4.1.登

8、录界面 图4.1 该界面是学生成绩管理系统登录界面,能够选择作为学生,管理员或老师身份登录。每一个进入系统人全部会看到目前时间,在登录时只有用户名,密码,和身份相符合时才能进入系统,不然登录无法成功。 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks;

9、using System.Windows.Forms; using System.Data.SqlClient; namespace WindowsFormsApplication1 { public partial class Form1 : Form { static public string sn, sub; public Form1() { InitializeComponent(); } Form2 fr2 = new Form2();

10、Form3 fr3 = new Form3(); Form4 fr4 = new Form4(); private void Form1_Load(object sender, EventArgs e) { timer1.Start(); } private void label1_Click(object sender, EventArgs e) { } private void button1_Click(objec

11、t sender, EventArgs e) { string constr = "Password=617804;Persist Security Info=True;User ID=ywj;Initial Catalog=studentscore;Data Source=YANJING"; SqlConnection conn = new SqlConnection(constr); conn.Open(); if (textname.Tex

12、t == "" || textpassword.Text == "") MessageBox.Show("信息不全,请不要遗漏信息!"); if (rbtnmanager.Checked) { string cstr = "select * from dlb where 类别='管理员' and 用户名='" + textname.Text.Trim() + "'and 密码='" + textpassword.Text.Trim() + "'";

13、 SqlCommand comm = new SqlCommand(cstr, conn); SqlDataReader dr = comm.ExecuteReader(); if (dr.Read()) { sn = textname.Text.Trim(); fr4.Show(); this.Visible = false; ; }

14、else { MessageBox.Show("密码或用户名犯错,请重新输入!"); textname.Text = ""; textpassword.Text = ""; } } if (rbtnteacher.Checked) { string cstr = "select * from dlb where 类别='老师' and

15、 用户名='" + textname.Text.Trim() + "'and 密码='" + textpassword.Text.Trim() + "'"; SqlCommand comm = new SqlCommand(cstr, conn); SqlDataReader dr = comm.ExecuteReader(); if (dr.Read()) { sn = textname.Text.Trim(); s

16、ub = dr.GetValue(3).ToString(); fr3.Show(); this.Visible = false; } else { MessageBox.Show("密码或用户名犯错,请重新输入!"); textname.Text = ""; textpassword.Text = ""; } } if

17、rbtnstudent.Checked) { string cstr = "select * from dlb where 类别='学生' and 用户名='" + textname.Text.Trim() + "'and 密码='" + textpassword.Text.Trim() + "'"; SqlCommand comm = new SqlCommand(cstr, conn); SqlDataReader dr = comm.ExecuteReader

18、); if (dr.Read()) { sn = textname.Text.Trim(); fr2.Show(); this.Visible = false; } else { MessageBox.Show("密码或用户名犯错,请重新输入!"); textname.Text = ""; tex

19、tpassword.Text = ""; } } conn.Close(); conn.Dispose(); } private void button2_Click(object sender, EventArgs e) { Application.Exit(); } private void timer1_Tick(object sender, EventArgs e)

20、 { label4.Text = "目前时间:" + DateTime.Now.ToLongDateString() + "" + DateTime.Now.ToLongTimeString(); } } } 4.2学生成绩管理 图4.2 设计过程:  此部分关键针对学生信息管理,能够查询学生全部成绩信息,实现成绩添加、删除、修改、计算平均分等功效。还能够修改目前用户下密码。 private void Form2_Load(object sender, EventArgs e)

21、 { label1.Text = Form1.sn + "同学,欢迎你进入成绩管理系统!"; timer1.Start(); groupBox1.Visible = false; groupBox2.Visible = false; } private void button1_Click(object sender, EventArgs e) { } private void button3_Cl

22、ick(object sender, EventArgs e) { // string constr = "Password=null;Persist Security Info=True;User ID=BINIANDOUKOU\administrator;Initial Catalog=studentscore;Data Source=BINIANDOUKOU\\SQLEXPRESS"; //SqlConnection conn = new SqlConnection(constr); //con

23、n.Open(); //SqlDataAdapter da = new SqlDataAdapter("Select * from cjb where 姓名="+textBox1 .Text , conn); //DataSet ds = new DataSet(); //da.Fill(ds, "usertable"); //dataGridView1.DataSource = ; } private void toolStripButton1_Cl

24、ick(object sender, EventArgs e) { dataGridView1.Visible = true; groupBox1.Visible = false; groupBox2.Visible = false; string constr = "Password=617804;Persist Security Info=True;User ID=ywj;Initial Catalog=studentscore;Data Source=YANJING"; SqlConnecti

25、on conn = new SqlConnection(constr); conn.Open(); SqlDataAdapter da = new SqlDataAdapter("select * from cjb where 姓名='" + Form1.sn.Trim() + "'", conn);//----具体信息 DataSet ds = new DataSet(); da.Fill(ds, "usertable"); dataGridView1.DataS

26、ource = ds.Tables["usertable"].DefaultView; conn.Close(); conn.Dispose(); } private void toolStripButton2_Click(object sender, EventArgs e) { } private void toolStripButton4_Click(object sender, EventArgs e) { groupB

27、ox1.Visible = true; } private void button1_Click_1(object sender, EventArgs e) { string constr = "Password=617804;Persist Security Info=True;User ID=ywj;Initial Catalog=studentscore;Data Source=YANJING"; SqlConnection conn = new SqlConnection(cons

28、tr); conn.Open(); if (textnpd.Text != textpassword.Text) { MessageBox.Show("密码输入有误,请重新输入"); } if (textnpd.Text == "" && textpassword.Text == "") { MessageBox.Show("密码不许可为空!"); } if (textnpd.Text==textpassword.Text && textnpd.Text !="")

29、 { SqlCommand com = new SqlCommand("update dlb set 密码='" + textpassword.Text.Trim() + "'where 用户名='" + Form1.sn.Trim() + "'", conn); if (com.ExecuteNonQuery() == 1) { MessageBox.Show("密码更改成功"); groupBox1.Visible = false;

30、 } } conn.Close(); conn.Dispose(); } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { } private void toolStripButton5_Click(object sender, EventArgs e) {

31、 this.Close(); Form1 l = new Form1(); l.Visible = true; } private void toolStripButton6_Click(object sender, EventArgs e) { // string constr = "Password=null;Persist Security Info=True;User ID=BINIANDOUKOU\administrator;Initial Catalog=studentscore;Data Sourc

32、e=BINIANDOUKOU\\SQLEXPRESS"; //SqlConnection conn = new SqlConnection(constr); //conn.Open(); //SqlDataAdapter da = new SqlDataAdapter("Select * from cjb where 姓名="+textBox1 .Text , conn); //DataSet ds = new DataSet(); //da.Fill(ds, "u

33、sertable"); //string s; //for(int i=2;i <=6;i++) //{ // if (int.Parse(ds.Tables["usertable"].Rows[0][i].ToString()) <60) // s=int.Parse(ds.Tables["usertable"].Rows[0][i].ToString()); //} } private void

34、groupBox2_Enter(object sender, EventArgs e) { dataGridView1.Visible = false; groupBox1.Visible = false; } private void toolStripButton3_Click(object sender, EventArgs e) { groupBox2 .Visible=true; string constr = "Password=

35、617804;Persist Security Info=True;User ID=ywj;Initial Catalog=studentscore;Data Source=YANJING"; SqlConnection conn = new SqlConnection(constr); conn.Open(); SqlDataAdapter da = new SqlDataAdapter("Select * from cjb where 姓名='"+Form1 .sn .Trim ()+"'" , conn);

36、 DataSet ds = new DataSet(); da.Fill(ds, "usertable"); int max=0,min=1001; double ave = 0.0; for(int i=2;i <=6;i++) { if(int.Parse(ds.Tables["usertable"].Rows[0][i].ToString())>max)

37、 max=int.Parse(ds.Tables["usertable"].Rows[0][i].ToString()); if (int.Parse(ds.Tables["usertable"].Rows[0][i].ToString())

38、g(); txtlscore.Text=min.ToString(); txtall.Text=ds.Tables["usertable"].Rows[0]["总分"].ToString(); ave=int.Parse(ds.Tables["usertable"].Rows[0]["总分"].ToString())/(double)5; txtave.Text=ave.ToString(); conn.Close();conn.Dispose();

39、 } private void timer1_Tick(object sender, EventArgs e) { label2.Text="目前时间:"+DateTime.Now.ToLongDateString()+DateTime.Now.ToLongTimeString(); } 4.3老师管理界面 图4.3 设计过程:  此部分关键针对老师信息管理,能够查询学生全部成绩信息,实现成绩添加、删除、修改、成绩升序排序等功效。还能够修改目前用户下密码。 private void button1_C

40、lick(object sender, EventArgs e) //查找 { string constr = "Password=617804;Persist Security Info=True;User ID=ywj;Initial Catalog=studentscore;Data Source=YANJING"; SqlConnection conn= new SqlConnection(constr); conn.Open(); if (comboBox1.

41、Text=="学号") { SqlCommand cm=new SqlCommand("select 学号,"+Form1 .sub + "from cjb where 学号='"+ textBox1.Text+"'",conn ); if (cm.ExecuteScalar ()==null){MessageBox.Show("用户名不存在");} else { SqlDataAdapter

42、 da =new SqlDataAdapter("select 学号,"+Form1.sub+" from cjb where 学号='"+textBox1.Text+"'",conn); DataSet ds =new DataSet(); da.Fill (ds ,"chaxun"); dataGridView1.DataSource=ds.Tables["chaxun"].DefaultView; } }

43、 if (comboBox1.Text=="姓名") { SqlCommand cm=new SqlCommand("select 姓名," + Form1.sub + "from cjb where 姓名='" + textBox1.Text+"'",conn ); if (cm.ExecuteScalar()==null){MessageBox.Show("该用户不存在");} else {

44、 SqlDataAdapter da = new SqlDataAdapter("select 姓名,"+Form1.sub + " from cjb where 姓名='" + textBox1.Text + "'",conn ); DataSet ds = new DataSet(); da.Fill (ds,"table"); dataGridView1.DataSource=ds.Tables["table"].DefaultVie

45、w; } } conn.Close();conn.Dispose(); } private void textBox1_TextChanged(object sender, EventArgs e) { } private void toolStripButton2_Click(object sender, EventArgs e) //查找 { group

46、Box3 .Visible =false ; groupBox1.Enabled = true; groupBox2.Enabled = false; } private void toolStripButton1_Click(object sender, EventArgs e) //全部成绩 { groupBox3.Visible = true; string constr = "Password=617804;Persist Security Info=T

47、rue;User ID=ywj;Initial Catalog=studentscore;Data Source=YANJING"; SqlConnection conn = new SqlConnection(constr); conn.Open(); SqlDataAdapter da = new SqlDataAdapter("select 学号,姓名," + Form1.sub + " from cjb ",conn); DataSet ds = new

48、 DataSet(); da.Fill(ds, "table"); dataGridView1 .DataSource =ds.Tables ["table"].DefaultView; conn.Close ();conn .Dispose(); } private void button2_Click(object sender, EventArgs e) //修改成绩 { string constr = "Passwor

49、d=617804;Persist Security Info=True;User ID=ywj;Initial Catalog=studentscore;Data Source=YANJING"; SqlConnection conn = new SqlConnection(constr); conn.Open(); SqlCommand com = new SqlCommand("update cjb set " + Form1.sub + "='" + textBox3.Text + "'where 姓名 ='"

50、 + textBox4.Text + "'", conn); if (com.ExecuteNonQuery() == 1) { MessageBox.Show("修改成功"); } else MessageBox.Show("信息有误,请重新输入"); conn.Close(); conn.Dispose(); } private void toolStripButton3_Click(object sender, Ev

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服