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

1<%--文件名:LeaveForm.aspx--%> 2
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="LeaveForm.aspx.cs" Inherits="FileManage_LeaveForm" 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="88px">2000-4-12</asp:TextBox><br /> 25
离职原因:<asp:TextBox ID="TextBox4" runat="server" Width="473px">自动离职</asp:TextBox> <br /> 26
批准人:<asp:TextBox ID="TextBox5" runat="server" Width="44px">王廷明</asp:TextBox> 27
补充说明:<asp:TextBox ID="TextBox6" runat="server" Width="370px">暂无</asp:TextBox></td> 28
</tr> 29
<tr> 30
<td style="width: 2232px; height: 100px; background-color: gainsboro"> 31
<asp:Panel ID="Panel1" runat="server" Height="220px" ScrollBars="Auto" Width="553px"> 32
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyPersonnelDBConnectionString %>" 33
SelectCommand="SELECT * FROM [公司部门]"></asp:SqlDataSource> 34
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyPersonnelDBConnectionString %>" 35
SelectCommand="SELECT * FROM [在职员工视图] WHERE ([所属部门] = @所属部门)"> 36
<SelectParameters> 37
<asp:ControlParameter ControlID="DropDownList1" Name="所属部门" PropertyName="SelectedValue" 38
Type="String" /> 39
</SelectParameters> 40
</asp:SqlDataSource> 41
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:MyPersonnelDBConnectionString %>" 42
DeleteCommand="DELETE FROM [离职管理] WHERE [自编号] = @自编号" InsertCommand="INSERT INTO [离职管理] ([员工编号], [员工姓名], [离职日期], [离职原因], [批准人], [补充说明]) VALUES (@员工编号, @员工姓名, @离职日期, @离职原因, @批准人, @补充说明)" 43
SelectCommand="SELECT * FROM [离职管理] WHERE ([员工姓名] LIKE '%' + @员工姓名 + '%')" UpdateCommand="UPDATE [离职管理] SET [离职日期] = @离职日期, [离职原因] = @离职原因, [批准人] = @批准人, [补充说明] = @补充说明 WHERE [自编号] = @自编号"> 44
<DeleteParameters> 45
<asp:Parameter Name="自编号" Type="Int32" /> 46
</DeleteParameters> 47
<UpdateParameters> 48
<asp:ControlParameter ControlID="TextBox3" Name="离职日期" PropertyName="Text" Type="DateTime" /> 49
<asp:ControlParameter ControlID="TextBox4" Name="离职原因" PropertyName="Text" Type="String" /> 50
<asp:ControlParameter ControlID="TextBox5" Name="批准人" PropertyName="Text" Type="String" /> 51
<asp:ControlParameter ControlID="TextBox6" Name="补充说明" PropertyName="Text" Type="String" /> 52
<asp:ControlParameter ControlID="TextBox2" Name="自编号" PropertyName="Text" Type="Int32" /> 53
</UpdateParameters> 54
<SelectParameters> 55
<asp:ControlParameter ControlID="TextBox1" Name="员工姓名" PropertyName="Text" Type="String" /> 56
</SelectParameters> 57
<InsertParameters> 58
<asp:ControlParameter ControlID="DropDownList2" Name="员工编号" PropertyName="SelectedValue" 59
Type="String" /> 60
<asp:ControlParameter ControlID="DropDownList2" Name="员工姓名" PropertyName="SelectedItem.Text" 61
Type="String" /> 62
<asp:ControlParameter ControlID="TextBox3" Name="离职日期" PropertyName="Text" Type="DateTime" /> 63
<asp:ControlParameter ControlID="TextBox4" Name="离职原因" PropertyName="Text" Type="String" /> 64
<asp:ControlParameter ControlID="TextBox5" Name="批准人" PropertyName="Text" Type="String" /> 65
<asp:ControlParameter ControlID="TextBox6" Name="补充说明" PropertyName="Text" Type="String" /> 66
</InsertParameters> 67
</asp:SqlDataSource> 68
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" 69
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="自编号" 70
DataSourceID="SqlDataSource3" Font-Names="宋体" Font-Size="Small" GridLines="Vertical" 71
OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 72
Width="800px"> 73
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> 74
<Columns> 75
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" /> 76
<asp:TemplateField HeaderText="删除" ShowHeader="False"> 77
<ItemTemplate> 78
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete" 79
Text="删除" /> 80
</ItemTemplate> 81
</asp:TemplateField> 82
<asp:BoundField DataField="自编号" HeaderText="自编号" InsertVisible="False" ReadOnly="True" 83
SortExpression="自编号" /> 84
<asp:BoundField DataField="员工编号" HeaderText="员工编号" SortExpression="员工编号" /> 85
<asp:BoundField DataField="员工姓名" HeaderText="员工姓名" SortExpression="员工姓名" /> 86
<asp:BoundField DataField="离职日期" HeaderText="离职日期" SortExpression="离职日期" /> 87
<asp:BoundField DataField="离职原因" HeaderText="离职原因" SortExpression="离职原因" /> 88
<asp:BoundField DataField="批准人" HeaderText="批准人" SortExpression="批准人" /> 89
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" /> 90
</Columns> 91
<RowStyle BackColor="#EEEEEE" ForeColor="Black" /> 92
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> 93
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> 94
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> 95
<AlternatingRowStyle BackColor="#DCDCDC" /> 96
</asp:GridView> 97
</asp:Panel> 98
</td> 99
</tr> 100
</table> 101
</asp:Content> 102
103




