资源简介

学生学籍信息管理系统,应用ASP编写,适合初学者学习、借鉴,基于VS平台

资源截图

代码片段和文件信息

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 StudentMM
{
    public partial class Main : Form
    {
        public Main()
        {
            InitializeComponent();
        }


        private void enter_Click(object sender EventArgs e)
        {
            string source=““;
            if (manager.Checked == true)
            {
                STUid.Text = “用户名“;
                if (textBox1.Text == ““ || textBox2.Text == ““)
                    MessageBox.Show(“用户名或密码为空!“);
                else if (textBox1.Text != “guanliyuan“ || textBox2.Text != “xjgl“)
                    MessageBox.Show(“用户名或密码错误!“);
                else
                {
                    Manager mana = new Manager();
                    this.Hide();
                    mana.ShowDialog();
                    textBox1.Text = ““;
                    textBox2.Text = ““;
                    this.Show();

                }
            }
            else
            {
                STUid.Text = “学号“;
                if (textBox1.Text == ““)
                    MessageBox.Show(“学号为空!“);
                else
                {
                    source = textBox1.Text;
                    SqlConnection conn = new SqlConnection(@“data source=.;Integrated Security=SSPI;database=student“);

                    try
                    {

                        source = “select * from S where StuId=“ + source;
                        textBox2.Text = source;

                        conn.Open();
                        SqlCommand cmd = conn.CreateCommand();
                        cmd.CommandType = CommandType.Text;
                        cmd.CommandText = source;
                        //cmd.CommandText = source;
                        SqlDataReader dr = cmd.ExecuteReader();
                        if (!dr.HasRows)
                        {
                            MessageBox.Show(“该学号不存在!“);
                        }
                        else
                        {

                            stusearch stu = new stusearch(textBox1.Text);
                       

                            this.Hide();
                            stu.ShowDialog();
                            textBox1.Text = ““;
                            textBox1.Text = ““;
                            this.Show();

                        }
                    }
                    catch (System.Data.SqlClient.SqlException ex)
                    {
                        MessageBox.Show(“数据库的操作出现错误!“ + ex);
                    }
                    finally
                    {
                        conn.Close();
                    }
                }
            }

            }
        }
    }

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

     文件        916  2006-10-28 01:14  学生学籍管理系统\StudentMM.sln

    ..A..H.     26112  2006-11-07 13:14  学生学籍管理系统\StudentMM.suo

    ..A..H.      7168  2006-11-07 12:57  学生学籍管理系统\Student.suo

     文件        393  2006-10-28 01:19  学生学籍管理系统\StudentMM\app.config

     文件      12509  2006-11-05 01:15  学生学籍管理系统\StudentMM\Manager.cs

     文件      32026  2006-11-05 01:15  学生学籍管理系统\StudentMM\Manager.Designer.cs

     文件     143920  2006-11-05 01:15  学生学籍管理系统\StudentMM\Manager.resx

     文件        467  2006-10-28 01:15  学生学籍管理系统\StudentMM\Program.cs

     文件         38  2006-11-05 01:20  学生学籍管理系统\StudentMM\ReadMe.txt

     文件     169805  2006-11-05 00:20  学生学籍管理系统\StudentMM\studentDataSet.Designer.cs

     文件        381  2006-11-05 00:20  学生学籍管理系统\StudentMM\studentDataSet.xsc

     文件      52960  2006-11-05 00:20  学生学籍管理系统\StudentMM\studentDataSet.xsd

     文件       1451  2006-11-05 00:20  学生学籍管理系统\StudentMM\studentDataSet.xss

     文件     163485  2006-10-28 04:45  学生学籍管理系统\StudentMM\studentDataSet1.Designer.cs

     文件          3  2006-10-28 04:45  学生学籍管理系统\StudentMM\studentDataSet1.xsc

     文件      49778  2006-10-28 04:45  学生学籍管理系统\StudentMM\studentDataSet1.xsd

     文件          3  2006-10-28 04:45  学生学籍管理系统\StudentMM\studentDataSet1.xss

     文件     222353  2006-11-05 00:31  学生学籍管理系统\StudentMM\studentDataSet2.Designer.cs

     文件        381  2006-11-05 00:31  学生学籍管理系统\StudentMM\studentDataSet2.xsc

     文件      60836  2006-11-05 00:31  学生学籍管理系统\StudentMM\studentDataSet2.xsd

     文件       2051  2006-11-05 00:31  学生学籍管理系统\StudentMM\studentDataSet2.xss

     文件       6148  2006-11-07 13:05  学生学籍管理系统\StudentMM\StudentMM.csproj

     文件        919  2006-10-28 04:25  学生学籍管理系统\StudentMM\StudentMM.csproj.user

     文件      30112  2006-11-07 13:00  学生学籍管理系统\StudentMM\Main.Designer.cs

     文件     206027  2006-11-07 13:00  学生学籍管理系统\StudentMM\Main.resx

     文件      15693  2006-11-07 13:07  学生学籍管理系统\StudentMM\stusearch.Designer.cs

     文件     113864  2006-11-07 13:07  学生学籍管理系统\StudentMM\stusearch.resx

     文件       2997  2006-11-07 13:11  学生学籍管理系统\StudentMM\Main.cs

     文件       5295  2006-11-07 13:12  学生学籍管理系统\StudentMM\stusearch.cs

     文件       1166  2006-10-28 01:14  学生学籍管理系统\StudentMM\Properties\AssemblyInfo.cs

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

评论

共有 条评论