• 大小: 13.83MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-19
  • 语言: 其他
  • 标签: .NET教  统源码  

资源简介

.NET教室管理系统源码

资源截图

代码片段和文件信息

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;

namespace classroom
{
    public partial class apply : Form
    {
       public apply()
        {
            InitializeComponent();
        }
       string Unumber;
       private void apply_Load(object sender EventArgs e) //加载该窗体时进行的操作,将用户的用户名从数据库中提取出来
        {

          //  MessageBox.Show(“Unumber“+Unumber);
            lblNumber.Text = Unumber;
            string connString = @“Data Source=.;Initial Catalog=pass;Integrated Security=True“;
            SqlConnection connection = new SqlConnection(connString);
            SqlCommand sqlCommand = connection.CreateCommand();
            sqlCommand.CommandText = String.Format(“select * from Username where  Unumber=‘{0}‘“ lblNumber.Text);
            connection.Open();
            //SqlCommand command = new SqlCommand(sql connection);
            //command.ExecuteNonQuery();
            SqlDataAdapter sda = new SqlDataAdapter(sqlCommand);
            DataTable dt = new DataTable();
            sda.Fill(dt);
            foreach (DataRow dr in dt.Rows)
            {
                lblName.Text = dr[“Uname“].ToString();
                connection.Close();// 关闭数据库连接
                connection.Dispose();
            }
      
        }

       public void number(string i)
       {
           Unumber = i;
       }
      
       private void btnApply_Click(object sender EventArgs e)                     //教室申请事件,根据相应约束判断信息是否符合格式,若符合格式,添加教室申请
       {
           if (Convert.ToInt32(txtWno.Text) <= 0 || Convert.ToInt32(txtWno.Text) > 22)//判断周次格式
               MessageBox.Show(“周次要小于23大于0“ “出错!“ MessageBoxButtons.OK MessageBoxIcon.Exclamation);
           else {
              
               if (Convert.ToInt32(txtDno.Text) <= 0 || Convert.ToInt32(txtDno.Text) > 7)//判断周几格式
                  
                   MessageBox.Show(“周几要小于8大于0“ “出错!“ MessageBoxButtons.OK MessageBoxIcon.Exclamation);
               else
               {
                   if (Convert.ToInt32(txtTno.Text) <= 0 || Convert.ToInt32(txtTno.Text) >= 7)//判断时段格式
                       MessageBox.Show(“时段要小于7大于0“ “出错!“ MessageBoxButtons.OK MessageBoxIcon.Exclamation);
                   else
                   {
                       if (txtCno.Text == ““ || txtWno.Text == ““ || txtDno.Text == ““ || txtTno.Text == ““ || txtUway.Text == ““ || cboUno.Text == ““)//判断输入项是否为空
                           MessageBox.Show(“错误输入项不能为空,请重新输入“ “错误“ MessageBoxButtons.OK MessageBoxIcon.Error);
                       else
                       {                                                                                                     //判断是否存在该教室
                           string connString = @“Data Source=.;Initial Catalog=classroom;Integrated Security

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

     文件       9199  2011-06-22 00:20  classroom\classroom\apply.cs

     文件      12509  2011-06-22 00:20  classroom\classroom\apply.Designer.cs

     文件      83541  2011-06-22 00:20  classroom\classroom\apply.resx

     文件       5446  2011-06-22 00:34  classroom\classroom\backup.cs

     文件      11539  2011-06-22 00:34  classroom\classroom\backup.Designer.cs

     文件       6221  2011-06-22 00:34  classroom\classroom\backup.resx

     文件      10622  2011-06-22 06:40  classroom\classroom\batch.cs

     文件      14234  2011-06-22 00:37  classroom\classroom\batch.Designer.cs

     文件      83745  2011-06-22 00:37  classroom\classroom\batch.resx

     文件    3320320  2011-08-02 19:22  classroom\classroom\bin\Debug\classroom.exe

     文件     220672  2011-08-02 19:22  classroom\classroom\bin\Debug\classroom.pdb

     文件      14328  2011-08-02 19:23  classroom\classroom\bin\Debug\classroom.vshost.exe

     文件        490  2009-06-11 05:14  classroom\classroom\bin\Debug\classroom.vshost.exe.manifest

     文件     180224  2011-06-07 16:00  classroom\classroom\bin\Debug\User.mdb

     文件       1404  2011-06-22 00:34  classroom\classroom\browse.cs

     文件       2367  2011-06-22 00:34  classroom\classroom\browse.Designer.cs

     文件       5814  2011-06-22 00:34  classroom\classroom\browse.resx

     文件      18235  2011-06-22 06:26  classroom\classroom\check.cs

     文件       8025  2011-06-22 00:34  classroom\classroom\check.Designer.cs

     文件      83549  2011-06-22 00:34  classroom\classroom\check.resx

     文件      10589  2011-06-22 00:34  classroom\classroom\classroom.cs

     文件       7909  2011-06-22 06:58  classroom\classroom\classroom.csproj

     文件      16894  2011-06-22 00:34  classroom\classroom\classroom.Designer.cs

     文件       6010  2011-06-22 00:34  classroom\classroom\classroom.resx

     文件       5160  2011-06-22 07:08  classroom\classroom\login.cs

     文件       6576  2011-06-22 07:08  classroom\classroom\login.Designer.cs

     文件    1009943  2011-06-22 07:08  classroom\classroom\login.resx

     文件       8206  2011-06-22 00:36  classroom\classroom\main0.cs

     文件      23572  2011-06-22 00:20  classroom\classroom\main0.Designer.cs

     文件     406950  2011-06-22 00:20  classroom\classroom\main0.resx

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

评论

共有 条评论