基于SQL SERVER 2008实现的学生学籍管理系统


学生学籍管理系统 SQL SERVER 2008 C# 数据库课程设计
资源截图
代码片段和文件信息
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 System.Data.SqlClient;
using System.Diagnostics;  //  任务管理程序处理引用

namespace studentsystem
{
    public partial class AcademicStatus : Form
    {
        private SqlConnection myconn;
        public AcademicStatus()
        {
            myconn = new SqlConnection(studentsystem.database.Sqlconnection.connection);
            InitializeComponent();
        }

        private void scno_TextChanged(object sender EventArgs e)
        {
            myconn.Open();
            SqlCommand cmd = new SqlCommand(““myconn);
            string sql=“select * from student“;
            cmd.CommandText = sql;          
            
            if (null!=cmd.ExecuteScalar())
            {
                sql = “select SUM(所得学分)from year1 where 学号=‘“ + scno.Text.Trim() + “‘group by 学号“;
                cmd.CommandText = sql;
                if (null!=cmd.ExecuteScalar())
                {
                    grade1.Text = cmd.ExecuteScalar().ToString()+“  分“;
                }
                else grade1.Text = “0   分“;

                sql = “select SUM(所得学分)from year2 where 学号=‘“ + scno.Text.Trim() + “‘group by 学号“;
                cmd.CommandText = sql;
                if (null != cmd.ExecuteScalar())
                {
                    grade2.Text = cmd.ExecuteScalar().ToString() + “  分“;
                }
                else grade2.Text = “0   分“;

                sql = “select SUM(所得学分)from year3 where 学号=‘“ + scno.Text.Trim() + “‘group by 学号“;
                cmd.CommandText = sql;
                if (null != cmd.ExecuteScalar())
                {
                    grade3.Text = cmd.ExecuteScalar().ToString() + “  分“;
                }
                else grade3.Text = “0   分“;

                sql = “select SUM(所得学分)from year4 where 学号=‘“ + scno.Text.Trim() + “‘group by 学号“;
                cmd.CommandText = sql;
                if (null != cmd.ExecuteScalar())
                {
                    grade4.Text = cmd.ExecuteScalar().ToString() + “  分“;
                }
                else grade4.Text = “0   分“;

                string s=null;
                sql = “select 姓名 from grade where 学号=‘“ + scno.Text.Trim() + “‘“;
                cmd.CommandText = sql;
                if (null != cmd.ExecuteScalar())
                {
                    s = “姓名: “ + cmd.ExecuteScalar().ToString() + “        “;
                }               

                sql = “select SUM(所得学分)from grade where 学号=‘“ + scno.Text.Trim() + “‘group by 学号“;
                cmd.CommandText = sql;
                if (null != cmd.ExecuteScalar())
                {
                    
                    cmd.CommandText = sql;
                    string bs = cmd.ExecuteScalar().ToString();
                    in

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

     文件       5039  2010-01-11 21:38  数据库课程设计studentsystemstudentsystemAcademicStatus.cs

     文件       8418  2010-01-11 21:15  数据库课程设计studentsystemstudentsystemAcademicStatus.Designer.cs

     文件       5814  2010-01-11 21:15  数据库课程设计studentsystemstudentsystemAcademicStatus.resx

     文件       2314  2010-01-10 03:01  数据库课程设计studentsystemstudentsystemAddClass.cs

     文件       6333  2010-01-10 03:01  数据库课程设计studentsystemstudentsystemAddClass.Designer.cs

     文件       5814  2010-01-10 03:01  数据库课程设计studentsystemstudentsystemAddClass.resx

     文件       2099  2010-01-11 09:57  数据库课程设计studentsystemstudentsystemAddCourse.cs

     文件       8013  2010-01-11 09:43  数据库课程设计studentsystemstudentsystemAddCourse.Designer.cs

     文件       5814  2010-01-11 09:43  数据库课程设计studentsystemstudentsystemAddCourse.resx

     文件       2517  2010-01-11 09:25  数据库课程设计studentsystemstudentsystemAddCS.cs

     文件       8324  2010-01-11 09:23  数据库课程设计studentsystemstudentsystemAddCS.Designer.cs

     文件       5814  2010-01-11 09:23  数据库课程设计studentsystemstudentsystemAddCS.resx

     文件       2629  2010-01-13 02:48  数据库课程设计studentsystemstudentsystemAddGrade.cs

     文件       8167  2010-01-11 09:36  数据库课程设计studentsystemstudentsystemAddGrade.Designer.cs

     文件       5814  2010-01-11 09:36  数据库课程设计studentsystemstudentsystemAddGrade.resx

     文件       2535  2010-01-09 22:09  数据库课程设计studentsystemstudentsystemAddMajor.cs

     文件       8289  2010-01-09 15:55  数据库课程设计studentsystemstudentsystemAddMajor.Designer.cs

     文件       5814  2010-01-09 15:55  数据库课程设计studentsystemstudentsystemAddMajor.resx

     文件       1981  2010-01-09 15:17  数据库课程设计studentsystemstudentsystemAddRoles.cs

     文件       7847  2010-01-08 19:42  数据库课程设计studentsystemstudentsystemAddRoles.Designer.cs

     文件       5814  2010-01-08 19:37  数据库课程设计studentsystemstudentsystemAddRoles.resx

     文件       2011  2010-01-10 20:59  数据库课程设计studentsystemstudentsystemAddSchools.cs

     文件       6522  2010-01-09 11:19  数据库课程设计studentsystemstudentsystemAddSchools.Designer.cs

     文件       5814  2010-01-09 11:19  数据库课程设计studentsystemstudentsystemAddSchools.resx

     文件       3562  2010-01-09 02:07  数据库课程设计studentsystemstudentsystemAddUser.cs

     文件      10289  2010-01-09 02:07  数据库课程设计studentsystemstudentsystemAddUser.Designer.cs

     文件       5814  2010-01-09 02:07  数据库课程设计studentsystemstudentsystemAddUser.resx

     文件       1092  2010-01-12 20:34  数据库课程设计studentsystemstudentsystemapp.config

     文件     321752  2010-01-12 20:34  数据库课程设计studentsystemstudentsysteminDebugapp.publishApplication Filesstudentsystem_1_0_0_1iTunes4.ico.deploy

     文件       1092  2010-01-12 20:34  数据库课程设计studentsystemstudentsysteminDebugapp.publishApplication Filesstudentsystem_1_0_0_1studentsystem.exe.config.deploy

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

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)