基本信息
源码名称:asp.net人事管理系统
源码大小:0.45M
文件格式:.zip
开发语言:C#
更新时间:2014-06-08
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 5 元 
   源码介绍

 功能模块的详细说明如下:

    1)用户信息管理模块。本模块用于管理用户相关信息。

本系统用户按不同的角色分为三组:普通用户、操作员用户和管理员用户。系统按不同的角色提供不同的功能界面。每个用户均可维护个人信息和密码,使用系统前须登录。普通用户仅能进入系统查询、维护个人信息;操作员用户能进行所有人事信息的管理操作;管理员用户能对其他用户进行授权管理。

    2)系统配置管理模块是管理系统的各项配置信息,如添加修改用户。用户通过登录并且为操作员用户或管理员用户身份方可进入本功能界面。

    3)组织机构管理模块能管理单位的组织架构。如:教育局下属科室、学校。

应包含:单位的描述信息,部门职能设置和部门间的关系。考虑到将来的扩展,应能将本单位的组织机构信息导出为XML文件。

4)人事信息管理功能是本系统的核心。它能提供对在职员工、解聘员工、离退员工等的档案管理功能。本系统人事异动管理包含以下功能:提供对员工岗位调配、晋升、辞职等业务处理

5)考虑到各单位现有操作人员的实际情况,结合手工处理流程,形成的统计数据能形成Excel文档。



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Drawing;

public partial class UserLogin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            HttpCookie cookies = Request.Cookies["userInfo"];
            if (cookies != null)
            {
                Session["user"] = cookies["userName"];
                Session["password"] = cookies["password"];
                Session["grade"] = cookies["grade"];
                Response.Redirect("main.aspx");
            }
            RadioButtonList1.SelectedValue = "普通用户";
            DropDownList1.SelectedValue = "不保存";
        }
    }
    protected void ibtLogin_Click1(object sender, ImageClickEventArgs e)
    {
        LoginCl.LoginCl lc = new LoginCl.LoginCl();
        string userName = tbUserName.Text.ToString();
        string passWd = tbPassword.Text.ToString();
        string userGrade = RadioButtonList1.SelectedItem.ToString();
        string checkCookie = DropDownList1.SelectedValue.ToString();
        if(userName == "")
        {
            lMessage.Visible = true;
            lMessage.Text = "对不起,你没有输入用户名!";
            return;
        }
        if (passWd == "")
        {
            lMessage.Visible = true;
            lMessage.Text = "对不起,你没有输入密码!";
            return;
        }
        if (userGrade == "")
        {
            lMessage.Visible = true;
            lMessage.Text = "对不起,你没有选择角色!";
            return;
        }
        int state = lc.checkUser(userName, passWd, userGrade);
        
        switch (state)
        { 
            case 1:
                lMessage.Visible = true;
                lMessage.Text = "对不起,你选的角色与你自身角色不符!";
                break;
            case 2:
                lMessage.Visible = true;
                lMessage.Text = "对不起,你选的角色与你自身角色不符!";
                break;
            case 3:
                lMessage.Visible = true;
                lMessage.Text = "对不起,你选的角色与你自身角色不符!";
                break;
            case 4:
                lMessage.Visible = true;
                lMessage.Text = "对不起,您的密码不正确!";
                break;
            case 5:
                lMessage.Visible = true;
                lMessage.Text = "对不起,你输入的账号不存在!";
                break;
        }

        if (checkCookie != "不保存")
        {
            HttpCookie cookie1 = new HttpCookie("userInfo");
            cookie1["userName"] = userName;
            cookie1["password"] = passWd;
            cookie1["grade"] = userGrade;
            //cookie1.Values.Add("sex", "男");
            if(checkCookie == "保存一周")
            {
                cookie1.Expires = DateTime.Now.AddHours(7 * 24);
            }
            else if (checkCookie == "保存一个月")
            {
                cookie1.Expires = DateTime.Now.AddHours(7 * 24 * 30);
            }
            Response.AppendCookie(cookie1);
        }
        
        if (Session["code"].ToString() == tbCode.Text.ToString())
        {
            if (state == 0)
            {
                Session["user"] = userName;
                Session["password"] = passWd;
                Session["grade"] = userGrade;
                Response.Redirect("main.aspx");
            }
        }
        else
        {
            lMessage.Visible = true;
            lMessage.Text = "对不起,你输入的验证码不正确!";
        }
    }
}