asp 课程设计源代码-人事管理系统

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

附录:源程序代码
1).default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="/1999/xhtml">
<head id="Head1" runat="server">
<title>无标题页</title>
<style type="text/css">
#form1
{
height: 213px;
}
.style2
{
width: 100%;
height: 211px;
}
.style6
{
width: 99px;
}
.style3
{
text-align: center;
}
</style>
</head>
<body bgcolor="#ccffcc">
<form id="form1" runat="server">
<table class="style2">
<tr>
<td class="style4" colspan="2">
<span class="Apple-style-span"
style="color: rgb(0, 0, 0); font-family: 楷体_GB2312; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust:
auto; -webkit-text-stroke-width: 0px; ">
人事信息管理系统</span></td>
<td rowspan="5">
<img alt="" src="images/4ce6a7a5e39e3e49156444f3e340dc21.jpg"
style="width: 853px; height: 193px" />&nbsp;</td>
</tr>
<tr>
<td class="style6">
用户名:</td>
<td class="style3">
<asp:TextBox ID="TextBox1" runat="server" Height="22px" Width="128px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style6">
用户密码:</td>
<td class="style3">
<asp:TextBox ID="TextBox2" runat="server" Height="22px" TextMode="Password"
Width="128px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<asp:CheckBox ID="CheckBox1" runat="server" Text="记住用户" /> </td>
</tr>
<tr>
<td class="style3" colspan="2">
<asp:Button ID="Button1" runat="server" Height="31px" onclick="Button1_Click"
style="text-align: center" Text="登录" Width="50px" />
</td>
</tr>
</table>
</form>
</body>
</html>
2)Default.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.OleDb;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.Title = "学生信息管理系统-----登录";
}
protected void Button1_Click(object sender, EventArgs e)
{
OleDbConnection conn = new OleDbConnection();
string Id = TextBox1.Text;
conn.ConnectionString = "provider=Microsoft.Jet.OleDb.4.0;" + "Data Source=" + Server.MapPath("App_Data/student.mdb");
string StrSel = "Select * from message where id='" + TextBox1.Text + "'and pwd='" + TextBox2.Text + "'";
conn.Open();
OleDbCommand com = new OleDbCommand(StrSel, conn);
OleDbDataReader dr = com.ExecuteReader();
dr.Read();
if (dr.HasRows)
{
Session["pass"] = TextBox1.Text;
Server.Transfer("glxt.aspx");
Response.Redirect("glxt.aspx");
}
else
{
Response.Redirect("Default.aspx");
}
conn.Close();
}
}
3)Glxt.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="glxt.aspx.cs" Inherits="glxt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="/1999/xhtml">
<head id="Head1" runat="server">
<title>无标题页</title>
<style type="text/css">
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color:#CCFFCC;
}
.STYLE1 {
font-size: 12px;
color: #FFFFFF;
}
.STYLE3 {
font-size: 12px;
color: #033d61;
text-decoration:none;
background-image:login_2.jpg;
}
#left{
float:left;
width:177px;
}
.STYLE4
{
float:left;
clear:right;
width:804px;
background-image:content_1.jpg;
height: 1032px;
}
.style2
{
width: 788px;
height: 23px;
}
.style3
{
width: 817px;
}
.style4
{
height: 26px;
}
.style5
{
height: 91px;
}
p.p0{
margin:0pt;
margin-bottom:0.0001pt;
margin-bottom:0pt;
margin-top:0pt;
text-align:justify;
font-size:10.5000pt; font-family:'Times New Roman'; }
.style6
{
width: 285px;
height: 43px;
}
.style7
{
width: 100px;
height: 43px;
}
.style9
{
width: 6px;
}
#form1
{
height: 307px;
width: 1321px;
}
.style10
{
height: 43px;
}
</style>
</head>
<body bgcolor="White" >
<form id="form1" runat="server">
<div>
<table border="0" cellpadding="0" cellspacing="0"
style="height: 303px; width: 130px">
<tr>
<td height="70">
<table bgcolor="#CCFFCC" border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td bgcolor="White" class="style5">
<table border="0" cellpadding="0" cellspacing="0"
style="height: 265px; width: 1141px;">
<tr>
<td bgcolor="White" style="width: 291px" width="270">
<img alt="" src="images/6b5f60fc09e584574192f873acda8d85.jpg"
style="width: 1392px; height: 252px; margin-top: 0px;" /><span class="STYLE3"><table
border="0" cellpadding="0" cellspacing="0"
style="height: 47px; width: 1389px;">
<tr
bgcolor="#CCFFCC">
<td class="style6" bgcolor="#CCFFCC">
<span
class="STYLE3">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label2" runat="server"></asp:Label>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label1" runat="server"></asp:Label>
</span>
</td>
<td class="style7" bgcolor="#CCFFCC">
<span
class="STYLE3">
<asp:LinkButton ID="LinkButton6" runat="server" onclick="LinkButton6_Click"
Font-Size="Large" Height="26px" Width="93px"><spanclass="style3">公司简介</span></spanclass="style3"></asp:LinkButton>
</span>
</td>
<td
class="style10">
<asp:LinkButton ID="LinkButton7" runat="server" onclick="LinkButton7_Click"
Font-Size="Large" Height="26px" Width="72px"><spanclass="style3">信息查询</span></spanclass="style3"></asp:LinkButton>
<asp:LinkButton ID="LinkButton18" runat="server" onclick="LinkButton18_Click"
Font-Size="Large" Height="26px" Width="80px"><spanclass="style3">信息修改</spanclass="style3"></asp:LinkButton>
<asp:LinkButton ID="LinkButton20" runat="server" Font-Size="Large"
Height="26px" PostBackUrl="add.aspx" Width="80px" onclick="LinkButton20_Click">添加信息</asp:LinkButton>
<asp:LinkButton ID="LinkButton17" runat="server" onclick="LinkButton17_Click"
Font-Size="Medium" Height="26px" Width="100px" style="margin-left: 108px">密码修改</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Default.aspx"
Font-Size="Medium" Height="26px" Width="91px">退出</asp:HyperLink>
</td>
</tr>
</table>
</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="8" style="line-height: 8px;">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="left">
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="165"> <tr>
<td height="28">
<table border="0" cellpadding="0" cellspacing="0" width="100%"
bgcolor="#CCFFCC">
<tr>
<td width="19%">
<span
class="STYLE3">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<br />
</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">
<table align="center" bgcolor="White" border="0" cellpadding="0"
cellspacing="0" width="151">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0"
style="width: 118%; height: 379px">
<tr>
<td height="23" bgcolor="#CCFFCC">
<table border="0" cellpadding="0" cellspacing="0" width="100%"
bgcolor="#CCFFCC">
<tr>
<td class="style9">
&nbsp;</td>
<td class="STYLE3" width="82%">
<table
align="center" border="0" cellpadding="0" cellspacing="0"
width="90%"
style="height: 217px" bgcolor="#CCFFCC">
<tr>
<td height="25">
<div align="center">
</div>
</td>
<td height="23" width="84%">
<table border="0" cellpadding="0" cellspacing="0" style="width: 95%">
<tr>
<td height="20">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="23">
<div align="center">
</div>
</td>
<td height="23">
<table border="0" cellpadding="0" cellspacing="0"
style="height: 40px; width: 122%">
<tr>
<td height="20">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="23">
<div align="center">
</div>
</td>
<td height="23">
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr>
<td height="20">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="23">
<div align="center">
</div>
</td>
<td height="23">
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr>
<td height="20">
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="submenu1" bgcolor="#CCFFCC">
<div class="sec_menu">
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="23" bgcolor="#CCFFCC">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="18%">
&nbsp;</td>
<td class="STYLE1" width="82%">
<div align="center" style="width: 149px">
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="submenu2" bgcolor="#CCFFCC">
<div>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="width: 118%">
<tr>
<td height="23" bgcolor="#CCFFCC">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="18%">
&nbsp;</td>
<td class="STYLE1" width="82%">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#CCFFCC">
<div>
<asp:Panel ID="Panel3" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<table
align="center" border="0" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td height="25" style="width: 100%" width="16%">
<div align="center">
</div>
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr>
<td height="20">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
</div>
</td>
</tr>
<tr>
<td class="style4" bgcolor="#CCFFCC">
</td>
</tr>
<tr>
<td bgcolor="#CCFFCC">
<div>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<asp:Panel ID="Panel4" runat="server">
<td>
<table
align="center" border="0" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td height="25" width="16%">
<div align="center">
</div>
</td>
<td height="23" width="84%">
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr>
<td height="20">
<asp:LinkButton ID="LinkButton15" runat="server"><span class="STYLE3"></span></asp:LinkButton>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="23">
<div align="center">
</div>
</td>
<td height="23">
<table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr>
<td height="20">
<asp:LinkButton ID="LinkButton16" runat="server"><span class="STYLE3">登录记录</span></asp:LinkButton>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</asp:Panel>
</tr>
<tr>
<td height="5">
&nbsp;</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="STYLE4">
<asp:Panel ID="Panel5" runat="server" BackColor="#CCFFCC">
<table bgcolor="Gray">
<tr>
<td bgcolor="White" class="style3">
<table>
<tr>
<td bgcolor="White" class="style2">
<span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; ">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xx<font face="宋体">商贸有限公司是国家外经贸局,海关总署批注的有进出口权的公司,公司有雄厚的经济基础,强大的关系网络,完备的技术和人员配置,随着我国加入</font><font
face="Times New Roman">WTO</font><font face="宋体">,进出口贸易的日益增长,为了进一步满足贸易商、进出口商的需求,我公司为商家精心打造了门到门的一站式服务。

