ProjectTreeView.aspx
上传用户:xuming1973
上传日期:2014-02-27
资源大小:17511k
文件大小:4k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

C#

  1. <%@ Register TagPrefix="uc1" TagName="ControlProjectTreeView" Src="../../Inc/ControlProjectTreeView.ascx" %>
  2. <%@ Page language="c#" Codebehind="ProjectTreeView.aspx.cs" AutoEventWireup="false" Inherits="UDS.TreeView" %>
  3. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  4. <HTML>
  5. <HEAD>
  6. <TITLE>文档一体化系统</TITLE>
  7. <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
  8. <meta content="C#" name="CODE_LANGUAGE">
  9. <meta content="JavaScript" name="vs_defaultClientScript">
  10. <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  11. <LINK href="../../Css/basiclayout.css" rel="stylesheet">
  12. <style>A.linkFooter:link {
  13. FONT-WEIGHT: normal; FONT-SIZE: 9px; COLOR: #006699; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
  14. }
  15. A.linkMenu:link {
  16. FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #006699; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
  17. }
  18. A.linkMenu:visited {
  19. FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #006699; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
  20. }
  21. A.linkMenu:active {
  22. FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #ff3300; TEXT-DECORATION: underline
  23. }
  24. A.linkMenu:hover {
  25. FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #ff3300; TEXT-DECORATION: none
  26. }
  27. BODY {
  28. SCROLLBAR-FACE-COLOR: #024289; SCROLLBAR-HIGHLIGHT-COLOR: #024289; SCROLLBAR-SHADOW-COLOR: #024289; SCROLLBAR-3DLIGHT-COLOR: #e8f4ff; SCROLLBAR-ARROW-COLOR: #949494; SCROLLBAR-TRACK-COLOR: #0051a5; SCROLLBAR-DARKSHADOW-COLOR: black; SCROLLBAR-BASE-COLOR: #e8f4ff
  29. }
  30. .borderMenuLayer {
  31. BORDER-LEFT-COLOR: #c9c9c9; BORDER-BOTTOM-COLOR: #c9c9c9; BORDER-TOP-COLOR: #c9c9c9; BORDER-RIGHT-COLOR: #c9c9c9
  32. }
  33. .borderMenuLayerOver {
  34. FONT-SIZE: 9pt; BORDER-LEFT-COLOR: #949494; BORDER-BOTTOM-COLOR: #949494; BORDER-TOP-COLOR: #949494; BORDER-RIGHT-COLOR: #949494
  35. }
  36. .textWhite {
  37. FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #999999; LINE-HEIGHT: 22px; FONT-FAMILY: "宋体"
  38. }
  39. .top {
  40. FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: "Arial", "Helvetica", "sans-serif"; TEXT-DECORATION: none
  41. }
  42. </style>
  43. <script language="javascript">
  44. </script>
  45. </HEAD>
  46. <body style="BACKGROUND-POSITION: right 50%; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-REPEAT: no-repeat" leftMargin="0" background="../../Images/lefttreebg.gif" topMargin="0" bgcolor="#024289" onload="SetStatus()">
  47. <form id="Projecttreeview" method="post" runat="server">
  48. <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
  49. <TR>
  50. <TD vAlign="center" height="30"><FONT face="宋体">
  51. <TABLE id="Table1" height="30" cellSpacing="0" cellPadding="0" width="100%" border="0">
  52. <TR>
  53. <TD bgcolor="#024289">&nbsp;<asp:image id="Image1" runat="server" ImageUrl="../../DataImages/xpDesktop.gif"></asp:image><FONT face="宋体">&nbsp;<A  style="TEXT-DECORATION: none" href="Desktop.aspx" target="MainFrame"><font color=white>桌面(<%=UserName%>)</font></A></FONT></TD>
  54. <TD width="1"></TD>
  55. </TR>
  56. </TABLE>
  57. </FONT>
  58. </TD>
  59. </TR>
  60. <tr vAlign="top">
  61. <td><uc1:controlprojecttreeview id="ControlProjectTreeView1" runat="server"></uc1:controlprojecttreeview></td>
  62. </tr>
  63. </table>
  64. </form>
  65. <script language="javascript">
  66. function SetStatus()
  67. {
  68. try{
  69. myTreeView = document.all.ControlProjectTreeView1_TreeView1;
  70. var urlstr=location.href.split("?")[1];
  71. if (urlstr!=null)
  72. {
  73. urlstr=urlstr.split("classID=")[1];
  74. var classID=urlstr.split("&")[0];//取得classID值
  75. var mNodeArray=new Array();
  76. mNodeArray=myTreeView.getChildren();
  77. CheckAll(mNodeArray,classID);
  78. mNodeArray=null;
  79. }
  80. }
  81. catch(e){alert('error occur!'+e);}
  82. }
  83. function ExpandAllParentNode(node)
  84. {
  85. if(node!=null){
  86. node.setAttribute("Expanded","True");
  87. ExpandAllParentNode(node.getParent());
  88. }
  89. }
  90. function CheckAll(arr,classID)
  91. {
  92. var i;
  93. for(i=0;i<arr.length;i++)
  94. {
  95. var mNode=arr[i];
  96. var currNodeID = mNode.getAttribute("ID");
  97. if(currNodeID==classID)
  98. {
  99. ExpandAllParentNode(mNode);
  100. break;
  101. }
  102. if((mNode.getChildren().lengh)!=0)
  103. CheckAll(mNode.getChildren(),classID);//递归遍历节点
  104. }
  105.     }
  106. </script>
  107. </body>
  108. </HTML>