资源简介

适用于任何系统的登陆、注册、修改、删除用户的源代码,使用简单,包含数据库,论文等,只需安装vs2008和sql2008,配置好数据库,然后添加登陆数据就行了,适合新手使用,代码简单,容易看懂。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Sql;
using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;

namespace EMS
{
    class datainfo
    {
        SqlConnection con = new SqlConnection(“Data Source=冯云川-PC;Initial Catalog=master;Integrated Security=True“);
      
        public void open()
        {
            con.Open();
        }
        public DataTable read()
        {
            this.open();
            SqlCommand cmd = con.CreateCommand();
            cmd.CommandText = “select * from tb_employee“;
            SqlDataReader reader = cmd.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(reader);
            con.Close();
            return dt;

        }
        public bool load_enter(string name string password)
        {
            this.open();
            SqlCommand cmd = con.CreateCommand();
            cmd.CommandText = “select * from tb_employee where fullname=@name and password=@password“;
            cmd.Parameters.Add(new SqlParameter(“name“ name));
            cmd.Parameters.Add(new SqlParameter(“password“ password));
            SqlDataReader reader = cmd.ExecuteReader();
            if (reader.Read())
            {
                //MessageBox.Show(“登陆成功!“);
                con.Close();
                return true;
            }
            else
            {
                //MessageBox.Show(“用户名或密码错误!“);
                con.Close();
                return false;
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-10-24 12:03  EMS13\
     目录           0  2013-10-24 12:03  EMS13\EMS\
     文件         899  2013-09-02 09:45  EMS13\EMS.sln
     文件       27136  2013-10-24 11:48  EMS13\EMS.suo
     文件         386  2013-09-12 11:38  EMS13\EMS\app.config
     目录           0  2013-10-24 12:03  EMS13\EMS\bin\
     目录           0  2013-10-24 12:03  EMS13\EMS\bin\Debug\
     文件      570880  2013-09-27 17:20  EMS13\EMS\bin\Debug\EMS.exe
     文件         386  2013-09-12 11:38  EMS13\EMS\bin\Debug\EMS.exe.config
     文件      132608  2013-09-27 17:20  EMS13\EMS\bin\Debug\EMS.pdb
     文件       14328  2013-09-29 09:05  EMS13\EMS\bin\Debug\EMS.vshost.exe
     文件         386  2013-09-12 11:38  EMS13\EMS\bin\Debug\EMS.vshost.exe.config
     文件         490  2009-06-11 05:14  EMS13\EMS\bin\Debug\EMS.vshost.exe.manifest
     文件        1649  2013-09-02 16:29  EMS13\EMS\Class1.cs
     文件        3395  2013-09-27 12:19  EMS13\EMS\Class2.cs
     文件       10884  2013-09-25 13:40  EMS13\EMS\datainfo.cs
     文件       50985  2013-09-13 10:58  EMS13\EMS\db_emsDataSet.Designer.cs
     文件           3  2013-09-12 11:38  EMS13\EMS\db_emsDataSet.xsc
     文件        4324  2013-09-12 11:38  EMS13\EMS\db_emsDataSet.xsd
     文件           3  2013-09-12 11:38  EMS13\EMS\db_emsDataSet.xss
     文件        5958  2013-09-12 11:47  EMS13\EMS\EMS.csproj
     文件        1456  2013-09-27 13:44  EMS13\EMS\Form1.cs
     文件        5851  2013-09-27 13:44  EMS13\EMS\Form1.Designer.cs
     文件       58753  2013-09-27 13:44  EMS13\EMS\Form1.resx
     文件        5895  2013-09-27 13:44  EMS13\EMS\Form2.cs
     文件       16691  2013-09-27 13:44  EMS13\EMS\Form2.Designer.cs
     文件      231456  2013-09-27 13:44  EMS13\EMS\Form2.resx
     文件        1124  2013-09-27 17:18  EMS13\EMS\Form3.cs
     文件       14521  2013-09-27 17:18  EMS13\EMS\Form3.Designer.cs
     文件      172489  2013-09-27 17:18  EMS13\EMS\Form3.resx
     文件        1227  2013-09-27 17:14  EMS13\EMS\Form4.cs
............此处省略47个文件信息

评论

共有 条评论