📄 personnelform.aspx
字号:
<%--文件名:PersonnelForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="PersonnelForm.aspx.cs" Inherits="CompanyManage_PersonnelForm" Title="当前位置:资料管理->公司职员设置"%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 556px; height: 161px">
<tr>
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 16px;
background-color: darkturquoise">
请输入需要查询职员的姓名:<asp:TextBox ID="TextBox1" runat="server" Width="136px">%%</asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="查询" Width="70px" />
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="新增" Width="70px" />
<asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="修改" Width="70px" /></td>
</tr>
<tr>
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 141px;
background-color: palegoldenrod" valign="top">
编号:<asp:TextBox ID="TextBox2" runat="server" Width="83px"></asp:TextBox>
姓名:<asp:TextBox ID="TextBox3" runat="server" Width="59px"></asp:TextBox>
性别:<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem></asp:ListItem>
<asp:ListItem>男</asp:ListItem>
<asp:ListItem>女</asp:ListItem>
</asp:DropDownList>
学历:<asp:DropDownList ID="DropDownList2" runat="server">
<asp:ListItem></asp:ListItem>
<asp:ListItem>本科</asp:ListItem>
<asp:ListItem>大专</asp:ListItem>
<asp:ListItem>高中</asp:ListItem>
<asp:ListItem>硕士</asp:ListItem>
<asp:ListItem>博士</asp:ListItem>
<asp:ListItem>初中</asp:ListItem>
<asp:ListItem>其他</asp:ListItem>
</asp:DropDownList>
职务:<asp:TextBox ID="TextBox6" runat="server" Width="65px"></asp:TextBox><br />
所在部门:<asp:TextBox ID="TextBox7" runat="server" Width="57px"></asp:TextBox>
身份证号码:<asp:TextBox ID="TextBox8" runat="server" Width="161px"></asp:TextBox>
出生日期:<asp:TextBox ID="TextBox9" runat="server" Width="83px">1972-8-15</asp:TextBox><br />
入职日期:<asp:TextBox ID="TextBox10" runat="server" Width="64px">1991-7-13</asp:TextBox>
婚姻状况:<asp:DropDownList ID="DropDownList3" runat="server">
<asp:ListItem>已婚</asp:ListItem>
<asp:ListItem>未婚</asp:ListItem>
</asp:DropDownList>
联系电话:<asp:TextBox ID="TextBox12" runat="server" Width="203px"></asp:TextBox><br />
家庭地址:<asp:TextBox ID="TextBox13" runat="server" Width="134px"></asp:TextBox>
邮政编码:<asp:TextBox ID="TextBox14" runat="server" Width="56px"></asp:TextBox>
电子邮箱:<asp:TextBox ID="TextBox15" runat="server" Width="123px"></asp:TextBox><br />
补充说明:<asp:TextBox ID="TextBox16" runat="server" Width="469px">暂无</asp:TextBox><br />
工作简历:<asp:TextBox ID="TextBox17" runat="server" Height="41px" TextMode="MultiLine"
Width="469px"></asp:TextBox>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyHouseDBConnectionString %>"
DeleteCommand="DELETE FROM [职员信息] WHERE [职员编号] = @职员编号" InsertCommand="INSERT INTO [职员信息] ([职员编号], [职员姓名], [职员性别], [职员学历], [职员职务], [所在部门], [身份证号], [出生日期], [入职日期], [婚姻状况], [联系电话], [家庭地址], [邮政编码], [电子邮箱], [补充说明], [工作简历]) VALUES (@职员编号, @职员姓名, @职员性别, @职员学历, @职员职务, @所在部门, @身份证号, @出生日期, @入职日期, @婚姻状况, @联系电话, @家庭地址, @邮政编码, @电子邮箱, @补充说明, @工作简历)"
SelectCommand="SELECT * FROM [职员信息] WHERE ([职员姓名] LIKE '%' + @职员姓名 + '%')" UpdateCommand="UPDATE [职员信息] SET [职员姓名] = @职员姓名, [职员性别] = @职员性别, [职员学历] = @职员学历, [职员职务] = @职员职务, [所在部门] = @所在部门, [身份证号] = @身份证号, [出生日期] = @出生日期, [入职日期] = @入职日期, [婚姻状况] = @婚姻状况, [联系电话] = @联系电话, [家庭地址] = @家庭地址, [邮政编码] = @邮政编码, [电子邮箱] = @电子邮箱, [补充说明] = @补充说明, [工作简历] = @工作简历 WHERE [职员编号] = @职员编号">
<DeleteParameters>
<asp:Parameter Name="职员编号" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:ControlParameter ControlID="TextBox3" Name="职员姓名" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="DropDownList1" Name="职员性别" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="职员学历" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="职员职务" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox7" Name="所在部门" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox8" Name="身份证号" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox9" Name="出生日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox10" Name="入职日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="DropDownList3" Name="婚姻状况" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="TextBox12" Name="联系电话" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox13" Name="家庭地址" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox14" Name="邮政编码" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox15" Name="电子邮箱" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox16" Name="补充说明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox17" Name="工作简历" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox2" Name="职员编号" PropertyName="Text" Type="String" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="职员姓名" PropertyName="Text" Type="String" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox2" Name="职员编号" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="职员姓名" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="DropDownList1" Name="职员性别" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="职员学历" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="职员职务" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox7" Name="所在部门" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox8" Name="身份证号" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox9" Name="出生日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox10" Name="入职日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="DropDownList3" Name="婚姻状况" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="TextBox12" Name="联系电话" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox13" Name="家庭地址" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox14" Name="邮政编码" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox15" Name="电子邮箱" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox16" Name="补充说明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox17" Name="工作简历" PropertyName="Text" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</td>
</tr>
<tr>
<td style="width: 2232px; height: 50px; background-color: gainsboro">
<asp:Panel ID="Panel1" runat="server" Height="150px" ScrollBars="Auto" Width="553px">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="职员编号"
DataSourceID="SqlDataSource1" Font-Names="宋体" Font-Size="Small" GridLines="Vertical"
OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
Width="1900px">
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<Columns>
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" />
<asp:TemplateField HeaderText="删除" ShowHeader="False">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete"
Text="删除" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="职员编号" HeaderText="职员编号" ReadOnly="True" SortExpression="职员编号" />
<asp:BoundField DataField="职员姓名" HeaderText="职员姓名" SortExpression="职员姓名" />
<asp:BoundField DataField="职员性别" HeaderText="职员性别" SortExpression="职员性别" />
<asp:BoundField DataField="职员学历" HeaderText="职员学历" SortExpression="职员学历" />
<asp:BoundField DataField="职员职务" HeaderText="职员职务" SortExpression="职员职务" />
<asp:BoundField DataField="所在部门" HeaderText="所在部门" SortExpression="所在部门" />
<asp:BoundField DataField="身份证号" HeaderText="身份证号" SortExpression="身份证号" />
<asp:BoundField DataField="出生日期" HeaderText="出生日期" SortExpression="出生日期" />
<asp:BoundField DataField="入职日期" HeaderText="入职日期" SortExpression="入职日期" />
<asp:BoundField DataField="婚姻状况" HeaderText="婚姻状况" SortExpression="婚姻状况" />
<asp:BoundField DataField="联系电话" HeaderText="联系电话" SortExpression="联系电话" />
<asp:BoundField DataField="家庭地址" HeaderText="家庭地址" SortExpression="家庭地址" />
<asp:BoundField DataField="邮政编码" HeaderText="邮政编码" SortExpression="邮政编码" />
<asp:BoundField DataField="电子邮箱" HeaderText="电子邮箱" SortExpression="电子邮箱" />
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" />
<asp:BoundField DataField="工作简历" HeaderText="工作简历" SortExpression="工作简历" />
</Columns>
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
<AlternatingRowStyle BackColor="#DCDCDC" />
</asp:GridView>
</asp:Panel>
</td>
</tr>
</table>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -