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

1<%--文件名:TrainingForm.aspx--%> 2
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="TrainingForm.aspx.cs" Inherits="FileManage_TrainingForm" 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">1993-4-12</asp:TextBox><br /> 25
结束日期:<asp:TextBox ID="TextBox4" runat="server" Width="88px">1993-4-16</asp:TextBox> 26
培训单位:<asp:TextBox ID="TextBox5" runat="server" Width="113px">重庆市财政局</asp:TextBox> 27
培训地点:<asp:TextBox ID="TextBox6" runat="server" Width="129px">重庆轻工业职工大学</asp:TextBox><br /> 28
培训内容:<asp:TextBox ID="TextBox7" runat="server" Width="355px">新会计制度</asp:TextBox> 29
培训经费:<asp:TextBox ID="TextBox8" runat="server" Width="47px">350.00</asp:TextBox><br /> 30
证书名称:<asp:TextBox ID="TextBox9" runat="server" Width="157px">新会计制度上岗证</asp:TextBox> 31
补充说明:<asp:TextBox ID="TextBox10" runat="server" Width="239px">公费</asp:TextBox></td> 32
</tr> 33
<tr> 34
<td style="width: 2232px; height: 100px; background-color: gainsboro"> 35
<asp:Panel ID="Panel1" runat="server" Height="220px" ScrollBars="Auto" Width="553px"> 36
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyPersonnelDBConnectionString %>" 37
SelectCommand="SELECT * FROM [公司部门]"></asp:SqlDataSource> 38
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyPersonnelDBConnectionString %>" 39
SelectCommand="SELECT * FROM [在职员工视图] WHERE ([所属部门] = @所属部门)"> 40
<SelectParameters> 41
<asp:ControlParameter ControlID="DropDownList1" Name="所属部门" PropertyName="SelectedValue" 42
Type="String" /> 43
</SelectParameters> 44
</asp:SqlDataSource> 45
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:MyPersonnelDBConnectionString %>" 46
DeleteCommand="DELETE FROM [培训记录] WHERE [自编号] = @自编号" InsertCommand="INSERT INTO [培训记录] ([员工编号], [员工姓名], [开始日期], [结束日期], [培训单位], [培训地点], [培训内容], [培训经费], [证书名称], [补充说明]) VALUES (@员工编号, @员工姓名, @开始日期, @结束日期, @培训单位, @培训地点, @培训内容, @培训经费, @证书名称, @补充说明)" 47
SelectCommand="SELECT * FROM [培训记录] WHERE ([员工姓名] LIKE '%' + @员工姓名 + '%')" UpdateCommand="UPDATE [培训记录] SET [员工编号] = @员工编号, [员工姓名] = @员工姓名, [开始日期] = @开始日期, [结束日期] = @结束日期, [培训单位] = @培训单位, [培训地点] = @培训地点, [培训内容] = @培训内容, [培训经费] = @培训经费, [证书名称] = @证书名称, [补充说明] = @补充说明 WHERE [自编号] = @自编号"> 48
<DeleteParameters> 49
<asp:Parameter Name="自编号" Type="Int32" /> 50
</DeleteParameters> 51
<UpdateParameters> 52
<asp:ControlParameter ControlID="DropDownList2" Name="员工编号" PropertyName="SelectedValue" 53
Type="String" /> 54
<asp:ControlParameter ControlID="DropDownList2" Name="员工姓名" PropertyName="SelectedItem.Text" 55
Type="String" /> 56
<asp:ControlParameter ControlID="TextBox3" Name="开始日期" PropertyName="Text" Type="DateTime" /> 57
<asp:ControlParameter ControlID="TextBox4" Name="结束日期" PropertyName="Text" Type="DateTime" /> 58
<asp:ControlParameter ControlID="TextBox5" Name="培训单位" PropertyName="Text" Type="String" /> 59
<asp:ControlParameter ControlID="TextBox6" Name="培训地点" PropertyName="Text" Type="String" /> 60
<asp:ControlParameter ControlID="TextBox7" Name="培训内容" PropertyName="Text" Type="String" /> 61
<asp:ControlParameter ControlID="TextBox8" Name="培训经费" PropertyName="Text" Type="Double" /> 62
<asp:ControlParameter ControlID="TextBox9" Name="证书名称" PropertyName="Text" Type="String" /> 63
<asp:ControlParameter ControlID="TextBox10" Name="补充说明" PropertyName="Text" Type="String" /> 64
<asp:ControlParameter ControlID="TextBox2" Name="自编号" PropertyName="Text" Type="Int32" /> 65
</UpdateParameters> 66
<SelectParameters> 67
<asp:ControlParameter ControlID="TextBox1" Name="员工姓名" PropertyName="Text" Type="String" /> 68
</SelectParameters> 69
<InsertParameters> 70
<asp:ControlParameter ControlID="DropDownList2" Name="员工编号" PropertyName="SelectedValue" 71
Type="String" /> 72
<asp:ControlParameter ControlID="DropDownList2" Name="员工姓名" PropertyName="SelectedItem.Text" 73
Type="String" /> 74
<asp:ControlParameter ControlID="TextBox3" Name="开始日期" PropertyName="Text" Type="DateTime" /> 75
<asp:ControlParameter ControlID="TextBox4" Name="结束日期" PropertyName="Text" Type="DateTime" /> 76
<asp:ControlParameter ControlID="TextBox5" Name="培训单位" PropertyName="Text" Type="String" /> 77
<asp:ControlParameter ControlID="TextBox6" Name="培训地点" PropertyName="Text" Type="String" /> 78
<asp:ControlParameter ControlID="TextBox7" Name="培训内容" PropertyName="Text" Type="String" /> 79
<asp:ControlParameter ControlID="TextBox8" Name="培训经费" PropertyName="Text" Type="Double" /> 80
<asp:ControlParameter ControlID="TextBox9" Name="证书名称" PropertyName="Text" Type="String" /> 81
<asp:ControlParameter ControlID="TextBox10" Name="补充说明" PropertyName="Text" Type="String" /> 82
</InsertParameters> 83
</asp:SqlDataSource> 84
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" 85
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="自编号" 86
DataSourceID="SqlDataSource3" Font-Names="宋体" Font-Size="Small" GridLines="Vertical" 87
OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 88
Width="1200px"> 89
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> 90
<Columns> 91
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" /> 92
<asp:TemplateField HeaderText="删除" ShowHeader="False"> 93
<ItemTemplate> 94
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete" 95
Text="删除" /> 96
</ItemTemplate> 97
</asp:TemplateField> 98
<asp:BoundField DataField="自编号" HeaderText="自编号" InsertVisible="False" ReadOnly="True" 99
SortExpression="自编号" /> 100
<asp:BoundField DataField="员工编号" HeaderText="员工编号" SortExpression="员工编号" /> 101
<asp:BoundField DataField="员工姓名" HeaderText="员工姓名" SortExpression="员工姓名" /> 102
<asp:BoundField DataField="开始日期" HeaderText="开始日期" SortExpression="开始日期" /> 103
<asp:BoundField DataField="结束日期" HeaderText="结束日期" SortExpression="结束日期" /> 104
<asp:BoundField DataField="培训单位" HeaderText="培训单位" SortExpression="培训单位" /> 105
<asp:BoundField DataField="培训地点" HeaderText="培训地点" SortExpression="培训地点" /> 106
<asp:BoundField DataField="培训内容" HeaderText="培训内容" SortExpression="培训内容" /> 107
<asp:BoundField DataField="培训经费" HeaderText="培训经费" SortExpression="培训经费" /> 108
<asp:BoundField DataField="证书名称" HeaderText="证书名称" SortExpression="证书名称" /> 109
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" /> 110
</Columns> 111
<RowStyle BackColor="#EEEEEE" ForeColor="Black" /> 112
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> 113
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> 114
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> 115
<AlternatingRowStyle BackColor="Gainsboro" /> 116
</asp:GridView> 117
</asp:Panel> 118
</td> 119
</tr> 120
</table> 121
</asp:Content> 122
123