我们在中国大陆有很完善的进出口服务系统,已经和多家船公司,航空公司建立了密切的合作关系,可以为您的货物出口各国提供最佳的航运、空运路线以及报关完税、代买保险等一系列服务,同时我公司在深圳有一个很完善的配置仓库可以满足您的货物在深圳中转的需要,可以为您验收货源、散货拼柜,选择合适的配送方式,安全快捷地送达货物。

</font><br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 我们有很广泛的商品信息网络,合作伙伴遍及世界各地,已经成为欧美许多贸易商在中国的全权代理。

我们在<font
face="Times New Roman">“</font><font face="宋体">创造最佳服务</font><font
face="Times New Roman">”</fo nt><font face="宋体">的经营理念指导下,经过全体员工的不懈努力,已经取得了令人瞩目的成绩。

我公司拥有一支业务精通,操作能力强的骨干队伍。

在为客人提供多种物流解决方案的同时,还可以为海外客户开拓中国市场寻找货源,验收货物,报关定仓解除进出口的一切后顾之忧。

提供专业化、个性化、全天候、全方位的服务。

</font></span></td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="Panel6" runat="server">
<asp:Panel ID="Panel1"
runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<asp:Panel ID="Panel2" runat="server">
</asp:Panel>
</td>
</tr>
<tr>
<td height="5">
</td>
</tr>
</table>
</asp:Panel>
</asp:Panel>
<asp:Panel ID="Panel7" runat="server" style="text-align: center">
<asp:TextBox ID="TextBoxF" runat="server" ontextchanged="TextBoxF_TextChanged"
ToolTip="请输入职工编号"></asp:TextBox>
<asp:Button ID="Button4" runat="server" onclick="Button4_Click" Text="搜索" />
<table align="center">
<tr>
<td bgcolor="#CCFFCC" title="员工信息管理">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px"
Caption="具体信息表" CellPadding="4"
onselectedindexchanged="GridView1_SelectedIndexChanged" Width="100%">
<RowStyle BackColor="White" ForeColor="#003399" />
<Columns>
<asp:BoundField DataField="id" HeaderText="职工编号" />
<asp:BoundField DataField="name" HeaderText="姓名" />
<asp:BoundField DataField="sex" HeaderText="性别" />
<asp:BoundField DataField="academy" HeaderText="员
工状态" />
<asp:BoundField DataField="class" HeaderText="职位" />
<asp:BoundField DataField="phone" HeaderText="联系方式" />
<asp:BoundField DataField="adress" HeaderText="家庭地址" />
<asp:BoundField DataField="status" HeaderText="月收入" />
</Columns>
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
</asp:GridView>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="Panel8" runat="server">
<table align="center">
<tr width="80%">
<td>
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
Caption="基本信息表" Height="136px" Width="100%" BackColor="White"
BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4">
<RowStyle BackColor="White" ForeColor="#003399" />
<Columns>
<asp:BoundField DataField="course" HeaderText="员工编号" ItemStyle-Width="120px">
<ItemStyle Width="120px" />
</asp:BoundField>
<asp:BoundField DataField="grade" HeaderText="姓名" ItemStyle-Width="120px">
<ItemStyle Width="120px" />
</asp:BoundField>
<asp:BoundField DataField="credit" HeaderText="所在
部门" ItemStyle-Width="120px">
<ItemStyle Width="120px" />
</asp:BoundField>
<asp:BoundField DataField="year" HeaderText="职位" ItemStyle-Width="120px">
<ItemStyle Width="120px" />
</asp:BoundField>
</Columns>
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
</asp:GridView>
</td>
</tr>
</table>
</asp:Panel>
<div class="STYLE5" style="align: center">
<center>
<asp:Panel ID="Panel9" runat="server">
<table class="STYLE5">
<tr>
<td style="width: 100px">
<asp:Label ID="Label4" runat="server" Text="新密码"></asp:Label>
</td>
<td style="width : 350px">
<asp:TextBox ID="TextBox1" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1"
ErrorMessage="RequiredFieldValidator"
Text="密码不能为空"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td style="width: 100px">
<asp:Label ID="Label5" runat="server" Text="确认密码
">
</asp:Label>
</td>
<td style="width: 350px">
<asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="TextBox1" ControlToValidate="TextBox2"
ErrorMessage="CompareValidator" Text="两次输入不同"></asp:CompareValidator>
</td>
</tr>
<tr>
<td>
</td>
<td align="left" style="width: 350px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;<asp:Button ID="Button1"
runat="server" onclick="Button1_Click"
Text="确认" Height="41px" Width="41px" />
&nbsp;&nbsp;&nbsp;<asp:Button ID="Button2" runat="server" onclick="Button2_Click"
style="" Text="重置" Height="41px" Width="41px" />
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="Panel10" runat="server" Height="358px" Width="800px">
<table bgcolor="#CCFFCC" style="width: 683px">
<tr>
<td bgcolor="#CCFFCC">
信息修改</td>
</tr>
<asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False"
DataKeyNames="id" DataSourceID="AccessDataSource1" BackColor="White"
BorderColor="#CCFFCC" BorderStyle="None" BorderWidth="1px" CellPadding="4">
<RowStyle BackColor="White" ForeColor="#003399" />
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:BoundField DataField="id" HeaderText="职工编号" ReadOnly="True"
SortExpression="id" />
<asp:BoundField DataField="name" HeaderText="姓名" ItemStyle-Width="50px"
SortExpression="name" >
<ItemStyle Width="50px" />
</asp:BoundField>
<asp:BoundField DataField="sex" HeaderText="性别" ItemStyle-Width="50px"
SortExpression="sex" >
<ItemStyle Width="50px" />
</asp:BoundField>
<asp:BoundField DataField="academy" HeaderText="工作状态" ItemStyle-Width="50px"
SortExpression="academy" >
<ItemStyle Width="50px" />
</asp:BoundField>
<asp:BoundField DataField="class" HeaderText="职位" ItemStyle-Width="50px"
SortExpression="class" >
<ItemStyle Width="50px" />
</asp:BoundField>
<asp:BoundField DataField="phone" HeaderText="联系方式" ItemStyle-Width="50px"
SortExpression="adress" >
<ItemStyle Width="50px" />
</asp:BoundField>
<asp:BoundField DataField="adress" HeaderText="家庭地址" ItemStyle-Width="60px"
SortExpression="status" >
<ItemStyle Width="60px" />
</asp:BoundField>
<asp:BoundField DataField="status" HeaderText="月收入" SortExpression="phone" />
</Columns>
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />。

相关文档
最新文档