77范文网 - 专业文章范例文档资料分享平台

学生成绩管理系统设计说明书(5)

来源:网络收集 时间:2019-04-15 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

重庆三峡学院

{

InitializeComponent(); }

//显示所有相应表格的数据s

public void ShowAllData(string type) {

DataSet set;

if (type == \学生\ {

Student stu = new Student(); set = stu.selectAll();

dataGridView1.DataSource = set;

dataGridView1.DataMember = \ }

else if (type == \班级\ {

Classinfo cla = new Classinfo(); set = cla.selectAll();

dataGridView2.DataSource = set;

dataGridView2.DataMember = \ }

else if (type == \课程\ {

Course cou = new Course(); set = cou.selectAll();

dataGridView3.DataSource = set;

dataGridView3.DataMember = \ }

else if (type == \成绩\ {

Score sco = new Score(); set = sco.selectAll();

dataGridView4.DataSource = set;

dataGridView4.DataMember = \ } }

private void button_edit_stu_Click(object sender, EventArgs e) {

if (MessageBox.Show(this, \要修改所选记录吗?\请确认\ MessageBoxButtons.YesNo, MessageBoxIcon.Question,

MessageBoxDefaultButton.Button1,

共 42 页 第 20 页

重庆三峡学院

MessageBoxOptions.RightAlign) == DialogResult.No) return;

Student stu = new Student();

stu.update(modifyStudnetno, modifyStudnetname, modifySex, modifyBirth, modifyAtive, modifyAddress); }

private void button_edit_class_Click(object sender, EventArgs e) {

if (MessageBox.Show(this, \要修改所选记录吗?\请确认\ MessageBoxButtons.YesNo, MessageBoxIcon.Question,

MessageBoxDefaultButton.Button1,

MessageBoxOptions.RightAlign) == DialogResult.No) return;

Classinfo cla = new Classinfo(); cla.update(modifyClassno, modifyDepart, modifySpecical, modifyEntertime); }

private void button_edit_course_Click(object sender, EventArgs e) {

if (MessageBox.Show(this, \要修改所选记录吗?\请确认\ MessageBoxButtons.YesNo, MessageBoxIcon.Question,

MessageBoxDefaultButton.Button1,

MessageBoxOptions.RightAlign) == DialogResult.No) return;

Course cou = new Course();

cou.update(modifyCourseno, modifyCoursename, modifyCoursetype, modifyCcoursehours, modifyCredit); }

private void button_edit_score_Click(object sender, EventArgs e) {

if (MessageBox.Show(this, \要修改所选记录吗?\请确认\ MessageBoxButtons.YesNo, MessageBoxIcon.Question,

MessageBoxDefaultButton.Button1,

MessageBoxOptions.RightAlign) == DialogResult.No) return;

共 42 页 第 21 页

modifyStudyears, modifyOpenterm, 重庆三峡学院

Score sco = new Score();

sco.update(modifyStudnetno, modifyCourseno, modifyScore); }

private void ModifyForm_Load(object sender, EventArgs e) {

ShowAllData(\学生\ }

private void tabControl2_Selected(object sender, TabControlEventArgs e) {

if (e.TabPage == tabPage5) {

ShowAllData(\学生\ }

else if (e.TabPage == tabPage6) {

ShowAllData(\班级\ }

else if (e.TabPage == tabPage7) {

ShowAllData(\课程\ }

else if (e.TabPage == tabPage8) {

ShowAllData(\成绩\ } }

private void dataGridView1_CellValidated(object sender, DataGridViewCellEventArgs e) {

modifyStudnetno = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString(); modifyStudnetname = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString(); modifySex = dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString(); modifyBirth = dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString(); modifyAtive = dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString(); modifyAddress = dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString(); }

private void dataGridView2_CellValidated(object sender, DataGridViewCellEventArgs e) {

modifyClassno = dataGridView2.Rows[e.RowIndex].Cells[0].Value.ToString(); modifyDepart = dataGridView2.Rows[e.RowIndex].Cells[1].Value.ToString();

共 42 页 第 22 页

重庆三峡学院

modifySpecical = dataGridView2.Rows[e.RowIndex].Cells[2].Value.ToString(); modifyStudyears = dataGridView2.Rows[e.RowIndex].Cells[3].Value.ToString(); modifyEntertime = dataGridView2.Rows[e.RowIndex].Cells[4].Value.ToString(); }

private void dataGridView3_CellValidated(object sender, DataGridViewCellEventArgs e) {

modifyCourseno = dataGridView3.Rows[e.RowIndex].Cells[0].Value.ToString(); modifyCoursename = dataGridView3.Rows[e.RowIndex].Cells[1].Value.ToString(); modifyCoursetype = dataGridView3.Rows[e.RowIndex].Cells[2].Value.ToString(); modifyOpenterm = dataGridView3.Rows[e.RowIndex].Cells[3].Value.ToString(); modifyCcoursehours = dataGridView3.Rows[e.RowIndex].Cells[4].Value.ToString(); modifyCredit = dataGridView3.Rows[e.RowIndex].Cells[5].Value.ToString(); }

private void dataGridView4_CellValidated(object sender, DataGridViewCellEventArgs e) {

modifyStudnetno = dataGridView4.Rows[e.RowIndex].Cells[0].Value.ToString(); modifyCourseno = dataGridView4.Rows[e.RowIndex].Cells[1].Value.ToString(); modifyScore = dataGridView4.Rows[e.RowIndex].Cells[2].Value.ToString(); } } }

1.4信息查询模块

using System;

using System.Collections.Generic; using System.Text; using System.Data;

using System.Data.OleDb; using System.IO;

using System.Windows.Forms;

namespace StudentManagerSys {

public partial class SearchForm : Form {

public SearchForm() {

InitializeComponent(); }

private void button_search_stu_Click(object sender, EventArgs e)

共 42 页 第 23 页

重庆三峡学院

{

string type = comboBox1.Text; string item = textBox1.Text; Student stu = new Student();

DataSet dstu = stu.select(type, item); dataGridView1.DataSource = dstu;

dataGridView1.DataMember = \ }

private void button_search_cla_Click(object sender, EventArgs e) {

string type = comboBox2.Text; string item = textBox2.Text; Classinfo cla = new Classinfo(); DataSet dcla = cla.select(type, item); dataGridView2.DataSource = dcla;

dataGridView2.DataMember = \ }

private void button_search_cou_Click(object sender, EventArgs e) {

string type = comboBox3.Text; string item = textBox3.Text; Course cou = new Course();

DataSet dcou = cou.select(type, item); dataGridView3.DataSource = dcou; dataGridView3.DataMember = \ }

private void button_search_sco_Click(object sender, EventArgs e) {

string studnetno = textBox5.Text; string courseno = textBox4.Text; Score sco = new Score();

DataSet dsco = sco.select(\ dataGridView4.DataSource = dsco; dataGridView4.DataMember = \ }

private void button1_Click(object sender, EventArgs e) {

Score sco = new Score();

共 42 页 第 24 页

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库学生成绩管理系统设计说明书(5)在线全文阅读。

学生成绩管理系统设计说明书(5).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/596749.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: