• 大小: 1.19MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-25
  • 语言: C#
  • 标签: NIIT课程  C#  项目实践  

资源简介

基于SQL Server 和 C#语言, 适用于学生作业参考以及初学者。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Domitory_management
{
    public partial class Form1 : Form
    {
        int Ctr;
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load_1(object sender EventArgs e)
        {
            txtUserName.Focus();
        }


        private void button1_Click_1(object sender EventArgs e)
        {

            //Form2 frm2 = new Form2();
            //frm2.Show();
            //this.Hide();
            string LoginName Password;
            LoginName = txtUserName.Text;
            Password = txtPassword.Text;
            Ctr = Ctr + 1;
            if ((LoginName == ““) && (Password == ““))
            {

                MessageBox.Show(“通过身份验证,欢迎使用本系统!“ “成功登录“ MessageBoxButtons.OK);
                Ctr = 0;
                Form2 frmobj = new Form2();
                this.Hide();
                frmobj.Show();

            }
            else
                if (Ctr < 3)
                {
                    lblMessage.Visible = true;
                    lblMessage.Text = “错误的用户名或密码,请重新输入!“;
                    txtUserName.Focus();
                }
                else
                {
                    MessageBox.Show(“输入错误,即将关闭系统......“);
                    Close();
                }
        }


        private void txtUserName_KeyDown(object sender KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) txtPassword.Focus();
        }

        private void txtPassword_KeyDown(object sender KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) button1.Focus();
        }
        private void button2_Click(object sender EventArgs e)
        {
            //Application.Exit();
            DialogResult rel = MessageBox.Show(“是否真的要退出!“ “退出“ MessageBoxButtons.YesNo MessageBoxIcon.Question);
            if (rel == DialogResult.Yes) Application.Exit();
        }
    }
}

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

     文件        480  2008-12-10 21:44  Domitory management\Domitory management\app.config

     文件      94542  2008-12-10 16:24  Domitory management\Domitory management\bin\Debug\1.jpg

     文件      10134  2005-09-23 03:27  Domitory management\Domitory management\bin\Debug\App.ico

     文件      36085  2008-11-27 14:53  Domitory management\Domitory management\bin\Debug\banner1.JPG

     文件     262144  2008-12-11 22:03  Domitory management\Domitory management\bin\Debug\Domitory management.exe

     文件        480  2008-12-10 21:44  Domitory management\Domitory management\bin\Debug\Domitory management.exe.config

     文件     245248  2008-12-11 22:03  Domitory management\Domitory management\bin\Debug\Domitory management.pdb

     文件       5632  2005-11-11 22:25  Domitory management\Domitory management\bin\Debug\Domitory management.vshost.exe

     文件        480  2008-12-10 21:44  Domitory management\Domitory management\bin\Debug\Domitory management.vshost.exe.config

     文件       1406  2008-01-11 09:08  Domitory management\Domitory management\bin\Debug\IMSmallToolbarAction.ico

     文件       1406  2008-01-11 09:09  Domitory management\Domitory management\bin\Debug\IMSmallToolbarOtherContent.ico

     文件       1406  2007-07-20 19:04  Domitory management\Domitory management\bin\Debug\search.ico

     文件       1406  2007-12-19 18:23  Domitory management\Domitory management\bin\Debug\security_import.ico

     文件       1406  2007-12-19 18:45  Domitory management\Domitory management\bin\Debug\Send_Love.ico

     文件      35018  2008-11-27 15:18  Domitory management\Domitory management\bin\Debug\sushe.jpg

    ..A.SH.     17920  2008-12-11 17:36  Domitory management\Domitory management\bin\Debug\Thumbs.db

     文件    3145728  2008-12-11 21:53  Domitory management\Domitory management\bin\Debug\学生宿舍管理系统.mdf

     文件    1572864  2008-12-11 21:53  Domitory management\Domitory management\bin\Debug\学生宿舍管理系统_log.ldf

     文件       6998  2008-12-11 18:12  Domitory management\Domitory management\Domitory management.csproj

     文件       2253  2008-12-11 11:11  Domitory management\Domitory management\Form1.cs

     文件       6907  2008-12-11 11:11  Domitory management\Domitory management\Form1.Designer.cs

     文件      20521  2008-12-11 11:11  Domitory management\Domitory management\Form1.resx

     文件       2692  2008-12-11 22:03  Domitory management\Domitory management\Form2.cs

     文件      23953  2008-12-11 22:03  Domitory management\Domitory management\Form2.Designer.cs

     文件      66796  2008-12-11 22:03  Domitory management\Domitory management\Form2.resx

     文件       3016  2008-12-11 22:03  Domitory management\Domitory management\Form3.cs

     文件      22298  2008-12-11 22:03  Domitory management\Domitory management\Form3.Designer.cs

     文件     150421  2008-12-11 22:03  Domitory management\Domitory management\Form3.resx

     文件        958  2008-12-11 22:03  Domitory management\Domitory management\obj\Debug\Domitory management.csproj.GenerateResource.Cache

     文件     262144  2008-12-11 22:03  Domitory management\Domitory management\obj\Debug\Domitory management.exe

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

评论

共有 条评论