|
<%@ Page Language="C#" MasterPageFile="~/Asap1.master" AutoEventWireup="true" CodeFile="EditAuthMatrix.aspx.cs" Inherits="EditAuthMatrix" Title="ASAP - Authorization Matrix Editor" %>
<%@ Register TagPrefix="igtab" Namespace="Infragistics.WebUI.UltraWebTab" Assembly="Infragistics2.WebUI.UltraWebTab.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %>
<%@ Register TagPrefix="ignav" Namespace="Infragistics.WebUI.UltraWebNavigator" Assembly="Infragistics2.WebUI.UltraWebNavigator.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %>
<%@ Register TagPrefix="igmisc" Namespace="Infragistics.WebUI.Misc" Assembly="Infragistics2.WebUI.Misc.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel2" runat="server" HorizontalAlign="center"
Width="720px" Height="601px">
<center>
<table id="table1" cellspacing="5" cellpadding="0" width="100%" border="0" style="width: 710px">
<tr align="center">
<td style="width: 170px; height: 500px;" valign="top" align="center">
<asp:Button ID="Button3" runat="server" Text="Refresh" OnClick="Button1_Click" PostBackUrl="~/EditAuthMatrix.aspx" Width="171px" />
<asp:Label ID="Label111" runat="server" Width="68px" ForeColor="White">.</asp:Label>
<ignav:UltraWebTree ID="UltraWebTree21" runat="server" Cursor="Hand" DataSourceID="OrgSiteMapDataSource1"
DefaultImage="" DefaultIslandClass="" DefaultItemClass="" DefaultSelectedImage=""
HoverClass="" Indentation="20" JavaScriptFilename="" JavaScriptFileNameCommon=""
WebTreeTarget="HierarchicalTree" XslFile="" BorderColor="#E0E0E0" Width="170px"
BackColor="#F0F0F0" FullNodeSelect="True" Height="375px" Font-Bold="True" ExpandAnimation="Accelerate"
ImageDirectory="~/Images/">
<SelectedNodeStyle BackColor="Green" BorderStyle="None" />
<Images>
<RootNodeImage Url="rmi1.gif" />
<LeafNodeImage Url="arrow1.gif" />
<ParentNodeImage Url="folder.gif" />
</Images>
</ignav:UltraWebTree>
<asp:SiteMapDataSource ID="OrgSiteMapDataSource1" runat="server" SiteMapProvider="OrgSiteMapProvider1" />
</td>
<td style="width: 535px; height: 500px;" valign="top" align="center">
<igtab:UltraWebTab ID="UltraWebTab1" runat="server" BorderColor="Gray" BorderStyle="Solid"
BorderWidth="1px" ImageDirectory="~/ig_common/images/" ThreeDEffect="False" Height="405px"
Width="540px">
<DefaultTabStyle BackColor="White" Height="20px">
</DefaultTabStyle>
<Tabs>
<igtab:Tab Text="Edit/View Authorization Matrix">
<ContentTemplate>
<br />
<ignav:UltraWebMenu ID="UltraWebMenu2" runat="server" LeafItemImageUrl="" JavaScriptFileNameCommon=""
JavaScriptFilename="" ParentItemImageUrl="" DataSourceID="SiteMapDataSource2"
TargetUrl="" DisabledClass="" TargetFrame="" FileUrl="" TopSelectedClass="" EnhancedRendering="True"
TopAligment="Center" TopItemSpacing="Compact" Font-Size="X-Large" ForeColor="Black"
BackColor="#B5CCFA" BorderWidth="0px" Font-Bold="True" Font-Names="Arial" Cursor="Crosshair" SeparatorClass="">
<Images>
<SubMenuImage Url="ig_menuTri.gif"></SubMenuImage>
<ScrollTopDisabledImage Url="ig_menuBlueUp_disabled.gif" />
<ScrollBottomImage Url="ig_menuBlueDown.gif" />
<XPSpacerImage Url="ig_menu2003SpacerBlue.gif" />
<ScrollBottomDisabledImage Url="ig_menuBlueDown_disabled.gif" />
<ScrollTopImage Url="ig_menuBlueUp.gif" />
</Images>
<IslandStyle Cursor="Default" BackColor="WhiteSmoke" BorderStyle="Solid" BorderWidth="1px"
Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Black" BorderColor="Black">
</IslandStyle>
<HoverItemStyle BackColor="#FCEFC3" BorderStyle="Solid" BorderWidth="0px" Cursor="Default"
ForeColor="Black" BorderColor="#316AC5">
</HoverItemStyle>
<DisabledStyle ForeColor="LightGray" Font-Size="8pt" Font-Names="MS Sans Serif">
</DisabledStyle>
<ItemStyle BorderStyle="Solid" BorderWidth="0px" Font-Size="8pt" BorderColor="Transparent">
</ItemStyle>
<SeparatorStyle CustomRules="background-repeat:repeat-x; " BackgroundImage="ig_menuSep.gif">
</SeparatorStyle>
<ExpandEffects ShadowColor="Black" Type="Slide"></ExpandEffects>
<Styles>
<ignav:Style BackColor="#F4B647" BorderColor="#316AC5" BorderStyle="Solid" BorderWidth="1px"
CssClass="TopHover9" Cursor="Default">
</ignav:Style>
<ignav:Style BackColor="#B5CCFA" BackgroundImage="None" BorderColor="#B5CCFA" BorderStyle="Solid"
BorderWidth="1px" CssClass="TopClass9" ForeColor="Black">
</ignav:Style>
</Styles>
<TopSelectedStyle BackColor="#C3DCFF" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
ForeColor="Black">
</TopSelectedStyle>
<MenuClientSideEvents InitializeMenu="" ItemChecked="" ItemClick="" ItemHover=""
SubMenuDisplay="" />
</ignav:UltraWebMenu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" SiteMapProvider="SysSiteMapProvider1"
ShowStartingNode="False"></asp:SiteMapDataSource>
<br />
<table border="1">
<tr>
<td style="width: 238px" align="center">
<asp:Label ID="Label1" runat="server" Text="For selected organization: " Font-Bold="True"
ForeColor="Red"></asp:Label>
<br />
<asp:Label ID="Label2" runat="server" Text="none" Font-Bold="True" Font-Italic="True"
Font-Names="Courier New" ForeColor="DarkGreen" Font-Underline="True"></asp:Label>
<br />
<asp:Label ID="Label3" runat="server" Text=" and targeted system: " Font-Bold="True"
ForeColor="Red"></asp:Label><br />
<asp:Label ID="Label4" runat="server" Text="none" Font-Bold="True" Font-Italic="True"
Font-Names="Courier New" ForeColor="DodgerBlue" Font-Underline="True"></asp:Label><br />
<asp:Label ID="Label5" runat="server" Text="current authorizers are: " Font-Bold="True"
ForeColor="Red"></asp:Label><br />
<br />
<asp:ListBox ID="ListBox1" runat="server" DataSourceID="SqlDataSource1" DataTextField="NAME"
DataValueField="uid"></asp:ListBox>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ASAPConnectionString %>"
SelectCommand="SELECT a.fname + ' ' + a.sname AS NAME, b.uid FROM asap.authorizer_t AS a INNER JOIN asap.auth_matrix_t AS b ON a.uid = b.uid WHERE (b.sys_id = @sysId) AND (b.org_id = @orgId) AND b.type = 'p'"
InsertCommand="INSERT INTO asap.auth_matrix_t (org_id, sys_id, uid, is_active, type) VALUES (@orgId, @sysId, @newUid, 'y', 'p')"
DeleteCommand="DELETE FROM asap.auth_matrix_t WHERE (org_id = @orgId) AND (sys_id = @sysId) AND (uid = @Uid)">
<SelectParameters>
<asp:ControlParameter ControlID="Label4" Name="sysId" PropertyName="ToolTip" />
<asp:ControlParameter ControlID="Label2" Name="orgId" PropertyName="ToolTip" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="Label4" Name="sysId" PropertyName="ToolTip" />
<asp:ControlParameter ControlID="Label2" Name="orgId" PropertyName="ToolTip" />
<asp:ControlParameter ControlID="ListBox2" Name="newUid" PropertyName="SelectedValue" />
</InsertParameters>
<DeleteParameters>
<asp:ControlParameter ControlID="Label2" Name="orgId" PropertyName="ToolTip" />
<asp:ControlParameter ControlID="Label4" Name="sysId" PropertyName="ToolTip" />
<asp:ControlParameter ControlID="ListBox1" Name="Uid" PropertyName="SelectedValue" />
</DeleteParameters>
</asp:SqlDataSource>
<br />
<br />
<asp:RadioButtonList ID="RadioButtonList1" runat="server" Font-Bold="True" ForeColor="Red"
RepeatColumns="1" RepeatLayout="Flow" Width="180px">
<asp:ListItem Selected="True" Value="current">Apply to current selection </asp:ListItem>
<asp:ListItem Value="next">Apply to next level as well</asp:ListItem>
<asp:ListItem Value="all">Apply to all the sub levels </asp:ListItem>
</asp:RadioButtonList>
</td>
<td style="width: 142px" align="center">
<asp:Button ID="Button1" runat="server" Text="Add <<" Width="87px" OnClick="Button1_Click"
Font-Bold="True" ForeColor="Black" /><br />
<br />
<asp:Button ID="Button2" runat="server" Text="Remove >>" OnClick="Button2_Click"
Font-Bold="True" ForeColor="Black" /></td>
<td style="width: 225px" align="center">
<asp:Label ID="Label6" runat="server" Text="Full list of authorizers:" Font-Bold="True"
ForeColor="Red"></asp:Label>
<br />
<br />
<asp:ListBox ID="ListBox2" runat="server" DataSourceID="SqlDataSource2" DataTextField="NAME"
DataValueField="uid" Rows="16"></asp:ListBox>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ASAPConnectionString %>"
SelectCommand="SELECT [uid], [fname] + ' ' + [sname] + ' - ' + [uid] AS NAME FROM [asap].[authorizer_t]">
</asp:SqlDataSource>
</td>
</tr>
</table>
</ContentTemplate>
</igtab:Tab>
<igtab:TabSeparator>
</igtab:TabSeparator>
<igtab:Tab Text="Edit Organization Tree">
<ContentTemplate>
<br />
<asp:Label ID="Label11" runat="server" Text="The current select node is : " Font-Bold="True"
ForeColor="Red" Font-Names="Arial"></asp:Label>
<asp:Label ID="Label12" runat="server" Font-Bold="True" Font-Italic="True" Font-Names="Courier New"
Font-Underline="True" ForeColor="DarkOliveGreen" Text="none"></asp:Label>
<asp:Label ID="Label13" runat="server" Text=" which will be the parent node of the new organization."
Font-Bold="True" ForeColor="Red"></asp:Label><br />
<br />
<asp:Label ID="Label14" runat="server" Text="Name: "></asp:Label>
<asp:TextBox ID="TextBox11" runat="server" Width="230px"></asp:TextBox> <br />
<asp:Label ID="Label15" runat="server" Text="Description:"></asp:Label>
<asp:TextBox ID="TextBox12" runat="server" Width="230px"></asp:TextBox> <br />
<br />
<asp:Button ID="Button11" runat="server" Text="Add New Node" Enabled="False" OnClick="Button11_Click" />
<asp:HiddenField ID="HiddenField1" runat="server" />
<hr />
<table border="1">
<tr>
<td style="width: 341px; height: 181px;">
<asp:Label ID="Label16" runat="server" Text="The current node to be modified: " Font-Bold="True"
ForeColor="Red"></asp:Label>
<asp:Label ID="Label17" runat="server" Text="none" Font-Bold="True" Font-Italic="True"
Font-Names="Courier New" Font-Underline="True" ForeColor="DarkOliveGreen"></asp:Label><br />
<br />
Name:
<asp:TextBox ID="TextBox13" runat="server" Width="232px"></asp:TextBox><br />
Description:
<asp:TextBox ID="TextBox14" runat="server" Width="232px"></asp:TextBox><br />
<br />
<asp:Button ID="Button12" runat="server" Enabled="False" Text="Update Node" OnClick="Button12_Click" /><br />
</td>
<td style="width: 234px; height: 181px;" valign="top">
The selected node to be removed:<br />
<asp:Label ID="Label18" runat="server" Text="none" Font-Bold="True" Font-Italic="True"
Font-Names="Courier New" Font-Underline="True" ForeColor="DarkOliveGreen"></asp:Label> <br />
<br />
<asp:Button ID="Button13" runat="server" Text="Remove Node" Enabled="False" OnClick="Button13_Click" /></td>
</tr>
</table>
</ContentTemplate>
</igtab:Tab>
<igtab:TabSeparator>
</igtab:TabSeparator>
<igtab:Tab Text="Edit System Menu">
<ContentTemplate>
<br />
<ignav:UltraWebMenu ID="UltraWebMenu21" runat="server" BackColor="#DCD9AC" BorderWidth="0px"
DataSourceID="SiteMapDataSource2" EnhancedRendering="True" FileUrl="" JavaScriptFilename=""
JavaScriptFileNameCommon="" LeafItemImageUrl="" ParentItemImageUrl="" TargetFrame=""
TargetUrl="" TopAligment="Center" TopItemSpacing="Compact">
<Styles>
<ignav:Style BackColor="#F4B647" BorderColor="#93A070" BorderStyle="Solid" BorderWidth="1px"
CssClass="TopHover10" Cursor="Default">
</ignav:Style>
<ignav:Style BackColor="#DCD9AC" BorderColor="#DCD9AC" BorderStyle="Solid"
BorderWidth="1px" CssClass="TopClass10" ForeColor="Black">
</ignav:Style>
</Styles>
<Images>
<ScrollTopDisabledImage Url="ig_menuGreenUp_disabled.gif" />
<ScrollBottomImage Url="ig_menuGreenDown.gif" />
<XPSpacerImage Url="ig_menu2003SpacerOlive.gif" />
<ScrollBottomDisabledImage Url="ig_menuGreenDown_disabled.gif" />
<ScrollTopImage Url="ig_menuGreenUp.gif" />
<SubMenuImage Url="ig_menuTri.gif" />
</Images>
<IslandStyle BackColor="WhiteSmoke" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
Cursor="Default" Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Black">
</IslandStyle>
<HoverItemStyle BackColor="#FCEFC3" BorderColor="#93A070" BorderStyle="Solid" BorderWidth="0px"
Cursor="Default" ForeColor="Black">
</HoverItemStyle>
<DisabledStyle ForeColor="LightGray">
</DisabledStyle>
<ItemStyle BorderColor="Transparent" BorderStyle="Solid" BorderWidth="0px" />
<SeparatorStyle BackgroundImage="ig_menuSep.gif" CustomRules="background-repeat:repeat-x; " />
<ExpandEffects ShadowColor="Black" Type="Slide" />
<TopSelectedStyle BackColor="DarkKhaki" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
ForeColor="Black">
</TopSelectedStyle>
</ignav:UltraWebMenu>
<asp:SiteMapDataSource ID="SiteMapDataSource2" runat="server" SiteMapProvider="SysSiteMapProvider1"
ShowStartingNode="False" />
<table border="1">
<tr><td style="width: 369px" colspan="2" align="center">
<asp:Label ID="Label21" runat="server" Text="The current select menu is : " Font-Bold="True"
ForeColor="Red"></asp:Label>
<asp:Label ID="Label22" runat="server" Font-Bold="True" Font-Italic="True" Font-Names="Courier New"
Font-Underline="True" ForeColor="DarkOliveGreen" Text="none"></asp:Label>
<asp:Label ID="Label23" runat="server" Text=" which will be the parent node of the new organization."
Visible="False" Font-Bold="True" ForeColor="Red"></asp:Label><br />
<br />
<table border="0">
<tr>
<td>
<asp:Label ID="Label24" runat="server" Text="Name: "></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox21" runat="server" Width="230px"></asp:TextBox> <br />
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label25" runat="server" Text="Description:"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox22" runat="server" Width="230px"></asp:TextBox> <br />
</td>
</tr>
</table>
<asp:CheckBox ID="CheckBox1" runat="server" Text="Create a top level menu item."
AutoPostBack="True" /><br />
<br />
<asp:Button ID="Button21" runat="server" Text="Add New Menu" Enabled="False" OnClick="Button21_Click" />
<asp:HiddenField ID="HiddenField2" runat="server" />
<hr />
</td></tr>
<tr>
<td style="width: 369px">
<asp:Label ID="Label26" runat="server" Text="The current menu to be modified: " Font-Bold="True"
ForeColor="Red"></asp:Label>
<asp:Label ID="Label27" runat="server" Text="none" Font-Bold="True" Font-Italic="True"
Font-Names="Courier New" Font-Underline="True" ForeColor="DarkOliveGreen"></asp:Label><br />
<br />
Name:
<asp:TextBox ID="TextBox23" runat="server" Width="232px"></asp:TextBox><br />
Description:
<asp:TextBox ID="TextBox24" runat="server" Width="232px"></asp:TextBox><br />
<br />
<asp:Button ID="Button22" runat="server" Enabled="False" Text="Update Menu" OnClick="Button22_Click" /><br />
</td>
<td style="width: 234px" valign="top">
The selected menu to be removed:<br />
<asp:Label ID="Label28" runat="server" Text="none" Font-Bold="True" Font-Italic="True"
Font-Names="Courier New" Font-Underline="True" ForeColor="DarkOliveGreen"></asp:Label> <br />
<br />
<asp:Button ID="Button23" runat="server" Text="Remove Menu" Enabled="False" OnClick="Button23_Click" /></td>
</tr>
</table>
</ContentTemplate>
</igtab:Tab>
<igtab:TabSeparator>
</igtab:TabSeparator>
<igtab:Tab Text="Edit Authorizer List">
<ContentTemplate>
<br />
<br />
<table border="1">
<tr>
<td style="width: 325px; height: 348px;" align="center">
<asp:Label ID="Label31" runat="server" Font-Bold="True" ForeColor="Red" Text="Search for a user:"></asp:Label><br />
<asp:TextBox ID="TextBox31" runat="server" Width="80px"></asp:TextBox>
<asp:Button ID="Button31" runat="server" Text="Search" OnClick="Button31_Click" TabIndex="1" />
<br />
<asp:Label ID="Label32" runat="server" Text="(*Type in any part of the user's first name, last name or UID)"></asp:Label><br />
<br />
<asp:ListBox ID="ListBox31" runat="server" Width="234px" Height="186px"></asp:ListBox>
<asp:HiddenField ID="HiddenField31" runat="server" />
<asp:HiddenField ID="HiddenField32" runat="server" />
<asp:HiddenField ID="HiddenField33" runat="server" />
</td>
<td style="width: 163px; height: 348px;" align="center">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<asp:Button ID="Button32" runat="server" Text="Add >>" Width="73px" OnClick="Button32_Click"
Font-Bold="True" ForeColor="Black" /><br />
<br />
<asp:Button ID="Button33" runat="server" Text="Remove <<" OnClick="Button33_Click"
Font-Bold="True" ForeColor="Black" Width="74px" />
</td>
<td style="width: 225px; height: 348px;" align="center">
<asp:Label ID="Label7" runat="server" Font-Bold="True" ForeColor="Red" Text="Authorizer Full List:"></asp:Label><br />
<br />
<asp:ListBox ID="ListBox32" runat="server" DataSourceID="SqlDataSource31" DataTextField="NAME"
DataValueField="uid" Rows="15"></asp:ListBox><asp:SqlDataSource ID="SqlDataSource31" runat="server"
ConnectionString="<%$ ConnectionStrings:ASAPConnectionString %>"
SelectCommand="SELECT [uid], [fname] + ' ' + [sname] + ' - ' + [uid] AS NAME FROM [asap].[authorizer_t] ORDER BY [fname]"
InsertCommand="INSERT INTO [authorizer_t] ([uid], [fname], [sname]) VALUES (@uid, @fn, @sn)"
DeleteCommand="DELETE FROM [asap].[authorizer_t] WHERE ([uid] = @uid)">
<InsertParameters>
<asp:ControlParameter ControlID="HiddenField31" Name="uid" PropertyName="Value" />
<asp:ControlParameter ControlID="HiddenField32" Name="fn" PropertyName="Value" />
<asp:ControlParameter ControlID="HiddenField33" Name="sn" PropertyName="Value" />
</InsertParameters>
<DeleteParameters>
<asp:ControlParameter ControlID="ListBox32" Name="uid" PropertyName="SelectedValue" />
</DeleteParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
</ContentTemplate>
</igtab:Tab>
</Tabs>
<RoundedImage FillStyle="LeftMergedWithCenter" NormalImage="ig_tab_lightb1.gif" SelectedImage="ig_tab_lightb2.gif" />
</igtab:UltraWebTab>
<asp:Label ID="LabelDebug" runat="server" Text="Label" Width="240px" Visible="False"></asp:Label></td>
</tr>
</table>
</center>
</igmisc:WebAsyncRefreshPanel>
</asp:Content>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.