• 大小: 3.59MB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2023-08-10
  • 语言: C#
  • 标签: winform版  

资源简介

功能比较全面,包括权限管理,超级管理员,管理员,普通用户,超级管理员分配普通用户的权限

资源截图

代码片段和文件信息

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


namespace PersonManager
{
    public partial class AddAdmin : Form
    {
        public AddAdmin()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender EventArgs e)
        {
            
            if (textBox1.Text == ““)
            {
                label4.Text = “*用户名不能为空“;
            }
            if (textBox2.Text == ““)
            {
                label5.Text = “*密码不能为空“;
            }
            if (textBox3.Text == ““)
            {
                label6.Text = “*请确认密码“;
            }
            if (textBox1.Text != ““ && textBox2.Text != ““ && textBox3.Text != ““&&textBox2.Text==textBox3.Text)
            {
                string sql = “insert into 管理员 values(‘“ + textBox1.Text + “‘‘“ + textBox2.Text + “‘)“;
                new Database().insert(sql);
                
                MessageBox.Show(“注册成功“);
            }

        }

        private void textBox1_Leave(object sender EventArgs e)
        {
            if (textBox1.Text != ““)
            {
                string sql = “select count(*) from 管理员 where 用户名=‘“ + textBox1.Text + “‘“;
                Database db = new Database();
                int i = db.load(sql);
                if (i == 1)
                {
                    label4.Text = “*用户名已存在“;
                    textBox1.Focus();
                    textBox1.SelectAll();
                }
                else
                {
                    label4.Text = ““;
                }
                db.close();

            }
            else 
            {
                label4.Text = “*帐号不能为空“;
            }
          
        }

        private void textBox2_Leave(object sender EventArgs e)
        {
            if (textBox2.Text == ““)
            {
                label5.Text = “*密码不能为空“;
            }
        }

        private void textBox3_Leave(object sender EventArgs e)
        {
            if (textBox2.Text != textBox3.Text && textBox3.Text != ““)
            {
                label6.Text = “*两次输入密码不一致“;
            }
            if (textBox3.Text == ““)
            {
                label6.Text = “*请再确认密码“;
            }
        }

        private void textBox1_Enter(object sender EventArgs e)
        {
            //label4.Text=““;
        }

        private void textBox2_Enter(object sender EventArgs e)
        {
            label5.Text = ““;
        }

        private void textBox3_Enter(object sender EventArgs e)
        {
            label6.Text = ““;
        }
    }
}

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

     文件       4683  2008-09-28 15:57  PersonManager\1.txt

     文件      25254  2008-09-01 22:01  PersonManager\5.bmp

     文件       3048  2008-09-27 02:46  PersonManager\AddAdmin.cs

     文件       9215  2008-09-24 15:33  PersonManager\AddAdmin.Designer.cs

     文件       5814  2008-09-24 15:33  PersonManager\AddAdmin.resx

     文件       8063  2008-10-04 13:34  PersonManager\AddEmployee.cs

     文件      28777  2008-10-04 13:33  PersonManager\AddEmployee.designer.cs

     文件     249282  2008-10-04 13:33  PersonManager\AddEmployee.resx

     文件    3895296  2008-10-08 21:51  PersonManager\bin\Debug\PersonManager.exe

     文件     206336  2008-10-08 21:51  PersonManager\bin\Debug\PersonManager.pdb

     文件       5632  2005-12-08 14:51  PersonManager\bin\Debug\PersonManager.vshost.exe

     文件     936448  2008-10-08 16:13  PersonManager\bin\Debug\备份\DataBackup.bak

     文件      20975  2008-09-27 07:32  PersonManager\bin\Debug\照片\0.jpg

     文件       5293  2008-09-27 07:33  PersonManager\bin\Debug\照片\134567894313.jpg

     文件       5007  2008-09-27 07:31  PersonManager\bin\Debug\照片\3652148569123654.jpg

     文件       4800  2008-09-07 08:55  PersonManager\bin\Debug\照片\44412132465465.jpg

     文件       3852  2008-09-27 07:31  PersonManager\bin\Debug\照片\462136512365123.jpg

     文件       3907  2008-09-27 07:30  PersonManager\bin\Debug\照片\463134646467894.jpg

     文件       3444  2008-09-27 07:31  PersonManager\bin\Debug\照片\4651325685123654.jpg

     文件       3285  2008-10-04 12:52  PersonManager\ChangePassword.cs

     文件      10032  2008-10-04 12:52  PersonManager\ChangePassword.Designer.cs

     文件       5814  2008-10-04 12:52  PersonManager\ChangePassword.resx

     文件     934400  2008-09-27 07:54  PersonManager\DataBackup.bak

     文件       1765  2008-10-08 12:56  PersonManager\Database.cs

     文件       8368  2008-09-13 04:09  PersonManager\DatabaseOperate.cs

     文件       7507  2008-10-04 12:47  PersonManager\EmployeeSearch.cs

     文件      31311  2008-09-27 05:15  PersonManager\EmployeeSearch.designer.cs

     文件     248906  2008-09-27 05:15  PersonManager\EmployeeSearch.resx

     文件       3875  2008-10-08 16:07  PersonManager\Face.cs

     文件       8139  2008-09-27 08:35  PersonManager\Face.designer.cs

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

评论

共有 条评论