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.

787 lines
23 KiB

  1. <%@ Control Language='C#' ClassName='PublisherAssertionControl' Inherits='UDDI.Web.UddiControl' %>
  2. <%@ Register TagPrefix='uddi' Namespace='UDDI.Web' Assembly='uddi.web' %>
  3. <%@ Register TagPrefix='uddi' Tagname='BusinessSelector' Src='../controls/businessselector.ascx' %>
  4. <%@ Import Namespace='System.Data' %>
  5. <%@ Import Namespace='UDDI.API' %>
  6. <%@ Import Namespace='UDDI.API.Business' %>
  7. <%@ Import Namespace='UDDI.API.ServiceType' %>
  8. <%@ Import Namespace='UDDI' %>
  9. <%@ Import Namespace='UDDI.Diagnostics' %>
  10. <%@ Import Namespace='UDDI.Web' %>
  11. <script language='C#' runat='server'>
  12. protected AssertionStatusItemCollection statusItems;
  13. protected DataView relationships;
  14. protected string businessKey;
  15. protected bool allowEdit = false;
  16. public void RefreshDataGrids()
  17. {
  18. PopulateDataGrid( false );
  19. if( allowEdit )
  20. PopulateRequestsDataGrid();
  21. }
  22. public void Initialize( string businessKey, bool allowEdit )
  23. {
  24. this.businessKey = businessKey;
  25. this.allowEdit = allowEdit;
  26. panelRequests.Visible = allowEdit;
  27. grid.Columns[ 7 ].Visible = allowEdit && grid.EditItemIndex < 0;
  28. grid.Columns[ 8 ].Visible = allowEdit;
  29. }
  30. protected void Page_Init( object sender, EventArgs e )
  31. {
  32. //
  33. // Localization
  34. //
  35. grid.Columns[ 6 ].HeaderText = Localization.GetString( "HEADING_PUBLISHER_ASSERTIONS" );
  36. grid.Columns[ 7 ].HeaderText = Localization.GetString( "HEADING_STATUS" );
  37. grid.Columns[ 8 ].HeaderText = Localization.GetString( "HEADING_ACTIONS" );
  38. gridRequests.Columns[ 6 ].HeaderText = Localization.GetString( "HEADING_PUBLISHER_ASSERTIONS" );
  39. gridRequests.Columns[ 7 ].HeaderText = Localization.GetString( "HEADING_STATUS" );
  40. gridRequests.Columns[ 8 ].HeaderText = Localization.GetString( "HEADING_ACTIONS" );
  41. }
  42. protected void Page_Load( object sender, EventArgs e )
  43. {
  44. if( !Page.IsPostBack )
  45. {
  46. PopulateDataGrid( false );
  47. if( allowEdit )
  48. PopulateRequestsDataGrid();
  49. }
  50. relationships = GetRelationships();
  51. }
  52. protected Control GetControl( string id, int cell )
  53. {
  54. return grid.Items[ grid.EditItemIndex ].Cells[ cell ].FindControl( id );
  55. }
  56. protected void GetStatusItems()
  57. {
  58. if( null == statusItems )
  59. {
  60. statusItems = new AssertionStatusItemCollection();
  61. statusItems.Get( CompletionStatusType.Complete );
  62. if( allowEdit )
  63. {
  64. statusItems.Get( CompletionStatusType.FromKeyIncomplete );
  65. statusItems.Get( CompletionStatusType.ToKeyIncomplete );
  66. }
  67. }
  68. }
  69. protected void PopulateDataGrid( bool createNewRow )
  70. {
  71. string pending = Localization.GetString( "HEADING_PUBLISHER_ASSERTION_PENDING" );
  72. string complete = Localization.GetString( "HEADING_PUBLISHER_ASSERTION_COMPLETE" );
  73. DataTable table = new DataTable();
  74. DataRow row;
  75. int index = 0;
  76. table.Columns.Add( new DataColumn( "Index", typeof( int ) ) );
  77. table.Columns.Add( new DataColumn( "Status", typeof( string ) ) );
  78. table.Columns.Add( new DataColumn( "FromKey", typeof( string ) ) );
  79. table.Columns.Add( new DataColumn( "ToKey", typeof( string ) ) );
  80. table.Columns.Add( new DataColumn( "TModelKey", typeof( string ) ) );
  81. table.Columns.Add( new DataColumn( "KeyName", typeof( string ) ) );
  82. table.Columns.Add( new DataColumn( "KeyValue", typeof( string ) ) );
  83. table.Columns.Add( new DataColumn( "TModelName", typeof( string ) ) );
  84. //
  85. // Walk through the collection of publisher assertions.
  86. //
  87. if( allowEdit )
  88. {
  89. GetStatusItems();
  90. foreach( AssertionStatusItem statusItem in statusItems )
  91. {
  92. //
  93. // Make sure that this business is referenced by either the to or
  94. // from key of the assertion.
  95. //
  96. if( statusItem.FromKey != businessKey && statusItem.ToKey != businessKey )
  97. continue;
  98. row = table.NewRow();
  99. row[ 0 ] = index;
  100. row[ 2 ] = statusItem.FromKey;
  101. row[ 3 ] = statusItem.ToKey;
  102. row[ 4 ] = statusItem.KeyedReference.TModelKey;
  103. row[ 5 ] = statusItem.KeyedReference.KeyName;
  104. row[ 6 ] = statusItem.KeyedReference.KeyValue;
  105. row[ 7 ] = statusItem.KeyedReference.TModelKey;
  106. //
  107. // Get the status of the assertion. It is either complete,
  108. // pending (the from or to key references another publisher
  109. // that has not yet accepted the assertion), or a request
  110. // (another publisher is requesting a publisher assertion).
  111. //
  112. if( CompletionStatusType.Complete == statusItem.CompletionStatus )
  113. {
  114. row[ 1 ] = complete;
  115. }
  116. else if( CompletionStatusType.ToKeyIncomplete == statusItem.CompletionStatus )
  117. {
  118. if( null != statusItem.KeysOwned.ToKey )
  119. continue;
  120. else
  121. row[ 1 ] = pending;
  122. }
  123. else
  124. {
  125. if( null != statusItem.KeysOwned.FromKey )
  126. continue;
  127. else
  128. row[ 1 ] = pending;
  129. }
  130. table.Rows.Add( row );
  131. index ++;
  132. }
  133. }
  134. else
  135. {
  136. FindRelatedBusinesses find = new FindRelatedBusinesses();
  137. find.BusinessKey = businessKey;
  138. RelatedBusinessList relatedList = find.Find();
  139. foreach( RelatedBusinessInfo relatedInfo in relatedList.RelatedBusinessInfos )
  140. {
  141. foreach( KeyedReference keyedReference in relatedInfo.SharedRelationshipsFrom.KeyedReferences )
  142. {
  143. row = table.NewRow();
  144. row[ 0 ] = index;
  145. row[ 1 ] = complete;
  146. row[ 2 ] = businessKey;
  147. row[ 3 ] = relatedInfo.BusinessKey;
  148. row[ 4 ] = keyedReference.TModelKey;
  149. row[ 5 ] = keyedReference.KeyName;
  150. row[ 6 ] = keyedReference.KeyValue;
  151. row[ 7 ] = keyedReference.TModelKey;
  152. table.Rows.Add( row );
  153. index ++;
  154. }
  155. foreach( KeyedReference keyedReference in relatedInfo.SharedRelationshipsTo.KeyedReferences )
  156. {
  157. row = table.NewRow();
  158. row[ 0 ] = index;
  159. row[ 1 ] = complete;
  160. row[ 2 ] = relatedInfo.BusinessKey;
  161. row[ 3 ] = businessKey;
  162. row[ 4 ] = keyedReference.TModelKey;
  163. row[ 5 ] = keyedReference.KeyName;
  164. row[ 6 ] = keyedReference.KeyValue;
  165. row[ 7 ] = keyedReference.TModelKey;
  166. table.Rows.Add( row );
  167. index ++;
  168. }
  169. }
  170. }
  171. //
  172. // If this is an add operation, add a new blank row so the data grid
  173. // has something to work with.
  174. //
  175. if( createNewRow )
  176. {
  177. row = table.NewRow();
  178. row[ 0 ] = index;
  179. row[ 1 ] = "";
  180. row[ 2 ] = "";
  181. row[ 3 ] = "";
  182. row[ 4 ] = "";
  183. row[ 5 ] = "";
  184. row[ 6 ] = "";
  185. row[ 7 ] = "";
  186. table.Rows.Add( row );
  187. index ++;
  188. }
  189. grid.DataSource = table.DefaultView;
  190. grid.DataBind();
  191. }
  192. protected void PopulateRequestsDataGrid()
  193. {
  194. DataTable table = new DataTable();
  195. DataRow row;
  196. int index = 0;
  197. table.Columns.Add( new DataColumn( "Index", typeof( int ) ) );
  198. table.Columns.Add( new DataColumn( "Status", typeof( string ) ) );
  199. table.Columns.Add( new DataColumn( "FromKey", typeof( string ) ) );
  200. table.Columns.Add( new DataColumn( "ToKey", typeof( string ) ) );
  201. table.Columns.Add( new DataColumn( "TModelKey", typeof( string ) ) );
  202. table.Columns.Add( new DataColumn( "KeyName", typeof( string ) ) );
  203. table.Columns.Add( new DataColumn( "KeyValue", typeof( string ) ) );
  204. table.Columns.Add( new DataColumn( "TModelName", typeof( string ) ) );
  205. //
  206. // Walk through the collection of publisher assertions.
  207. //
  208. GetStatusItems();
  209. foreach( AssertionStatusItem statusItem in statusItems )
  210. {
  211. //
  212. // Make sure that this business is referenced by either the to or
  213. // from key of the assertion.
  214. //
  215. if( statusItem.FromKey != businessKey && statusItem.ToKey != businessKey )
  216. continue;
  217. row = table.NewRow();
  218. row[ 0 ] = index;
  219. row[ 1 ] = "";
  220. row[ 2 ] = statusItem.FromKey;
  221. row[ 3 ] = statusItem.ToKey;
  222. row[ 4 ] = statusItem.KeyedReference.TModelKey;
  223. row[ 5 ] = statusItem.KeyedReference.KeyName;
  224. row[ 6 ] = statusItem.KeyedReference.KeyValue;
  225. row[ 7 ] = statusItem.KeyedReference.TModelKey;
  226. //
  227. // Get the status of the assertion. It is either complete,
  228. // pending (the from or to key references another publisher
  229. // that has not yet accepted the assertion), or a request
  230. // (another publisher is requesting a publisher assertion).
  231. //
  232. if( CompletionStatusType.Complete == statusItem.CompletionStatus )
  233. continue;
  234. else if( CompletionStatusType.ToKeyIncomplete == statusItem.CompletionStatus && null == statusItem.KeysOwned.ToKey )
  235. continue;
  236. else if( CompletionStatusType.FromKeyIncomplete == statusItem.CompletionStatus && null == statusItem.KeysOwned.FromKey )
  237. continue;
  238. table.Rows.Add( row );
  239. index ++;
  240. }
  241. gridRequests.DataSource = table.DefaultView;
  242. gridRequests.DataBind();
  243. if( 0 == index )
  244. {
  245. noRecords.Visible = true;
  246. //gridRequests.Visible = false;
  247. }
  248. else
  249. {
  250. noRecords.Visible = false;
  251. //gridRequests.Visible = true;
  252. }
  253. }
  254. protected DataView GetBusinessNames()
  255. {
  256. DataTable table = new DataTable();
  257. DataRow row;
  258. table.Columns.Add( new DataColumn( "BusinessKey", typeof( string ) ) );
  259. table.Columns.Add( new DataColumn( "Name", typeof( string ) ) );
  260. FindBusiness find = new FindBusiness();
  261. find.Names.Add( null, "%" );
  262. BusinessList businessList = find.Find();
  263. BusinessInfoCollection businessInfos = businessList.BusinessInfos;
  264. businessInfos.Sort();
  265. foreach( BusinessInfo businessInfo in businessInfos )
  266. {
  267. row = table.NewRow();
  268. row[ 0 ] = businessInfo.BusinessKey;
  269. row[ 1 ] = businessInfo.Names[ 0 ].Value;
  270. table.Rows.Add( row );
  271. }
  272. return table.DefaultView;
  273. }
  274. protected DataView GetRelationships()
  275. {
  276. DataTable table = new DataTable();
  277. DataRow row;
  278. table.Columns.Add( new DataColumn( "Index", typeof( int ) ) );
  279. table.Columns.Add( new DataColumn( "TModelKey", typeof( string ) ) );
  280. table.Columns.Add( new DataColumn( "TModelName", typeof( string ) ) );
  281. table.Columns.Add( new DataColumn( "KeyName", typeof( string ) ) );
  282. table.Columns.Add( new DataColumn( "KeyValue", typeof( string ) ) );
  283. FindTModel find = new FindTModel();
  284. find.Name = "%";
  285. find.CategoryBag = new KeyedReferenceCollection();
  286. find.CategoryBag.Add( "types", "relationship", "uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4" );
  287. TModelList tModelList = find.Find();
  288. int index = 0;
  289. foreach( TModelInfo tModelInfo in tModelList.TModelInfos )
  290. {
  291. int taxonomyID = Taxonomy.GetTaxonomyID( tModelInfo.TModelKey );
  292. if( taxonomyID >= 0 )
  293. {
  294. DataView viewTaxonomyValues = Taxonomy.GetTaxonomyChildrenRoot( taxonomyID );
  295. foreach( DataRowView rowTaxonomyValues in viewTaxonomyValues )
  296. {
  297. row = table.NewRow();
  298. row[ 0 ] = index;
  299. row[ 1 ] = tModelInfo.TModelKey;
  300. row[ 2 ] = tModelInfo.Name;
  301. row[ 3 ] = rowTaxonomyValues[ "keyName" ];
  302. row[ 4 ] = rowTaxonomyValues[ "keyValue" ];
  303. table.Rows.Add( row );
  304. index ++;
  305. }
  306. }
  307. }
  308. return table.DefaultView;
  309. }
  310. protected void Assertion_OnUpdate( object sender, DataGridCommandEventArgs e )
  311. {
  312. Page.Validate();
  313. if( Page.IsValid )
  314. {
  315. DropDownList relationship = (DropDownList)e.Item.FindControl( "relationship" );
  316. HtmlInputRadioButton from = (HtmlInputRadioButton)grid.Items[ grid.EditItemIndex ].Cells[ 6 ].FindControl( "from" );
  317. HtmlInputRadioButton to = (HtmlInputRadioButton)grid.Items[ grid.EditItemIndex ].Cells[ 6 ].FindControl( "to" );
  318. UddiLabel otherBusinessKey = (UddiLabel)GetControl( "otherBusinessKey", 6 );
  319. PublisherAssertion assertion = new PublisherAssertion();
  320. DataRowView keyedReference = relationships[ Convert.ToInt32( relationship.SelectedItem.Value ) ];
  321. assertion.KeyedReference = new KeyedReference();
  322. assertion.KeyedReference.TModelKey = (string)keyedReference[ "TModelKey" ];
  323. assertion.KeyedReference.KeyName = (string)keyedReference[ "KeyName" ];
  324. assertion.KeyedReference.KeyValue = (string)keyedReference[ "KeyValue" ];
  325. if( from.Checked )
  326. {
  327. assertion.FromKey = businessKey;
  328. assertion.ToKey = otherBusinessKey.Text;
  329. }
  330. else
  331. {
  332. assertion.FromKey = otherBusinessKey.Text;
  333. assertion.ToKey = businessKey;
  334. }
  335. assertion.Save();
  336. grid.EditItemIndex = -1;
  337. CancelEditMode();
  338. PopulateDataGrid( false );
  339. PopulateRequestsDataGrid();
  340. }
  341. }
  342. protected void Assertion_OnCancel( object sender, DataGridCommandEventArgs e )
  343. {
  344. grid.EditItemIndex = -1;
  345. CancelEditMode();
  346. PopulateDataGrid( false );
  347. PopulateRequestsDataGrid();
  348. }
  349. protected void Assertion_OnDelete( object sender, DataGridCommandEventArgs e )
  350. {
  351. grid.EditItemIndex = -1;
  352. PublisherAssertion assertion = new PublisherAssertion();
  353. DataGridItem item = grid.Items[ e.Item.ItemIndex ];
  354. assertion.FromKey = item.Cells[ 1 ].Text;
  355. assertion.ToKey = item.Cells[ 2 ].Text;
  356. assertion.KeyedReference.TModelKey = item.Cells[ 3 ].Text;
  357. assertion.KeyedReference.KeyName = item.Cells[ 4 ].Text;
  358. assertion.KeyedReference.KeyValue = item.Cells[ 5 ].Text;
  359. assertion.Delete();
  360. PopulateDataGrid( false );
  361. PopulateRequestsDataGrid();
  362. }
  363. protected void Assertion_OnAccept( object sender, DataGridCommandEventArgs e )
  364. {
  365. PublisherAssertion assertion = new PublisherAssertion();
  366. DataGridItem item = gridRequests.Items[ e.Item.ItemIndex ];
  367. assertion.FromKey = item.Cells[ 1 ].Text;
  368. assertion.ToKey = item.Cells[ 2 ].Text;
  369. assertion.KeyedReference.TModelKey = item.Cells[ 3 ].Text;
  370. assertion.KeyedReference.KeyName = item.Cells[ 4 ].Text;
  371. assertion.KeyedReference.KeyValue = item.Cells[ 5 ].Text;
  372. assertion.Save();
  373. PopulateDataGrid( false );
  374. PopulateRequestsDataGrid();
  375. }
  376. protected void Assertion_OnAdd( object sender, EventArgs e )
  377. {
  378. grid.EditItemIndex = grid.Items.Count;
  379. SetEditMode();
  380. PopulateDataGrid( true );
  381. DataView businesses = GetBusinessNames();
  382. Panel selectPanel = (Panel)GetControl( "selectPanel", 6 );
  383. Panel directionPanel = (Panel)GetControl( "directionPanel", 6 );
  384. selectPanel.Visible = true;
  385. directionPanel.Visible = false;
  386. grid.Columns[ 7 ].Visible = false;
  387. }
  388. protected void Assertion_OnItemCommand( object sender, DataGridCommandEventArgs e )
  389. {
  390. switch( e.CommandName.ToLower() )
  391. {
  392. case "accept":
  393. Assertion_OnAccept( sender, e );
  394. break;
  395. }
  396. }
  397. protected void Selector_OnSelect( object sender, string key, string name )
  398. {
  399. UddiLabel otherBusiness = (UddiLabel)GetControl( "otherBusiness", 6 );
  400. UddiLabel otherBusinessKey = (UddiLabel)GetControl( "otherBusinessKey", 6 );
  401. UddiLabel leftOtherBusiness = (UddiLabel)GetControl( "leftOtherBusiness", 6 );
  402. UddiLabel rightOtherBusiness = (UddiLabel)GetControl( "rightOtherBusiness", 6 );
  403. otherBusinessKey.Text = key;
  404. otherBusiness.Text = name;
  405. leftOtherBusiness.Text = name;
  406. rightOtherBusiness.Text = name;
  407. Panel selectPanel = (Panel)GetControl( "selectPanel", 6 );
  408. Panel directionPanel = (Panel)GetControl( "directionPanel", 6 );
  409. UddiButton add = (UddiButton)GetControl( "add", 7 );
  410. add.Enabled = true;
  411. selectPanel.Visible = false;
  412. directionPanel.Visible = true;
  413. }
  414. protected void Change_OnClick( object sender, EventArgs e )
  415. {
  416. UddiButton add = (UddiButton)GetControl( "add", 7 );
  417. add.Enabled = false;
  418. Panel selectPanel = (Panel)GetControl( "selectPanel", 6 );
  419. Panel directionPanel = (Panel)GetControl( "directionPanel", 6 );
  420. BusinessSelector selector = (BusinessSelector)GetControl( "selector",6 );
  421. selectPanel.Visible = true;
  422. directionPanel.Visible = false;
  423. selector.ResetControl();
  424. }
  425. </script>
  426. <asp:DataGrid
  427. ID='grid'
  428. Cellpadding='4'
  429. Cellspacing='0'
  430. Border='0'
  431. Width='100%'
  432. AutoGenerateColumns='false'
  433. DataKeyField='Index'
  434. OnItemCommand='Assertion_OnItemCommand'
  435. OnDeleteCommand='Assertion_OnDelete'
  436. OnUpdateCommand='Assertion_OnUpdate'
  437. OnCancelCommand='Assertion_OnCancel'
  438. ShowFooter='True'
  439. ItemStyle-VerticalAlign='top'
  440. Runat='Server'>
  441. <EditItemStyle CssClass='tableEditItem' />
  442. <HeaderStyle CssClass='tableHeader' />
  443. <ItemStyle CssClass='tableItem' />
  444. <AlternatingItemStyle CssClass='tableAlternatingItem' />
  445. <FooterStyle CssClass='tableFooter' />
  446. <Columns>
  447. <asp:BoundColumn
  448. DataField='Index'
  449. Visible='false'
  450. ReadOnly='true' />
  451. <asp:BoundColumn
  452. DataField='FromKey'
  453. Visible='false'
  454. ReadOnly='true' />
  455. <asp:BoundColumn
  456. DataField='ToKey'
  457. Visible='false'
  458. ReadOnly='true' />
  459. <asp:BoundColumn
  460. DataField='TModelKey'
  461. Visible='false'
  462. ReadOnly='true' />
  463. <asp:BoundColumn
  464. DataField='KeyName'
  465. Visible='false'
  466. ReadOnly='true' />
  467. <asp:BoundColumn
  468. DataField='KeyValue'
  469. Visible='false'
  470. ReadOnly='true' />
  471. <asp:TemplateColumn>
  472. <ItemTemplate>
  473. <uddi:UddiLabel
  474. Text='<%# Lookup.BusinessName( ((DataRowView)Container.DataItem )[ "FromKey" ].ToString() ) %>'
  475. Runat='Server' /> <img src='../images/redarrow.gif' align='absmiddle' border='0'>
  476. <uddi:UddiLabel
  477. Text='<%# Lookup.BusinessName( ((DataRowView)Container.DataItem )[ "ToKey" ].ToString() ) %>'
  478. Runat='Server' /><br>
  479. (<uddi:UddiLabel
  480. Text='<%# ((DataRowView)Container.DataItem )[ "KeyValue" ].ToString() %>'
  481. Runat='Server' />)
  482. </ItemTemplate>
  483. <EditItemTemplate>
  484. <asp:Panel ID='selectPanel' Runat='server'>
  485. <uddi:UddiLabel
  486. Text='[[TAG_SELECT_BUSINESS_FOR_RELATIONSHIP]]'
  487. CssClass='lightHeader'
  488. Runat='server' /><br>
  489. <br>
  490. <uddi:BusinessSelector
  491. ID='selector'
  492. OnSelect='Selector_OnSelect'
  493. Runat='server' />
  494. </asp:Panel>
  495. <asp:Panel ID='directionPanel' Runat='server'>
  496. <uddi:UddiLabel
  497. Text='[[TAG_OTHER_BUSINESS]]'
  498. CssClass='header'
  499. Runat='server' /><br>
  500. <uddi:UddiLabel
  501. ID='otherBusiness'
  502. Runat='server' />
  503. <uddi:UddiLabel
  504. ID='otherBusinessKey'
  505. Visible='false'
  506. Runat='server' />
  507. <uddi:UddiButton
  508. Text='[[BUTTON_CHANGE]]'
  509. OnClick='Change_OnClick'
  510. Runat='server' /><br>
  511. <br>
  512. <uddi:UddiLabel
  513. Text='[[TAG_RELATIONSHIP]]'
  514. CssClass='lightHeader'
  515. Runat='server' /><br>
  516. <asp:DropDownList
  517. ID='relationship'
  518. DataSource='<%# relationships %>'
  519. DataTextField='KeyValue'
  520. DataValueField='Index'
  521. Runat='server' /><br>
  522. <br>
  523. <uddi:UddiLabel
  524. Text='[[TAG_DIRECTION]]'
  525. CssClass='lightHeader'
  526. Runat='server' /><br>
  527. <input id='from' type='radio' checked='true' runat='server' /> <b><uddi:UddiLabel Text='<%# Lookup.BusinessName( businessKey ) %>' Runat='server' /></b> <img src='../images/redarrow.gif' align='absmiddle' border='0'> <uddi:UddiLabel ID='rightOtherBusiness' Runat='server' /><br>
  528. <input id='to' type='radio' runat='server' /> <uddi:UddiLabel ID='leftOtherBusiness' Runat='server' /> <img src='../images/redarrow.gif' align='absmiddle' border='0'> <b><uddi:UddiLabel Text='<%# Lookup.BusinessName( businessKey ) %>' Runat='server' /></b><br>
  529. </asp:Panel>
  530. </EditItemTemplate>
  531. </asp:TemplateColumn>
  532. <asp:TemplateColumn HeaderStyle-Width='150px'>
  533. <ItemTemplate>
  534. <uddi:UddiLabel Text='<%# ((DataRowView)Container.DataItem )[ "Status" ] %>' Runat='server' />
  535. </ItemTemplate>
  536. </asp:TemplateColumn>
  537. <asp:TemplateColumn HeaderStyle-Width='160px'>
  538. <ItemTemplate>
  539. <uddi:UddiButton
  540. CommandName='Delete'
  541. Text='[[BUTTON_DELETE]]'
  542. Width='70px'
  543. CssClass='button'
  544. CausesValidation='false'
  545. EditModeDisable='true'
  546. Runat='server' />
  547. </ItemTemplate>
  548. <EditItemTemplate>
  549. <nobr>
  550. <uddi:UddiButton
  551. ID='add'
  552. CommandName='Update'
  553. Text='[[BUTTON_ADD]]'
  554. Width='70px'
  555. CssClass='button'
  556. CausesValidation='true'
  557. Enabled='false'
  558. Runat='server' />
  559. <uddi:UddiButton
  560. CommandName='Cancel'
  561. Text='[[BUTTON_CANCEL]]'
  562. Width='70px'
  563. CssClass='button'
  564. CausesValidation='false'
  565. Runat='server' />
  566. </nobr>
  567. </EditItemTemplate>
  568. <FooterTemplate>
  569. <uddi:UddiButton
  570. Text='[[BUTTON_ADD_ASSERTION]]'
  571. Width='152px'
  572. CssClass='button'
  573. OnClick='Assertion_OnAdd'
  574. CausesValidation='false'
  575. EditModeDisable='true'
  576. Runat='Server' />
  577. </FooterTemplate>
  578. </asp:TemplateColumn>
  579. </Columns>
  580. </asp:DataGrid>
  581. <asp:Panel ID='panelRequests' Runat='server'>
  582. <br>
  583. <br>
  584. <uddi:UddiLabel Text='[[TEXT_PUBLISHER_ASSERTION_REQUESTS]]' Runat='server' /><br>
  585. <br>
  586. <asp:DataGrid
  587. ID='gridRequests'
  588. Width='100%'
  589. Border='0'
  590. Cellpadding='4'
  591. Cellspacing='0'
  592. AutoGenerateColumns='false'
  593. DataKeyField='Index'
  594. OnItemCommand='Assertion_OnItemCommand'
  595. OnDeleteCommand='Assertion_OnDelete'
  596. OnUpdateCommand='Assertion_OnUpdate'
  597. OnCancelCommand='Assertion_OnCancel'
  598. ItemStyle-VerticalAlign='top'
  599. Runat='Server'>
  600. <EditItemStyle CssClass='tableEditItem' />
  601. <AlternatingItemStyle CssClass='tableAlternatingItem' />
  602. <HeaderStyle CssClass='tableHeader' />
  603. <ItemStyle CssClass='tableItem' />
  604. <FooterStyle CssClass='tableFooter' />
  605. <Columns>
  606. <asp:BoundColumn
  607. DataField='Index'
  608. Visible='false'
  609. ReadOnly='true' />
  610. <asp:BoundColumn
  611. DataField='FromKey'
  612. Visible='false'
  613. ReadOnly='true' />
  614. <asp:BoundColumn
  615. DataField='ToKey'
  616. Visible='false'
  617. ReadOnly='true' />
  618. <asp:BoundColumn
  619. DataField='TModelKey'
  620. Visible='false'
  621. ReadOnly='true' />
  622. <asp:BoundColumn
  623. DataField='KeyName'
  624. Visible='false'
  625. ReadOnly='true' />
  626. <asp:BoundColumn
  627. DataField='KeyValue'
  628. Visible='false'
  629. ReadOnly='true' />
  630. <asp:TemplateColumn>
  631. <ItemTemplate>
  632. <uddi:UddiLabel Text='<%# Lookup.BusinessName( ((DataRowView)Container.DataItem )[ "FromKey" ].ToString() ) %>' Runat='Server' /> <img src='../images/redarrow.gif' align='absmiddle' border='0'> <uddi:UddiLabel Text='<%# Lookup.BusinessName( ((DataRowView)Container.DataItem )[ "ToKey" ].ToString() ) %>' Runat='Server' /><br>
  633. (<uddi:UddiLabel Text='<%# ((DataRowView)Container.DataItem )[ "KeyValue" ].ToString() %>' Runat='Server' />)
  634. </ItemTemplate>
  635. </asp:TemplateColumn>
  636. <asp:TemplateColumn HeaderStyle-Width='150px'>
  637. <ItemTemplate>
  638. <uddi:UddiLabel
  639. Text='[[HEADING_PUBLISHER_ASSERTION_REQUESTED]]'
  640. Runat='server' />
  641. </ItemTemplate>
  642. </asp:TemplateColumn>
  643. <asp:TemplateColumn HeaderStyle-Width='160px'>
  644. <ItemTemplate>
  645. <uddi:UddiButton
  646. CommandName='Accept'
  647. Text='[[BUTTON_ACCEPT]]'
  648. Width='70px'
  649. CssClass='button'
  650. CausesValidation='false'
  651. EditModeDisable='true'
  652. Runat='server' />
  653. </ItemTemplate>
  654. </asp:TemplateColumn>
  655. </Columns>
  656. </asp:DataGrid><br>
  657. <div style='padding-left: 5px'>
  658. <uddi:UddiLabel
  659. ID='noRecords'
  660. Text='[[TEXT_NO_REQUESTS]]'
  661. Visible='false'
  662. Runat='server' />
  663. </div>
  664. </asp:Panel>