⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loginform.cs

📁 酒店管理系统
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HotelManagerBLL;

namespace HotelManager
{
    public partial class LoginForm : Form
    {
        
        public LoginForm()
        {
            InitializeComponent();
        }

        private void btnLanding_Click(object sender, EventArgs e)
        {
            //根据用户名和密码判断用户是否合法,和身份
            //1.酒店管理员 , 2.前台服务员 
            //else,用户名或密码错误
            UserInfoBLL bll = new UserInfoBLL();
            int i=bll.CheckUserInfo(txtName.Text.ToString(), txtPassword.Text.ToString());
            if (i == 1)
            {
                this.Visible = false;//登陆成功,主界面隐藏
                Wait_Form form = new Wait_Form(1);
                form.Show();
            }
            else if (i == 2)
            {
                this.Visible = false;
                Wait_Form form = new Wait_Form(2);
                form.Show();
            }
            else
            {
                txtName.Text = "";
                txtPassword.Text = "";
                MessageBox.Show("用户名或密码有误!");
            }
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            txtName.Text = "";
            txtPassword.Text = "";
        }

        private void LoginForm_Load(object sender, EventArgs e)
        {
            //窗体皮肤路径
            string strPath = Application.StartupPath;
            this.skinEngine1.SkinFile = @"" + strPath + "\\DiamondBlue.ssk";
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -