Rehab.aspx
上传用户:cha0314
上传日期:2014-03-02
资源大小:12522k
文件大小:9k
源码类别:

C#编程

开发平台:

C#

  1. <%@ Page language="c#" Codebehind="Rehab.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.Staff.Rehab" %>
  2. <%@ Import namespace="System"%>
  3. <%@ Import namespace="System.Data"  %>
  4. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  5. <HTML>
  6. <HEAD>
  7. <TITLE>ListView</TITLE>
  8. <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
  9. <meta content="C#" name="CODE_LANGUAGE">
  10. <meta content="JavaScript" name="vs_defaultClientScript">
  11. <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  12. <LINK href="../../Css/BasicLayout.css" type="text/css" rel="stylesheet">
  13. <script language="javascript">
  14. //全选checkbox
  15. function SelectItem()
  16. {
  17. var i = 0;
  18. var e;
  19. for( i = 0 ; i < ListView.elements.length ; i ++ )
  20. {
  21. e = ListView.elements[ i ];
  22. if( e.type == "checkbox" ) e.checked = !e.checked;
  23. }
  24. }
  25. // 高亮背景
  26. function high( which )
  27. which.style.background = "#C0D9E6";
  28. which.style.font.color = "red";
  29. // 取消背景高亮
  30. function low( which )
  31. which.style.background = "#FFFFFF";
  32. which.style.font.color = "black";
  33. }
  34. </script>
  35. <script language="csharp" runat="server">
  36. public string GetSex(string sex,string id)
  37. {
  38. if(id!="")
  39. return((sex=="True")?"女":"男");
  40. else
  41. return("");
  42. }
  43. public string GetAge(string birthday)
  44. {
  45. if((birthday!="")&&(DateTime.Parse(birthday)!=DateTime.Parse("1900-1-1")))
  46. return(((int)(DateTime.Now.Year-(DateTime.Parse(birthday)).Year)+1).ToString());
  47. else
  48. return("");
  49. }
  50. </script>
  51. </HEAD>
  52. <body text="#000000" leftMargin="2" topMargin="0" rightMargin="0" marginwidth="0" marginheight="0">
  53. <form id="ListView" runat="server">
  54. <table id="AutoNumber1" style="BORDER-COLLAPSE: collapse" borderColor="#ccccc" height="13" cellSpacing="0" cellPadding="0" width="100%" border="0">
  55. <tr>
  56. <td style="HEIGHT: 185px" width="100%" colSpan="8" height="185">
  57. <table id="AutoNumber2" style="BORDER-COLLAPSE: collapse" borderColor="#cccccc" height="55" cellSpacing="0" cellPadding="0" width="100%" border="0">
  58. <tr>
  59. <td width="100%" colSpan="8">
  60. <table id="AutoNumber4" style="BORDER-COLLAPSE: collapse" borderColor="#111111" height="1" cellSpacing="0" cellPadding="0" width="100%" border="0">
  61. <tr>
  62. <td class="GbText" width="3%" bgColor="#c0d9e6"><IMG height="16" src="../../Images/icon/07.gif" width="16"></td>
  63. <td class="GbText" width="16%" bgColor="#c0d9e6" height="1"><b><A title="刷新" href="javascript:location.reload()">人力资源列表</A>
  64. </b>
  65. </td>
  66. <td class="GbText" width="5%" bgColor="#c0d9e6"><b><A title="返回主界面" href="../UnitiveDocument/index.asp" target="main">返回</A></b></td>
  67. <td width="21%" background="../../images/line1.gif" height="1">&nbsp;
  68. </td>
  69. <td width="96%" height="1">
  70. <table id="AutoNumber5" style="BORDER-COLLAPSE: collapse" borderColor="#111111" height="1" cellSpacing="0" cellPadding="0" width="100%" border="0">
  71. <tr>
  72. <td align="middle" width="8%"><FONT face="宋体"></FONT>
  73. </td>
  74. <td align="middle" width="8%" height="1"><FONT face="宋体"></FONT>
  75. </td>
  76. </tr>
  77. </table>
  78. </td>
  79. </tr>
  80. </table>
  81. </td>
  82. </tr>
  83. <tr bgcolor="#c0d9e6">
  84. <td width="100%" colSpan="8"><asp:datagrid id="StaffList" runat="server" DataKeyField="Staff_ID" AllowPaging="True" Width="100%" AutoGenerateColumns="False" PageSize="20">
  85. <ItemStyle Font-Size="Smaller" ForeColor="Black"></ItemStyle>
  86. <HeaderStyle Font-Size="Smaller" Font-Names="宋体" HorizontalAlign="Center" ForeColor="Blue" VerticalAlign="Bottom" BackColor="LightBlue"></HeaderStyle>
  87. <Columns>
  88. <asp:TemplateColumn HeaderText="◎">
  89. <HeaderStyle Width="5%"></HeaderStyle>
  90. <ItemTemplate>
  91. <asp:CheckBox id="cb_StaffID" Checked="False" Runat="server"></asp:CheckBox>
  92. </ItemTemplate>
  93. <FooterTemplate>
  94. <FONT face="宋体"></FONT>
  95. </FooterTemplate>
  96. <EditItemTemplate>
  97. <FONT face="宋体"></FONT>
  98. </EditItemTemplate>
  99. </asp:TemplateColumn>
  100. <asp:BoundColumn DataField="Staff_ID" HeaderText="ID">
  101. <HeaderStyle Width="8%"></HeaderStyle>
  102. </asp:BoundColumn>
  103. <asp:BoundColumn DataField="RealName" HeaderText="真实姓名">
  104. <HeaderStyle Width="15%"></HeaderStyle>
  105. </asp:BoundColumn>
  106. <asp:BoundColumn DataField="Mobile" HeaderText="手机">
  107. <HeaderStyle Width="10%"></HeaderStyle>
  108. </asp:BoundColumn>
  109. <asp:TemplateColumn HeaderText="年龄">
  110. <ItemTemplate>
  111. <asp:Literal ID="old" Runat="server" Text='<%# GetAge(((DataRowView)Container.DataItem)["Birthday"].ToString()) %>'>
  112. </asp:Literal>
  113. </ItemTemplate>
  114. </asp:TemplateColumn>
  115. <asp:TemplateColumn HeaderText="性别">
  116. <ItemTemplate>
  117. <asp:Literal ID="sex" Runat="server" Text='<%# GetSex(((DataRowView)Container.DataItem)["sex"].ToString(),((DataRowView)Container.DataItem)["Staff_ID"].ToString()) %>'>
  118. </asp:Literal>
  119. </ItemTemplate>
  120. </asp:TemplateColumn>
  121. <asp:BoundColumn DataField="Email" HeaderText="EMAIL">
  122. <HeaderStyle Width="10%"></HeaderStyle>
  123. </asp:BoundColumn>
  124. <asp:BoundColumn DataField="Department_Name" HeaderText="所在部门"></asp:BoundColumn>
  125. <asp:BoundColumn DataField="RegistedDate" HeaderText="注册日期"></asp:BoundColumn>
  126. </Columns>
  127. <PagerStyle Visible="False" Font-Size="Smaller" Font-Names="宋体" HorizontalAlign="Right" Mode="NumericPages"></PagerStyle>
  128. </asp:datagrid></td>
  129. </tr>
  130. </table>
  131. </td>
  132. </tr>
  133. <tr bgColor="#c0d9e6">
  134. <td class="GbText" style="HEIGHT: 31px" width="83%" bgColor="#c0d9e6" height="31"><input class="ButtonCss" id="selectbutton" style="WIDTH: 40px; HEIGHT: 21px" onclick="SelectItem();" type="button" value="选择" runat="server" NAME="selectbutton">
  135. <input class="ButtonCss" id="btn_Go" style="WIDTH: 36px; HEIGHT: 20px" type="button" value="转到" runat="server" NAME="btn_Go">
  136. 第<asp:textbox id="txb_PageNo" Width="20" TextMode="SingleLine" CssClass="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #fffffb 1px solid; BORDER-LEFT: #ffffff 1px solid; COLOR: #5e5e5e; BORDER-BOTTOM: #ffffff 1px solid; TEXT-ALIGN: center" Runat="server"></asp:textbox>
  137. 页,每页显示<asp:textbox id="txb_ItemPerPage" onmouseover="high( this );" onmouseout="low( this );" Width="20" TextMode="SingleLine" CssClass="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #fffffb 1px solid; BORDER-LEFT: #ffffff 1px solid; COLOR: #5e5e5e; BORDER-BOTTOM: #ffffff 1px solid; TEXT-ALIGN: center" Runat="server"></asp:textbox>条记录,共有
  138. <asp:label id="lbl_totalrecord" runat="server" Width="10px" Height="8px"></asp:label>页记录.&nbsp;&nbsp;&nbsp;
  139. <INPUT class="ButtonCss" onclick="return confirm('您确认让选中的人员调职吗?');" type="submit" value="调职" id="cmdChangeDepartment" runat="server">
  140. <INPUT class="ButtonCss" onclick="return confirm('您确认让选中的人员复职吗?');" type="submit" value="复职" id="cmdRestoreDocument" runat="server">&nbsp;&nbsp;
  141. </td>
  142. <td style="HEIGHT: 31px" width="3%" height="31"><asp:imagebutton id="btn_first" runat="server" Width="23" Height="23" ToolTip="第一页" CommandArgument="first" ImageUrl="../../Images/top.gif" BorderWidth="0"></asp:imagebutton></td>
  143. <td style="HEIGHT: 31px" width="3%" height="31"><asp:imagebutton id="btn_pre" Width="23" Runat="server" ToolTip="前一页" CommandArgument="pre" ImageUrl="../../Images/prev.gif" BorderWidth="0"></asp:imagebutton></td>
  144. <td class="GbText" style="HEIGHT: 31px" align="middle" width="8%" height="31"><asp:label id="lbl_curpage" runat="server">Label</asp:label>/
  145. <asp:label id="lbl_totalpage" runat="server">Label</asp:label></td>
  146. <td style="HEIGHT: 31px" width="3%" height="31"><asp:imagebutton id="btn_next" Width="23" Runat="server" Height="23" ToolTip="下一页" CommandArgument="next" ImageUrl="../../Images/next.gif" BorderWidth="0"></asp:imagebutton></td>
  147. <td style="HEIGHT: 31px" width="3%" height="31"><asp:imagebutton id="btn_last" Width="23" Runat="server" Height="23" ToolTip="最后一页" CommandArgument="last" ImageUrl="../../Images/end.gif" BorderWidth="0"></asp:imagebutton></td>
  148. </tr>
  149. <tr>
  150. <td width="100%" colSpan="8">
  151. <table cellSpacing="0" cellPadding="0" width="100%" border="0">
  152. <tr>
  153. <td></td>
  154. <td align="right"><IMG height="25" src="../../images/endbott.gif" width="279"></td>
  155. </tr>
  156. </table>
  157. </td>
  158. </tr>
  159. </table>
  160. </form>
  161. </body>
  162. </HTML>