c#+sql 学生信息管理系统


c#+sql 组合,学生信息管理系统,包括登录模块,信息查看、添加、修改、删除等。
资源截图
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;


namespace lasttest
{
    public partial class courestudent_teacher : Form
    {
        string con = “server=.;database=Student;Integrated Security=SSPI;“;
        string sno;
        string name;
        informationteacher it;
     
        public courestudent_teacher(string snostring nameinformationteacher it)
        {
            InitializeComponent();
            
            datacoure.DataSource = bindingSource1;
            
            this.Text =“学生选课信息“;
            this.it = it;
            DataSet ret = new DataSet();
            using (SqlConnection cnn = new SqlConnection(con))
            {
                cnn.Open();
                string queryString = “select student.sno as 学号  sname as 姓名sclass as 班级 course.cno as 课程号码cname as 课程名cteacher as 授课教师grade as 成绩 from coursesc student where student.sno=‘“ + sno +“‘ and course.cno=sc.cno and student.sno=sc.sno“;
                SqlDataAdapter ad = new SqlDataAdapter();
                SqlCommand com = new SqlCommand(queryString cnn);
                com.CommandType = CommandType.Text;
                ad.SelectCommand = com;
                ad.Fill(ret);

                this.sno = sno;
                this.name =name;
            }
            bindingSource1.DataSource = ret.Tables[0];
            
        }

        private void DataBind()
        {
            DataSet ret = new DataSet();
            using (SqlConnection cnn = new SqlConnection(con))
            {
                cnn.Open();
                string queryString = “select student.sno as 学号  sname as 姓名sclass as 班级 course.cno as 课程号码cname as 课程名cteacher as 授课教师grade as 成绩 from coursesc student where student.sno=‘“ + sno + “‘ and course.cno=sc.cno and student.sno=sc.sno“;
                SqlDataAdapter ad = new SqlDataAdapter();
                SqlCommand com = new SqlCommand(queryString cnn);
                com.CommandType = CommandType.Text;
                ad.SelectCommand = com;
                ad.Fill(ret);

            }
            bindingSource1.DataSource = ret.Tables[0];
        }

        private void courestudent_Load(object sender EventArgs e)
        {
            lablesno.Enabled = false;
            txtcon.Enabled = false;
            labgrade.Enabled = false;
            txtgrade.Enabled = false;
            btnsure.Enabled = false;
            lablesno.Enabled = false;
            txtsno.Enabled = false;
        }



       

        private void datacoure_CellDoubleClick(object sender DataGridViewCellEventArgs e)
        {

        }

        private void btnsure_Click(object sender EventArgs e)
        {
            using (SqlConnection cnn = new SqlConnection(con))
            {
                cnn.O

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

     文件        395  2010-12-29 14:47  lasttestlasttestapp.config

     文件     585728  2011-05-24 17:42  lasttestlasttestinDebuglasttest.exe

     文件        395  2010-12-29 14:47  lasttestlasttestinDebuglasttest.exe.config

     文件     255488  2011-05-24 17:42  lasttestlasttestinDebuglasttest.pdb

     文件      14328  2011-05-28 15:44  lasttestlasttestinDebuglasttest.vshost.exe

     文件        395  2010-12-29 14:47  lasttestlasttestinDebuglasttest.vshost.exe.config

     文件        490  2009-06-11 05:14  lasttestlasttestinDebuglasttest.vshost.exe.manifest

     文件       8272  2010-12-29 16:49  lasttestlasttestcourestudent.cs

     文件      11833  2010-12-29 15:23  lasttestlasttestcourestudent.Designer.cs

     文件       6215  2010-12-29 15:23  lasttestlasttestcourestudent.resx

     文件      97886  2011-05-24 17:29  lasttestlasttesthydlbj1.jpg

     文件       3538  2010-12-29 16:35  lasttestlasttestinformationchange.cs

     文件      15073  2010-12-29 16:34  lasttestlasttestinformationchange.Designer.cs

     文件       5814  2010-12-29 16:34  lasttestlasttestinformationchange.resx

     文件       6463  2011-05-24 16:27  lasttestlasttestInformationstudent.cs

     文件      14202  2011-05-24 16:15  lasttestlasttestInformationstudent.Designer.cs

     文件       6215  2011-05-24 16:15  lasttestlasttestInformationstudent.resx

     文件      10062  2011-05-24 16:52  lasttestlasttestinformationteacher.cs

     文件      16309  2011-05-24 16:44  lasttestlasttestinformationteacher.Designer.cs

     文件       6215  2011-05-24 16:44  lasttestlasttestinformationteacher.resx

     文件       7546  2011-05-24 17:41  lasttestlasttestlasttest.csproj

     文件       4479  2011-05-24 17:38  lasttestlasttestLogin.cs

     文件       6024  2011-05-24 17:37  lasttestlasttestLogin.Designer.cs

     文件     211927  2010-12-28 13:28  lasttestlasttestlogin.jpg

     文件       5814  2011-05-24 17:37  lasttestlasttestLogin.resx

     文件        180  2011-05-24 17:41  lasttestlasttestobjDebuglasttest.courestudent_teacher.resources

     文件       7115  2011-05-28 15:44  lasttestlasttestobjDebuglasttest.csproj.FileListAbsolute.txt

     文件       1616  2011-05-24 17:39  lasttestlasttestobjDebuglasttest.csproj.GenerateResource.Cache

     文件     585728  2011-05-24 17:42  lasttestlasttestobjDebuglasttest.exe

     文件        180  2011-05-24 17:41  lasttestlasttestobjDebuglasttest.informationchange.resources

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

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

发表评论

评论列表(条)