• 大小: 1.48MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-24
  • 语言: 其他
  • 标签: WindowsForm  

资源简介

教程地址:http://blog.csdn.net/baidu_20163013/article/details/50451115 一个高校网上选课数据库系统,使用Windows Form桌面应用开发,功能简要如下: (1) 系统用户由三类组成:教师、学生和管理员。 (2) 管理员负责的主要功能: ① 用户管理(老师、学生及管理员的增、删、改); ② 课程管理(添加、删除和修改); ③ 选课管理(实现选课功能开放和禁止、老师成绩输入开放和禁止)。 (3) 学生通过登录,可以查询课程的基本信息、实现选课、退课和成绩查询; (4) 老师通过登录,可以查看选课学生的基本信息,可以输入成绩。

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;

namespace SSMS
{
    class Data
    {
        public static int classCount;
        public static bool ok = false;
        public static string[] s = new string[100];
        public static string connectionString = “server=WB-PC\\testDB;database=ASchool;Integrated Security=True“;

        public static string loginID;

        //Login表的表名,列名
        public static string t_login = “Login“;
        public static string c_login_username = “userID“;
        public static string c_login_password = “password“;
        public static string c_login_role = “role“;

        //SC表的表名,列名
        public static string t_sc = “SC“;
        public static string c_sc_snum = “snum“;
        public static string c_sc_cnum = “cnum“;
        public static string c_sc_score = “score“;

        //TableCourse表的表名,列名
        public static string t_course = “TableCourse“;
        public static string c_course_cnum = “cnum“;
        public static string c_course_cname = “cname“;
        public static string c_course_tnum = “tnum“;

        //TableStudent表的表名,列名
        public static string t_student = “TableStudent“;
        public static string c_student_snum = “snum“;
        public static string c_student_sname = “sname“;
        public static string c_student_sclass = “sclass“;

        //TableTeacher表的表名,列名
        public static string t_teacher = “TableTeacher“;
        public static string c_teacher_tnum = “tnum“;
        public static string c_teacher_tname = “tname“;
        public static string c_teacher_cname = “cname“;
        public static string c_teacher_cnum = “cnum“;

        //Enroll表的表名,列名 选课开关
        public static string t_enroll = “Enroll“;
        public static string c_enroll_switch = “switch“;

        //两个视图的名称
        public static string v_score = “S_C_Score_View“;
        public static string v_class = “Class_View“;

        //DeleteStudent存储过程 名称、参数
        public static string sp_delStudent = “spDeleteStudent“;
        public static string sp_delStudent_para = “@snum“;

        //DeleteTeacher存储过程 名称、参数
        public static string sp_delTeacher = “spDeleteTeacher“;
        public static string sp_delTeacher_para = “@tnum“;


        /// 
        /// 自动调整列宽,以适应表格大小
        /// 

        /// 需要被调整的DataGridView对象
        public static void columnAutoAdapter(DataGridView dv)
        {
            int totalWidth = 0;
            for (int i = 0; i < dv.Columns.Count; i++)
            {
                totalWidth += dv.Columns[i].Width;//记录整个DataGridView的宽度
            }
            for (int i = 0; i < dv.Columns.Count; i++)
            {
                dv.Columns[i].FillWeight = (dv.Columns[i].Width * 100) / totalWidth;
            }
            dv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
        }


        /// 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-01-03 18:27  StudentScoreManagementSystem\
     文件     3145728  2016-01-03 18:27  StudentScoreManagementSystem\School.mdf
     文件     1048576  2016-01-03 18:27  StudentScoreManagementSystem\School_log.ldf
     目录           0  2015-12-24 14:09  StudentScoreManagementSystem\SSMS\
     文件         981  2015-12-16 16:15  StudentScoreManagementSystem\SSMS\SSMS.sln
     文件       78848  2016-01-03 18:26  StudentScoreManagementSystem\SSMS\SSMS.v12.suo
     目录           0  2016-01-03 18:26  StudentScoreManagementSystem\SSMS\SSMS\
     文件         187  2015-12-16 16:15  StudentScoreManagementSystem\SSMS\SSMS\App.config
     目录           0  2015-12-24 14:09  StudentScoreManagementSystem\SSMS\SSMS\bin\
     目录           0  2015-12-28 08:36  StudentScoreManagementSystem\SSMS\SSMS\bin\Debug\
     文件       49664  2016-01-03 18:17  StudentScoreManagementSystem\SSMS\SSMS\bin\Debug\SSMS.exe
     文件         187  2015-12-16 16:15  StudentScoreManagementSystem\SSMS\SSMS\bin\Debug\SSMS.exe.config
     文件      110080  2016-01-03 18:17  StudentScoreManagementSystem\SSMS\SSMS\bin\Debug\SSMS.pdb
     文件       23168  2016-01-03 14:51  StudentScoreManagementSystem\SSMS\SSMS\bin\Debug\SSMS.vshost.exe
     文件         187  2015-12-16 16:15  StudentScoreManagementSystem\SSMS\SSMS\bin\Debug\SSMS.vshost.exe.config
     文件         490  2013-03-18 17:00  StudentScoreManagementSystem\SSMS\SSMS\bin\Debug\SSMS.vshost.exe.manifest
     目录           0  2015-12-16 16:16  StudentScoreManagementSystem\SSMS\SSMS\bin\Release\
     文件        7496  2016-01-03 13:34  StudentScoreManagementSystem\SSMS\SSMS\Data.cs
     文件         933  2016-01-03 16:13  StudentScoreManagementSystem\SSMS\SSMS\frmAddCourse.cs
     文件        5046  2015-12-27 18:52  StudentScoreManagementSystem\SSMS\SSMS\frmAddCourse.Designer.cs
     文件        5817  2015-12-27 18:53  StudentScoreManagementSystem\SSMS\SSMS\frmAddCourse.resx
     文件        1673  2016-01-03 16:16  StudentScoreManagementSystem\SSMS\SSMS\frmAddStudent.cs
     文件        5144  2015-12-25 17:39  StudentScoreManagementSystem\SSMS\SSMS\frmAddStudent.Designer.cs
     文件        5817  2015-12-25 17:39  StudentScoreManagementSystem\SSMS\SSMS\frmAddStudent.resx
     文件        3093  2016-01-03 16:16  StudentScoreManagementSystem\SSMS\SSMS\frmAddTea.cs
     文件        6809  2015-12-27 11:44  StudentScoreManagementSystem\SSMS\SSMS\frmAddTea.Designer.cs
     文件        5817  2015-12-27 11:44  StudentScoreManagementSystem\SSMS\SSMS\frmAddTea.resx
     文件       17608  2016-01-03 18:26  StudentScoreManagementSystem\SSMS\SSMS\frmAdmin.cs
     文件       26929  2015-12-28 18:40  StudentScoreManagementSystem\SSMS\SSMS\frmAdmin.Designer.cs
     文件        5817  2015-12-28 18:40  StudentScoreManagementSystem\SSMS\SSMS\frmAdmin.resx
     文件        2347  2016-01-03 16:37  StudentScoreManagementSystem\SSMS\SSMS\frmEnroll.cs
............此处省略49个文件信息

评论

共有 条评论