欢迎来到冰点文库! | 帮助中心 分享价值,成长自我!
冰点文库
全部分类
  • 临时分类>
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • ImageVerifierCode 换一换
    首页 冰点文库 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    学生成绩管理系统课程设计源程序.docx

    • 资源ID:135260       资源大小:20.89KB        全文页数:47页
    • 资源格式: DOCX        下载积分:3金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要3金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    学生成绩管理系统课程设计源程序.docx

    1、学生成绩管理系统课程设计源程序关于About.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Reflection;namespace 学生成绩管理系统 public partial class About : Form public About() Initial

    2、izeComponent(); private void button1_Click(object sender, EventArgs e) this.Close(); private void About_Load(object sender, EventArgs e) 添加课程信息AddCourse.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.T

    3、ext;using System.Windows.Forms;using MySql.Data.MySqlClient;namespace 学生成绩管理系统 public partial class AddCourse : Form public AddCourse() InitializeComponent(); private void btnExit_Click(object sender, EventArgs e) this.Close(); private void btnAddCourse_Click(object sender, EventArgs e) string myCon

    4、nectionString = Database=student;Data Source=localhost;User Id=root;Password=k6smile20xq; MySqlConnection mycn = new MySqlConnection(myConnectionString); mycn.Open(); string sql; Course course = new Course(); course.Cno = txtCno.Text; course.Cname = txtCname.Text; try sql = select count(*) from cour

    5、se where cno= + txtCno.Text + ; MySqlCommand mycm = new MySqlCommand(sql, mycn); MySqlDataReader msdr = mycm.ExecuteReader(); msdr.Read(); int stuCount = msdr.GetInt32(count(*); msdr.Close(); if (stuCount = 0 & txtCname.Text != & txtCno.Text != ) sql = insert into course(cno,cname)values( + course.C

    6、no + , + course.Cname + ); MySqlCommand mycm1 = new MySqlCommand(sql, mycn); try mycm1.ExecuteNonQuery(); catch (Exception exception) MessageBox.Show(exception.Message); return; finally mycn.Close(); MessageBox.Show(添加成功!); else if (stuCount = 1 & txtCno.Text != & txtCname.Text != ) /这里需要关闭资源 Messag

    7、eBox.Show(该课程的信息已存在,请重新输入!); else /这里需要关闭资源 MessageBox.Show(请输入要添加的信息); msdr.Close(); mycn.Close(); catch (Exception a) Console.WriteLine(a.ToString(); finally txtCno.Text = ; txtCname.Text = ; private void AddCourse_Load(object sender, EventArgs e) 添加学生信息AddStudent.csusing System;using System.Colle

    8、ctions.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using MySql.Data.MySqlClient;using System.IO;namespace 学生成绩管理系统 public partial class AddStudent : Form public AddStudent() InitializeComponent(); private v

    9、oid AddStudent_Load(object sender, EventArgs e) private void btnCancel_Click(object sender, EventArgs e) this.Close(); private void btnAddStudent_Click(object sender, EventArgs e) string myConnectionString = Database=student;Data Source=localhost;User Id=root;Password=k6smile20xq; MySqlConnection my

    10、cn = new MySqlConnection(myConnectionString); mycn.Open(); string sql; /int stuNum = Select count(id) from Student stu = new Student(); stu.Sno = txtSno.Text; stu.Sname = txtName.Text; stu.Age = txtAge.Text; stu.ClassName = txtClassName.Text; stu.Password = txtPassword.Text; stu.Id = txtId.Text; if

    11、(rbStuGirl.Checked) stu.Sex = 女?; else if (rbStuBoy.Checked) stu.Sex = 男D; /if (rbStuGirl.Checked) stu.Sex = girl; /else if (rbStuBoy.Checked) stu.Sex = boy; try sql = select count(*) from student where sno= + txtSno.Text + ; MySqlCommand mycm = new MySqlCommand(sql, mycn); MySqlDataReader msdr = my

    12、cm.ExecuteReader(); msdr.Read(); int stuCount = msdr.GetInt32(count(*); msdr.Close(); if (stuCount = 0 & txtSno.Text != & txtName.Text != & txtAge.Text != & txtClassName.Text != & txtPassword.Text != & txtId.Text != ) sql = insert into student(sno, sname,sex,age,classname,password,id)values( + stu.S

    13、no + , + stu.Sname + , + stu.Sex + , + stu.Age + , + stu.ClassName + , + stu.Password + , + stu.Id + ); Console.WriteLine(sql); MySqlCommand mycm1 = new MySqlCommand(sql, mycn); try mycm1.ExecuteNonQuery(); catch (Exception exception) MessageBox.Show(exception.Message); return; finally msdr.Close();

    14、 mycn.Close(); MessageBox.Show(添?加?成?功|!?); else if (stuCount = 1 & txtSno.Text != & txtName.Text != & txtAge.Text != & txtClassName.Text != & txtPassword.Text != & txtId.Text != ) /这里需要关闭资源 MessageBox.Show(该学生的信息已存在); else /这里需要关闭资源 MessageBox.Show(请输入要添加的信息); msdr.Close(); mycn.Close(); catch (Exc

    15、eption a) Console.WriteLine(a.ToString(); finally txtSno.Text = ; txtName.Text = ; txtAge.Text = ; txtClassName.Text = ; txtPassword.Text = ; txtId.Text = ; 主窗口程序AdminWindou.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using Syste

    16、m.Linq;using System.Text;using System.Windows.Forms;namespace 学生成绩管理系统 public partial class AdminWindow : Form public AdminWindow() InitializeComponent(); private void AdminWindow_Load(object sender, EventArgs e) private void 查询学生信息ToolStripMenuItem2_Click(object sender, EventArgs e) new SearchStude

    17、nt().ShowDialog(); private void 添加学生信息ToolStripMenuItem3_Click(object sender, EventArgs e) new AddStudent().ShowDialog(); private void 修改学生信息ToolStripMenuItem3_Click(object sender, EventArgs e) new UpdateStudent().ShowDialog(); private void 删除学生信息ToolStripMenuItem3_Click(object sender, EventArgs e)

    18、new DeleteStudent().ShowDialog(); private void 查询课程信息ToolStripMenuItem2_Click(object sender, EventArgs e) new SearchCourse().ShowDialog(); private void 添加课程信息ToolStripMenuItem3_Click(object sender, EventArgs e) new AddCourse().ShowDialog(); private void 修改学生信息ToolStripMenuItem3_Click(object sender,

    19、EventArgs e) new UpdateCourse().ShowDialog(); private void 删除课程信息ToolStripMenuItem3_Click(object sender, EventArgs e) new DeleteCourse().ShowDialog(); private void 关于ToolStripMenuItem2_Click(object sender, EventArgs e) new About().ShowDialog(); private void 退出系统ToolStripMenuItem2_Click(object sender

    20、, EventArgs e) Application.Exit(); private void 排名ToolStripMenuItem1_Click(object sender, EventArgs e) new CourseRank().ShowDialog(); private void 查询学生成绩ToolStripMenuItem2_Click(object sender, EventArgs e) new ScoreSearch().ShowDialog(); private void 各班平均分ToolStripMenuItem2_Click(object sender, Even

    21、tArgs e) new ClassAvg().ShowDialog(); private void 各科平均分ToolStripMenuItem2_Click(object sender, EventArgs e) new CourseAvg().ShowDialog(); 班级平均成绩查询ClassAvg.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using Syste

    22、m.Text;using System.Windows.Forms;using MySql.Data.MySqlClient;namespace 学生成绩管理系统 public partial class ClassAvg : Form public ClassAvg() InitializeComponent(); private void ClassAvg_Load(object sender, EventArgs e) private void btnsearch_Click(object sender, EventArgs e) string bjmc = txtbjmc.Text;

    23、using (MySqlConnection conn = new MySqlConnection(Database=student;Data Source=localhost;User Id=root;Password=k6smile20xq) conn.Open(); using (MySqlCommand cmd = conn.CreateCommand() cmd.CommandText = select avg(score) from scoreinfi where classname=bjmc; cmd.Parameters.Add(new MySqlParameter(bjmc,

    24、bjmc); string bjavg=Convert.ToString(cmd.ExecuteScalar(); txtbjavg.Text = bjavg; private void btncancle_Click(object sender, EventArgs e) this.Close(); 单科平均成绩CourseAvg.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq

    25、;using System.Text;using System.Windows.Forms;using MySql.Data.MySqlClient;namespace 学生成绩管理系统 public partial class CourseAvg : Form public CourseAvg() InitializeComponent(); private void btnquery_Click(object sender, EventArgs e) string courseid = txtcourseid.Text; string coursename = txtcoursename.

    26、Text; using (MySqlConnection conn = new MySqlConnection(Database=student;Data Source=localhost;User Id=root;Password=k6smile20xq) conn.Open(); using (MySqlCommand cmd = conn.CreateCommand() cmd.CommandText = select avg(score) as avg from scoreinfi where cname=coursename; cmd.Parameters.Add(new MySql

    27、Parameter(coursename,coursename); /* DataSet dataset = new DataSet(); MySqlDataAdapter adapter = new MySqlDataAdapter(cmd); adapter.Fill(dataset); DataTable table = dataset.Tables0; for(int i=0;itable.Rows.Count;i+) DataRow row=table.Rowsi; txtavg.Text=Convert.ToString(rowavg); */ txtavg.Text=Conver

    28、t.ToString(cmd.ExecuteScalar(); private void CourseAvg_Load(object sender, EventArgs e) private void btnexit_Click(object sender, EventArgs e) this.Close(); 单科成绩排名CourseRank.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using MySql.Data.MySqlClient;namespace 学生成绩管理系统 public partial class CourseRank : Form public CourseRank() InitializeComponent(); private void Form1_Load(object sender, EventArgs e) / this


    注意事项

    本文(学生成绩管理系统课程设计源程序.docx)为本站会员主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 冰点文库 网站版权所有

    经营许可证编号:鄂ICP备19020893号-2


    收起
    展开