Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
4.6 KiB

  1. <!-- ############################################################################ -->
  2. <!-- ## UDDI Services ## -->
  3. <!-- ## Copyright (c) Microsoft Corporation. All rights reserved. ## -->
  4. <!-- ############################################################################ -->
  5. <%@ Control Language='C#' Inherits='UDDI.Web.CategoryBagControl' %>
  6. <%@ Register TagPrefix='uddi' Namespace='UDDI.Web' Assembly='uddi.web' %>
  7. <%@ Register Tagprefix='uddi' Tagname='CategoryBrowser' Src='../controls/categorybrowser.ascx' %>
  8. <%@ Import Namespace='System.Data' %>
  9. <%@ Import Namespace='UDDI' %>
  10. <script runat='server' >
  11. public bool FindMode;
  12. protected override void OnPreRender( EventArgs e )
  13. {
  14. if( grid.EditItemIndex >= 0 )
  15. {
  16. UddiButton btn = (UddiButton)GetControl( "addCategory", 2 );
  17. btn.Enabled = IsButtonEnabled();
  18. }
  19. base.OnPreRender( e );
  20. }
  21. protected bool IsButtonEnabled( )
  22. {
  23. if( grid.EditItemIndex >= 0 )
  24. {
  25. CategoryBrowserControl catb = (CategoryBrowserControl)GetControl( "browser", 1 );
  26. return ( !Utility.StringEmpty( catb.TModelKey ) && !Utility.StringEmpty(catb.KeyValue ) );
  27. }
  28. return false;
  29. }
  30. </script>
  31. <asp:Label ID='taxonomyID' Visible='false' Runat='server' />
  32. <asp:Label ID='taxonomyName' Visible='false' Runat='server' />
  33. <asp:Label ID='tModelKey' Visible='false' Runat='server' />
  34. <asp:Label ID='keyName' Visible='false' Runat='server' />
  35. <asp:Label ID='keyValue' Visible='false' Runat='Server' />
  36. <asp:Label ID='path' Visible='false' Runat='Server' />
  37. <asp:DataGrid
  38. ID='grid'
  39. CellPadding='4'
  40. CellSpacing='0'
  41. Border='0'
  42. Width='100%'
  43. AutoGenerateColumns='false'
  44. DataKeyField='Index'
  45. GridLines='None'
  46. OnItemCommand='CategoryBag_OnCommand'
  47. OnDeleteCommand='CategoryBag_OnDelete'
  48. ItemStyle-VerticalAlign='top'
  49. ShowFooter='true'
  50. Runat='Server'>
  51. <EditItemStyle CssClass='tableEditItem' />
  52. <HeaderStyle CssClass='tableHeader' />
  53. <ItemStyle CssClass='tableItem' />
  54. <AlternatingItemStyle CssClass='tableAlternatingItem' />
  55. <FooterStyle CssClass='tableFooter' />
  56. <Columns>
  57. <asp:BoundColumn DataField='Index' Visible='False' />
  58. <asp:TemplateColumn>
  59. <HeaderTemplate>
  60. <%# Localization.GetString( "HEADING_CATEGORIES" ) %>
  61. </HeaderTemplate>
  62. <ItemTemplate>
  63. <uddi:UddiLabel
  64. Text='[[TAG_CATEGORIZATION_SCHEME]]'
  65. CssClass='lightHeader'
  66. Runat='Server' />
  67. <%# ((DataRowView)Container.DataItem)[ "TModelName" ] %><br>
  68. <uddi:UddiLabel
  69. Text='[[TAG_KEY_NAME]]'
  70. CssClass='lightHeader'
  71. Runat='Server' />
  72. <%# ((DataRowView)Container.DataItem)[ "KeyName" ] %><br>
  73. <uddi:UddiLabel
  74. Text='[[TAG_KEY_VALUE]]'
  75. CssClass='lightHeader'
  76. Runat='Server' />
  77. <%# ((DataRowView)Container.DataItem)[ "KeyValue" ] %>
  78. </ItemTemplate>
  79. <EditItemTemplate>
  80. <uddi:CategoryBrowser
  81. Runat='server'
  82. ID='browser'
  83. ShowAllCategories='true'
  84. />
  85. </EditItemTemplate>
  86. <FooterTemplate>
  87. <uddi:UddiLabel
  88. Text='<%# String.Format( Localization.GetString( "TEXT_RECORD_COUNT" ), categoryBag.Count ) %>'
  89. ForeColor='#000000'
  90. Visible='<%# !FindMode%>'
  91. Runat='server' />
  92. </FooterTemplate>
  93. </asp:TemplateColumn>
  94. <asp:TemplateColumn HeaderStyle-Width='150px'>
  95. <HeaderTemplate>
  96. <%# Localization.GetString( "HEADING_ACTIONS" ) %>
  97. </HeaderTemplate>
  98. <ItemTemplate>
  99. <uddi:UddiButton
  100. ID='delete'
  101. CommandName='Delete'
  102. Text='[[BUTTON_DELETE]]'
  103. Width='70px'
  104. CssClass='button'
  105. CausesValidation='false'
  106. EditModeDisable='true'
  107. Runat='server' />
  108. </ItemTemplate>
  109. <EditItemTemplate>
  110. <uddi:UddiButton
  111. ID='addCategory'
  112. Text='[[BUTTON_ADD_CATEGORY]]'
  113. Width='146'
  114. CssClass='button'
  115. CommandName='select'
  116. CausesValidation='false'
  117. Enabled='false'
  118. Runat='server' /><br>
  119. <uddi:UddiButton
  120. ID='cancel'
  121. Text='[[BUTTON_CANCEL]]'
  122. Width='146'
  123. CssClass='button'
  124. CommandName='cancel'
  125. CausesValidation='false'
  126. Focus='true'
  127. Runat='Server' />
  128. </EditItemTemplate>
  129. <FooterTemplate>
  130. <uddi:UddiButton
  131. Text='[[BUTTON_ADD_CATEGORY]]'
  132. CommandName='add'
  133. Width='146px'
  134. CssClass='button'
  135. CausesValidation='false'
  136. EditModeDisable='true'
  137. Runat='Server' />
  138. </FooterTemplate>
  139. </asp:TemplateColumn>
  140. </Columns>
  141. </asp:DataGrid>