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

C#编程

开发平台:

C#

  1. <%@ Page language="c#" Codebehind="ListView.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.Department.ListView" %>
  2. <%@ Import namespace="System.Data"  %>
  3. <%@ Import namespace="System"%>
  4. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  5. <HTML>
  6. <HEAD>
  7. <TITLE>ListView</TITLE>
  8. <META http-equiv="Content-Type" content="text/html; charset=gb2312">
  9. <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
  10. <meta content="C#" name="CODE_LANGUAGE">
  11. <meta content="JavaScript" name="vs_defaultClientScript">
  12. <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  13. <LINK href="../../Css/BasicLayout.css" type="text/css" rel="stylesheet">
  14. <script language="javascript">
  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="javascript">
  36. var ball1 = new Image();
  37. var ball2 = new Image();
  38. ball1.src = 'images/ball1.gif';
  39. ball2.src = 'images/ball2.gif';
  40. var active = new Image();
  41. var nonactive = new Image();
  42. active.src = '../../images/maillistbutton2.gif';
  43. nonactive.src = '../../images/maillistbutton1.gif';
  44. function onMouseOver(img)
  45. {
  46. document.images[img].src = ball2.src;
  47. }
  48. function onMouseOut(img)
  49. {
  50. document.images[img].src = ball1.src;
  51. }
  52. function onOverBar(bar)
  53. {
  54. if (bar != null) {
  55. bar.style.backgroundImage = "url("+active.src+")";
  56. }
  57. }
  58. function onOutBar(bar)
  59. {
  60. if (bar != null) {
  61. bar.style.backgroundImage = "url("+nonactive.src+")";
  62. }
  63. }
  64. function selectAll(){
  65. var len=document.MailList.elements.length;
  66. var i;
  67.     for (i=0;i<len;i++){
  68. if (document.MailList.elements[i].type=="checkbox"){
  69.         document.MailList.elements[i].checked=true;
  70.  }
  71. }
  72. }
  73. function unSelectAll(){
  74.           var len=document.MailList.elements.length;
  75.           var i;
  76.           for (i=0;i<len;i++){
  77.                if (document.MailList.elements[i].type=="checkbox"){
  78.                   document.MailList.elements[i].checked=false; 
  79.                }   
  80.           } 
  81.     }
  82. </script>
  83. </HEAD>
  84. <body leftMargin="3" topMargin="3" MS_POSITIONING="GridLayout">
  85. <form id="ListView" runat="server">
  86. <TABLE id="Table1" cellSpacing="0" cellPadding="0" width="100%" border="0">
  87. <TR>
  88. <TD>
  89. <TABLE class="gbtext" id="Table2" cellSpacing="0" cellPadding="0" width="100%" border="0">
  90. <TR>
  91. <TD align="middle" width="90" 
  92.           background='<% Response.Write(DisplayType==1?"../../images/maillistbutton1.gif":"../../images/maillistbutton2.gif"); %>'  height="24"><asp:linkbutton id="lbOnline" runat="server" Font-Size="X-Small">在职员工</asp:linkbutton></TD>
  93. <TD align="middle" width="90"  background='<% Response.Write(DisplayType==0?"../../images/maillistbutton1.gif":"../../images/maillistbutton2.gif"); %>' height="24"><asp:linkbutton id="lbOffLine" runat="server" Font-Size="X-Small">离职员工</asp:linkbutton></TD>
  94. <TD align="right">
  95. <asp:Button id="cmdNewStaff" runat="server" Text="新员工" CssClass="redbuttoncss"></asp:Button>
  96. <asp:Button id="cmdDepartmentOperate" runat="server" Text="职位操作" CssClass="redbuttoncss"></asp:Button>
  97. <asp:Button id="cmdSetRight" runat="server" Text="权限管理" CssClass="redbuttoncss"></asp:Button>
  98. <asp:Button id="cmdOnDepartment" runat="server" Text="复职" CssClass="redbuttoncss"></asp:Button>
  99. <asp:Button id="cmdOffDepartment" runat="server" Text="离职" CssClass="redbuttoncss"></asp:Button>
  100. <asp:Button id="cmdChangeDepartment" runat="server" Text="调职" CssClass="redbuttoncss"></asp:Button>&nbsp;&nbsp;</TD>
  101. </TR>
  102. </TABLE>
  103. </TD>
  104. </TR>
  105. <TR>
  106. <TD>
  107. <asp:datagrid id="dbStaffList" runat="server" Width="100%" CellPadding="3" BackColor="White" BorderStyle="None" BorderColor="#93BEE2" BorderWidth="1px" PageSize="15" AutoGenerateColumns="False" AllowPaging="True" DataKeyField="Staff_ID" OnPageIndexChanged="DataGrid_PageChanged">
  108. <SelectedItemStyle Font-Bold="True" ForeColor="#CCFF99" BackColor="#009999"></SelectedItemStyle>
  109. <AlternatingItemStyle Font-Size="X-Small" BackColor="#E8F4FF"></AlternatingItemStyle>
  110. <ItemStyle Font-Size="X-Small" ForeColor="#003399" BackColor="White"></ItemStyle>
  111. <HeaderStyle Font-Size="X-Small" Font-Bold="True" ForeColor="White" BackColor="#337FB2"></HeaderStyle>
  112. <FooterStyle Font-Size="X-Small" HorizontalAlign="Right" ForeColor="#003399" BackColor="#99CCCC"></FooterStyle>
  113. <Columns>
  114. <asp:TemplateColumn HeaderText="ID">
  115. <HeaderStyle Width="20px"></HeaderStyle>
  116. <ItemTemplate>
  117. <asp:CheckBox id="Staff_ID" runat="server"></asp:CheckBox>
  118. </ItemTemplate>
  119. </asp:TemplateColumn>
  120. <asp:HyperLinkColumn Text="真实姓名" DataNavigateUrlField="staff_id" DataNavigateUrlFormatString="../Department/NewStaff.aspx?StaffID={0}&amp;ReturnPage=0" DataTextField="RealName" HeaderText="真实姓名">
  121. <HeaderStyle Width="100px"></HeaderStyle>
  122. </asp:HyperLinkColumn>
  123. <asp:BoundColumn DataField="Mobile" HeaderText="手机">
  124. <HeaderStyle Width="60px"></HeaderStyle>
  125. </asp:BoundColumn>
  126. <asp:BoundColumn DataField="Age" HeaderText="年龄">
  127. <HeaderStyle HorizontalAlign="Center" Width="30px"></HeaderStyle>
  128. <ItemStyle HorizontalAlign="Center"></ItemStyle>
  129. </asp:BoundColumn>
  130. <asp:BoundColumn DataField="SexName" HeaderText="性别">
  131. <HeaderStyle HorizontalAlign="Center" Width="30px"></HeaderStyle>
  132. <ItemStyle HorizontalAlign="Center"></ItemStyle>
  133. </asp:BoundColumn>
  134. <asp:BoundColumn DataField="Email" HeaderText="EMAIL">
  135. <HeaderStyle Width="100px"></HeaderStyle>
  136. </asp:BoundColumn>
  137. <asp:BoundColumn DataField="Department_Name" HeaderText="所在部门">
  138. <HeaderStyle Width="150px"></HeaderStyle>
  139. </asp:BoundColumn>
  140. <asp:BoundColumn DataField="RQ" HeaderText="注册日期">
  141. <HeaderStyle HorizontalAlign="Right" Width="80px"></HeaderStyle>
  142. <ItemStyle HorizontalAlign="Right"></ItemStyle>
  143. </asp:BoundColumn>
  144. </Columns>
  145. <PagerStyle Font-Size="X-Small" HorizontalAlign="Right" ForeColor="#003399" BackColor="#E8F4FF" Mode="NumericPages"></PagerStyle>
  146. </asp:datagrid></TD>
  147. </TR>
  148. <TR>
  149. <TD></TD>
  150. </TR>
  151. </TABLE>
  152. </form>
  153. </body>
  154. </HTML>