温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:某公司人事工资管理系统源码
当前文件路径:StaffSalaryManage/FileManage/FamilyForm.aspx

1<%--文件名:FamilyForm.aspx--%> 2
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="FamilyForm.aspx.cs" Inherits="FileManage_FamilyForm" Title="当前位置:人事管理->员工家庭成员" %> 3
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 4
<table style="width: 556px; height: 161px"> 5
<tr> 6
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 16px; 7
background-color: teal"> 8
请输入查询员工姓名:<asp:TextBox ID="TextBox1" runat="server" Width="145px">%%</asp:TextBox> 9
<asp:Button ID="Button1" runat="server" Text="查询" Width="80px" /> 10
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="新增" Width="80px" /> 11
<asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="修改" Width="80px" /></td> 12
</tr> 13
<tr> 14
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 27px; 15
background-color: gainsboro"> 16
自编号:<asp:TextBox ID="TextBox2" runat="server" BackColor="DarkGray" ReadOnly="True" 17
Width="35px"></asp:TextBox> 18
所在部门:<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1" 19
DataTextField="部门名称" DataValueField="部门名称" Width="80px"> 20
</asp:DropDownList> 21
员工姓名:<asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="SqlDataSource2" 22
DataTextField="姓名" DataValueField="员工编号" Width="80px"> 23
</asp:DropDownList> 24
家庭成员姓名:<asp:TextBox ID="TextBox3" runat="server" Width="59px">罗帅</asp:TextBox><br /> 25
与员工关系:<asp:DropDownList ID="DropDownList3" runat="server"> 26
<asp:ListItem>父</asp:ListItem> 27
<asp:ListItem>母</asp:ListItem> 28
<asp:ListItem>兄</asp:ListItem> 29
<asp:ListItem>弟</asp:ListItem> 30
<asp:ListItem>姐</asp:ListItem> 31
<asp:ListItem>妹</asp:ListItem> 32
<asp:ListItem>子</asp:ListItem> 33
<asp:ListItem>女</asp:ListItem> 34
<asp:ListItem>夫</asp:ListItem> 35
<asp:ListItem>妻</asp:ListItem> 36
</asp:DropDownList> 37
工作单位:<asp:TextBox ID="TextBox4" runat="server" Width="193px">长寿实验二小</asp:TextBox> 38
担任职务:<asp:TextBox ID="TextBox5" runat="server" Width="93px">学生</asp:TextBox><br /> 39
政治面貌:<asp:TextBox ID="TextBox6" runat="server" Width="46px">暂无</asp:TextBox> 40
联系电话:<asp:TextBox ID="TextBox7" runat="server" Width="94px">13883797515</asp:TextBox> 41
补充说明:<asp:TextBox ID="TextBox8" runat="server" Width="193px">暂无</asp:TextBox></td> 42
</tr> 43
<tr> 44
<td style="width: 2232px; height: 100px; background-color: gainsboro"> 45
<asp:Panel ID="Panel1" runat="server" Height="220px" ScrollBars="Auto" Width="553px"> 46
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyPersonnelDBConnectionString %>" 47
SelectCommand="SELECT * FROM [公司部门]"></asp:SqlDataSource> 48
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyPersonnelDBConnectionString %>" 49
SelectCommand="SELECT * FROM [在职员工视图] WHERE ([所属部门] = @所属部门)"> 50
<SelectParameters> 51
<asp:ControlParameter ControlID="DropDownList1" Name="所属部门" PropertyName="SelectedValue" 52
Type="String" /> 53
</SelectParameters> 54
</asp:SqlDataSource> 55
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:MyPersonnelDBConnectionString %>" 56
DeleteCommand="DELETE FROM [家庭成员] WHERE [自编号] = @自编号" InsertCommand="INSERT INTO [家庭成员] ([员工编号], [员工姓名], [家庭成员姓名], [与员工关系], [工作单位], [担任职务], [政治面貌], [联系电话], [补充说明]) VALUES (@员工编号, @员工姓名, @家庭成员姓名, @与员工关系, @工作单位, @担任职务, @政治面貌, @联系电话, @补充说明)" 57
SelectCommand="SELECT * FROM [家庭成员] WHERE ([员工姓名] LIKE '%' + @员工姓名 + '%')" UpdateCommand="UPDATE [家庭成员] SET [员工编号] = @员工编号, [员工姓名] = @员工姓名, [家庭成员姓名] = @家庭成员姓名, [与员工关系] = @与员工关系, [工作单位] = @工作单位, [担任职务] = @担任职务, [政治面貌] = @政治面貌, [联系电话] = @联系电话, [补充说明] = @补充说明 WHERE [自编号] = @自编号"> 58
<DeleteParameters> 59
<asp:Parameter Name="自编号" Type="Int32" /> 60
</DeleteParameters> 61
<UpdateParameters> 62
<asp:ControlParameter ControlID="DropDownList2" Name="员工编号" PropertyName="SelectedValue" 63
Type="String" /> 64
<asp:ControlParameter ControlID="DropDownList2" Name="员工姓名" PropertyName="SelectedItem.Text" 65
Type="String" /> 66
<asp:ControlParameter ControlID="TextBox3" Name="家庭成员姓名" PropertyName="Text" Type="String" /> 67
<asp:ControlParameter ControlID="DropDownList3" Name="与员工关系" PropertyName="SelectedValue" 68
Type="String" /> 69
<asp:ControlParameter ControlID="TextBox4" Name="工作单位" PropertyName="Text" Type="String" /> 70
<asp:ControlParameter ControlID="TextBox5" Name="担任职务" PropertyName="Text" Type="String" /> 71
<asp:ControlParameter ControlID="TextBox6" Name="政治面貌" PropertyName="Text" Type="String" /> 72
<asp:ControlParameter ControlID="TextBox7" Name="联系电话" PropertyName="Text" Type="String" /> 73
<asp:ControlParameter ControlID="TextBox8" Name="补充说明" PropertyName="Text" Type="String" /> 74
<asp:ControlParameter ControlID="TextBox2" Name="自编号" PropertyName="Text" Type="Int32" /> 75
</UpdateParameters> 76
<SelectParameters> 77
<asp:ControlParameter ControlID="TextBox1" Name="员工姓名" PropertyName="Text" Type="String" /> 78
</SelectParameters> 79
<InsertParameters> 80
<asp:ControlParameter ControlID="DropDownList2" Name="员工编号" PropertyName="SelectedValue" 81
Type="String" /> 82
<asp:ControlParameter ControlID="DropDownList2" Name="员工姓名" PropertyName="SelectedItem.Text" 83
Type="String" /> 84
<asp:ControlParameter ControlID="TextBox3" Name="家庭成员姓名" PropertyName="Text" Type="String" /> 85
<asp:ControlParameter ControlID="DropDownList3" Name="与员工关系" PropertyName="SelectedValue" 86
Type="String" /> 87
<asp:ControlParameter ControlID="TextBox4" Name="工作单位" PropertyName="Text" Type="String" /> 88
<asp:ControlParameter ControlID="TextBox5" Name="担任职务" PropertyName="Text" Type="String" /> 89
<asp:ControlParameter ControlID="TextBox6" Name="政治面貌" PropertyName="Text" Type="String" /> 90
<asp:ControlParameter ControlID="TextBox7" Name="联系电话" PropertyName="Text" Type="String" /> 91
<asp:ControlParameter ControlID="TextBox8" Name="补充说明" PropertyName="Text" Type="String" /> 92
</InsertParameters> 93
</asp:SqlDataSource> 94
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" 95
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="自编号" 96
DataSourceID="SqlDataSource3" Font-Names="宋体" Font-Size="Small" GridLines="Vertical" 97
OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 98
Width="1000px"> 99
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> 100
<Columns> 101
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" /> 102
<asp:TemplateField HeaderText="删除" ShowHeader="False"> 103
<ItemTemplate> 104
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete" 105
Text="删除" /> 106
</ItemTemplate> 107
</asp:TemplateField> 108
<asp:BoundField DataField="自编号" HeaderText="自编号" InsertVisible="False" ReadOnly="True" 109
SortExpression="自编号" /> 110
<asp:BoundField DataField="员工编号" HeaderText="员工编号" SortExpression="员工编号" /> 111
<asp:BoundField DataField="员工姓名" HeaderText="员工姓名" SortExpression="员工姓名" /> 112
<asp:BoundField DataField="家庭成员姓名" HeaderText="家庭成员姓名" SortExpression="家庭成员姓名" /> 113
<asp:BoundField DataField="与员工关系" HeaderText="与员工关系" SortExpression="与员工关系" /> 114
<asp:BoundField DataField="工作单位" HeaderText="工作单位" SortExpression="工作单位" /> 115
<asp:BoundField DataField="担任职务" HeaderText="担任职务" SortExpression="担任职务" /> 116
<asp:BoundField DataField="政治面貌" HeaderText="政治面貌" SortExpression="政治面貌" /> 117
<asp:BoundField DataField="联系电话" HeaderText="联系电话" SortExpression="联系电话" /> 118
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" /> 119
</Columns> 120
<RowStyle BackColor="#EEEEEE" ForeColor="Black" /> 121
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> 122
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> 123
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> 124
<AlternatingRowStyle BackColor="#DCDCDC" /> 125
</asp:GridView> 126
</asp:Panel> 127
</td> 128
</tr> 129
</table> 130
</asp:Content> 131
132




