• 大小: 11.33MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-10-10
  • 语言: C/C++
  • 标签: C++设计  

资源简介

一个用C++MFC写的学生成绩管理系统,功能很简单,有添加学生、输入成绩、修改成绩、查询成绩、保存成绩、删除成绩等功能,另外还有一个需求规格说明书、概要设计说明书、详细设计说明书。

资源截图

代码片段和文件信息

using 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 Library.Dao;
using System.Data.SqlClient;
using Library.Class;

namespace Student_Course_System
{
    public partial class Form1 : Form
    {
        Connection conn = new Connection();
        string sql = ““;

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            List list = new List();
            list.Add(new Items(0 “管理员登录“));
            list.Add(new Items(1 “学生登录“));
            comboBox1.DataSource = list;
            comboBox1.DisplayMember = “Text“;
            comboBox1.ValueMember = “Value“;
        }

        private void button1_Click(object sender EventArgs e)
        {
            string username = textBox1.Text;
            string password = textBox2.Text;
            if (username != ““ && password != ““)
            {
                if (Convert.ToInt32(comboBox1.SelectedValue) == 0)
                {
                    sql = “select COUNT(*) from Admin where loginName=‘“ +username+ “‘ and password=‘“ +password+ “‘;“;
                    if (conn.getRow(sql) > 0)
                    {
                        Form2 f2 = new Form2(username);
                        this.Hide();
                        f2.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show(“管理员不存在或密码错误“);
                    }
                }
                else if (Convert.ToInt32(comboBox1.SelectedValue) == 1)
                {
                    sql = “select COUNT(*) from Student where stuID=‘“ +username+ “‘ and password=‘“ +password+ “‘;“;
                    if (conn.getRow(sql) > 0)
                    {
                        Form7 f7 = new Form7(username);
                        this.Hide();
                        f7.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show(“学号未注册或密码错误“);
                    }
                }
            }
            else
            {
                MessageBox.Show(“用户名或者密码不能为空“);
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      47104  2016-05-28 17:10  学生成绩管理系统\Student_Course_System\Student_Course_System\bin\Debug\Student_Course_System.exe

     文件     105984  2016-05-28 17:10  学生成绩管理系统\Student_Course_System\Student_Course_System\bin\Debug\Student_Course_System.pdb

     文件      11600  2016-05-28 17:06  学生成绩管理系统\Student_Course_System\Student_Course_System\bin\Debug\Student_Course_System.vshost.exe

     文件        490  2012-06-06 02:06  学生成绩管理系统\Student_Course_System\Student_Course_System\bin\Debug\Student_Course_System.vshost.exe.manifest

     文件        594  2016-05-27 14:59  学生成绩管理系统\Student_Course_System\Student_Course_System\Class\Items.cs

     文件       1804  2016-05-28 17:10  学生成绩管理系统\Student_Course_System\Student_Course_System\Dao\Connection.cs

     文件       2492  2016-05-28 15:49  学生成绩管理系统\Student_Course_System\Student_Course_System\Form1.cs

     文件       4878  2016-05-27 15:06  学生成绩管理系统\Student_Course_System\Student_Course_System\Form1.Designer.cs

     文件       5817  2016-05-27 15:06  学生成绩管理系统\Student_Course_System\Student_Course_System\Form1.resx

     文件      10658  2016-05-28 16:16  学生成绩管理系统\Student_Course_System\Student_Course_System\Form2.cs

     文件      17481  2016-05-28 11:52  学生成绩管理系统\Student_Course_System\Student_Course_System\Form2.Designer.cs

     文件       5817  2016-05-28 16:16  学生成绩管理系统\Student_Course_System\Student_Course_System\Form2.resx

     文件       2434  2016-05-28 15:26  学生成绩管理系统\Student_Course_System\Student_Course_System\Form3.cs

     文件       8117  2016-05-27 18:05  学生成绩管理系统\Student_Course_System\Student_Course_System\Form3.Designer.cs

     文件       6020  2016-05-27 18:05  学生成绩管理系统\Student_Course_System\Student_Course_System\Form3.resx

     文件       3338  2016-05-28 15:35  学生成绩管理系统\Student_Course_System\Student_Course_System\Form4.cs

     文件       8913  2016-05-27 18:39  学生成绩管理系统\Student_Course_System\Student_Course_System\Form4.Designer.cs

     文件       5817  2016-05-27 18:39  学生成绩管理系统\Student_Course_System\Student_Course_System\Form4.resx

     文件       3547  2016-05-28 16:30  学生成绩管理系统\Student_Course_System\Student_Course_System\Form5.cs

     文件       7782  2016-05-28 15:07  学生成绩管理系统\Student_Course_System\Student_Course_System\Form5.Designer.cs

     文件       5817  2016-05-28 15:07  学生成绩管理系统\Student_Course_System\Student_Course_System\Form5.resx

     文件       2799  2016-05-28 15:26  学生成绩管理系统\Student_Course_System\Student_Course_System\Form6.cs

     文件       4777  2016-05-28 11:52  学生成绩管理系统\Student_Course_System\Student_Course_System\Form6.Designer.cs

     文件       5817  2016-05-28 11:52  学生成绩管理系统\Student_Course_System\Student_Course_System\Form6.resx

     文件       4469  2016-05-28 16:59  学生成绩管理系统\Student_Course_System\Student_Course_System\Form7.cs

     文件      15727  2016-05-28 16:55  学生成绩管理系统\Student_Course_System\Student_Course_System\Form7.Designer.cs

     文件       5817  2016-05-28 16:55  学生成绩管理系统\Student_Course_System\Student_Course_System\Form7.resx

     文件       2741  2016-05-28 16:39  学生成绩管理系统\Student_Course_System\Student_Course_System\Form8.cs

     文件       8902  2016-05-28 16:35  学生成绩管理系统\Student_Course_System\Student_Course_System\Form8.Designer.cs

     文件       5817  2016-05-28 16:35  学生成绩管理系统\Student_Course_System\Student_Course_System\Form8.resx

............此处省略44个文件信息

评论

共有 条评论