|
<%@ Page Language="C#" MasterPageFile="~/Asap1.master" AutoEventWireup="true" CodeFile="EditBackupAuth.aspx.cs" Inherits="EditBackupAuth" Title="AuthMatrix - Utilities for Authorizers" %>
<%@ 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="WebAsyncRefreshPanel1" runat="server" HorizontalAlign="center"
Width="720px" Height="775px">
<center>
<table id="table1" cellspacing="5" cellpadding="0" width="100%" border="0" style="width: 710px">
<tr align="center">
<td style="width: 170px; height: 710px;" valign="top" align="center">
<asp:Button ID="Button3" runat="server" Text="Refresh" OnClick="Button1_Click" PostBackUrl="~/EditBackupAuth.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="395px" 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" valign="top" align="center">
<igtab:UltraWebTab ID="UltraWebTab1" runat="server" BorderColor="Gray" BorderStyle="Solid"
BorderWidth="1px" ImageDirectory="~/ig_common/images/" ThreeDEffect="False" Height="425px"
Width="540px" FixedLayout="True">
<DefaultTabStyle BackColor="White" Height="20px">
</DefaultTabStyle>
<Tabs>
<igtab:Tab Text="Activate Backup Authorizer">
<ContentTemplate>
<ignav:UltraWebMenu ID="UltraWebMenu2" runat="server" LeafItemImageUrl="" JavaScriptFileNameCommon=""
JavaScriptFilename="" ParentItemImageUrl="" DataSourceID="SiteMapDataSource1"
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">
<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>
</ignav:UltraWebMenu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" SiteMapProvider="SysSiteMapProvider1"
ShowStartingNode="False"></asp:SiteMapDataSource>
<br />
<table>
<tr align="left">
<td>
<asp:Label ID="Label11" runat="server" Text="For selected Organization: " Font-Bold="True" ForeColor="Red"></asp:Label>
</td>
<td style="width: 182px">
<asp:Label ID="Label12" runat="server" Width="230px" Font-Bold="True" Font-Italic="True" ForeColor="OliveDrab" ToolTip="0"></asp:Label>
</td>
</tr>
<tr align="left">
<td>
<asp:Label ID="Label13" runat="server" Font-Bold="True" ForeColor="Red" Text="and current System: "></asp:Label>
</td>
<td style="width: 182px">
<asp:Label ID="Label14" runat="server" Font-Bold="True" Font-Italic="True" ForeColor="CornflowerBlue" Width="230px" ToolTip="0"></asp:Label>
</td>
</tr>
</table>
<br />
<table>
<tr>
<td style="width: 90px; height: 16px;">
1. Backup Candidates:</td>
<td style="width: 136px; height: 16px">
2. From Date:</td>
<td style="width: 136px; height: 16px">
3. End Date:</td>
</tr>
<tr>
<td style="width: 90px; height: 103px;">
<asp:ListBox ID="ListBox11" runat="server" Height="123px" Width="130px" DataSourceID="PossibleBackupDataSource1" DataTextField="NAME" DataValueField="uid" AutoPostBack="True" Enabled="False"></asp:ListBox>
<asp:SqlDataSource ID="PossibleBackupDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ASAPConnectionString %>"
SelectCommand="SELECT b.uid as uid, a.fname + ' ' + a.sname AS NAME FROM asap.backup_auth_t AS a, asap.AUTH_MATRIX_T AS b WHERE (a.prime_uid = @prime_uid) AND (b.uid = a.uid)AND (b.org_id = @OrgId) AND (b.sys_id = @SysId)">
<SelectParameters>
<asp:ControlParameter ControlID="Label12" Name="OrgId" PropertyName="ToolTip" Type="Int32" />
<asp:ControlParameter ControlID="Label14" Name="SysId" PropertyName="ToolTip" Type="Int32" />
<asp:SessionParameter Name="prime_uid" SessionField="UID" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</td>
<td style="width: 136px; height: 103px">
<asp:Calendar ID="Calendar1" runat="server" ToolTip="From Date" Font-Size="XX-Small" Width="90px">
<SelectedDayStyle BorderColor="Red" />
<DayHeaderStyle BackColor="#C0FFC0" />
</asp:Calendar>
</td>
<td style="width: 136px; height: 103px">
<asp:Calendar ID="Calendar2" runat="server" ToolTip="End Date" Font-Size="XX-Small">
<SelectedDayStyle BorderColor="Red" />
<DayHeaderStyle BackColor="#FFC0C0" />
</asp:Calendar>
</td>
</tr>
</table>
<asp:RadioButtonList ID="RadioButtonList1" runat="server" Font-Bold="True" ForeColor="Red"
RepeatColumns="1" RepeatLayout="Flow" Width="512px">
<asp:ListItem Selected="True" Value="current">Apply to currently selected Organiztion and System only</asp:ListItem>
<asp:ListItem Value="next">Apply to immediate next level as well</asp:ListItem>
<asp:ListItem Value="all">Apply to all the sub levels below current selections</asp:ListItem>
</asp:RadioButtonList>
<br /><br />
<table>
<tr>
<td style="width: 210px">
<asp:Button ID="Button1" runat="server" Text="Add to activie backup authorizer(s) >>"
Width="227px" Enabled="False" OnClick="Button1_Click" /><br />
<asp:Label ID="Label15" runat="server" Font-Bold="True" ForeColor="Red" Height="16px"
Text="For Prime User: " Width="112px"></asp:Label>
<asp:Label ID="Label16" runat="server" Font-Bold="True"></asp:Label></td>
<td style="width: 328px">
<asp:ListBox ID="ListBox12" runat="server" Height="47px" Width="274px" DataSourceID="ActiveBackupDataSource1" DataTextField="NAME" DataValueField="uid" Rows="2"></asp:ListBox>
<asp:SqlDataSource ID="ActiveBackupDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ASAPConnectionString %>"
SelectCommand="SELECT b.uid , b.fname + ' ' + b.sname + ' (' + CONVERT(varchar(11), a.valid_from) + ' ~ ' + CONVERT(varchar(11), a.valid_to) + ')' AS NAME FROM asap.auth_matrix_t a INNER JOIN asap.backup_auth_t b ON a.uid = b.uid WHERE (a.org_id = @org_id) AND (a.sys_id = @sys_id) AND ((a.valid_from >= @valid_from AND a.valid_from <= @valid_to) or (a.valid_from <= @valid_from and a.valid_to >= @valid_from)) AND (a.type = 'b')"
UpdateCommand="UPDATE asap.auth_matrix_t SET valid_from = @valid_from, valid_to = @valid_to WHERE (org_id = @org_id) AND (sys_id = @sys_id) AND (uid = @uid)">
<SelectParameters>
<asp:ControlParameter ControlID="Label12" Name="org_id" PropertyName="ToolTip" Type="Int32" />
<asp:ControlParameter ControlID="Label14" Name="sys_id" PropertyName="ToolTip" Type="Int32" />
<asp:ControlParameter ControlID="Calendar1" Name="valid_from" PropertyName="SelectedDate"
Type="DateTime" />
<asp:ControlParameter ControlID="Calendar2" Name="valid_to" PropertyName="SelectedDate"
Type="DateTime" />
</SelectParameters>
<UpdateParameters>
<asp:ControlParameter ControlID="Calendar1" Name="valid_from" PropertyName="SelectedDate"
Type="DateTime" />
<asp:ControlParameter ControlID="Calendar2" Name="valid_to" PropertyName="SelectedDate"
Type="DateTime" />
<asp:ControlParameter ControlID="Label12" Name="org_id" PropertyName="ToolTip" Type="Int32" />
<asp:ControlParameter ControlID="Label14" Name="sys_id" PropertyName="ToolTip" Type="Int32" />
<asp:ControlParameter ControlID="ListBox11" Name="uid" PropertyName="SelectedValue" Type="Char"/>
</UpdateParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
</ContentTemplate>
</igtab:Tab>
<igtab:TabSeparator>
</igtab:TabSeparator>
<igtab:Tab Text="Edit Backup Authorizer List">
<ContentTemplate>
<br />
<br />
<table border="1">
<tr>
<td style="width: 325px; height: 355px;" align="center">
<asp:Label ID="Label21" runat="server" Font-Bold="True" ForeColor="Red" Text="Search for a user:"></asp:Label><br />
<asp:TextBox ID="TextBox21" runat="server" Width="80px"></asp:TextBox>
<asp:Button ID="Button21" runat="server" Text="Search" OnClick="Button21_Click" TabIndex="1" />
<br />
<asp:Label ID="Label22" runat="server" Text="(*Type in any part of the user's first name, last name or UID)"></asp:Label><br />
<br />
<asp:ListBox ID="ListBox21" runat="server" Width="234px" Height="196px"></asp:ListBox>
<asp:HiddenField ID="HiddenField21" runat="server" />
<asp:HiddenField ID="HiddenField22" runat="server" />
<asp:HiddenField ID="HiddenField23" runat="server" />
</td>
<td style="width: 163px; height: 355px;" align="center">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<asp:Button ID="Button22" runat="server" Text="Add >>" Width="73px" OnClick="Button22_Click"
Font-Bold="True" ForeColor="Black" /><br />
<br />
<asp:Button ID="Button23" runat="server" Text="Remove <<" OnClick="Button23_Click"
Font-Bold="True" ForeColor="Black" Width="74px" />
</td>
<td style="width: 225px; height: 355px;" align="center">
<asp:Label ID="Label24" runat="server" Font-Bold="True" ForeColor="Red" Text="Backup Authorizer List:"></asp:Label><br />
<asp:Label ID="Label25" runat="server" Text="For User: " Font-Bold="True" ForeColor="Red"></asp:Label>
<asp:Label ID="Label26" runat="server" Font-Bold="True"></asp:Label><br />
<br />
<asp:ListBox ID="ListBox22" runat="server" DataSourceID="SqlDataSource21" DataTextField="NAME"
DataValueField="uid" Rows="12"></asp:ListBox>
<asp:SqlDataSource ID="SqlDataSource21" runat="server"
ConnectionString="<%$ ConnectionStrings:ASAPConnectionString %>"
SelectCommand="SELECT [uid], [fname] + ' ' + [sname] + ' - ' + [uid] AS NAME FROM [asap].[backup_auth_t] where [PRIME_UID] = @puid ORDER BY [fname]"
InsertCommand="INSERT INTO [asap].[backup_auth_t] ([prime_uid], [uid], [fname], [sname]) VALUES (@puid, @uid, @fn, @sn)"
DeleteCommand="DELETE FROM [asap].[backup_auth_t] WHERE ([prime_uid] = @puid and [uid] = @uid)">
<SelectParameters>
<asp:SessionParameter SessionField="UID" Name="puid" />
</SelectParameters>
<InsertParameters>
<asp:SessionParameter SessionField="UID" Name="puid" />
<asp:ControlParameter ControlID="HiddenField21" Name="uid" PropertyName="Value" />
<asp:ControlParameter ControlID="HiddenField22" Name="fn" PropertyName="Value" />
<asp:ControlParameter ControlID="HiddenField23" Name="sn" PropertyName="Value" />
</InsertParameters>
<DeleteParameters>
<asp:SessionParameter SessionField="UID" Name="puid" />
<asp:ControlParameter ControlID="ListBox22" Name="uid" PropertyName="SelectedValue" />
</DeleteParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
<asp:Label ID="Label1" runat="server" Width="418px" Visible="False"></asp:Label>
</ContentTemplate>
</igtab:Tab>
<igtab:TabSeparator>
</igtab:TabSeparator>
<igtab:Tab Text="Individual Matrix Summary">
<ContentTemplate>
<asp:Label ID="Label31" runat="server" Font-Bold="True" ForeColor="Red" Text="For current authorizer: "></asp:Label>
<asp:Label ID="Label32" runat="server" Font-Bold="True"></asp:Label><br />
<br />
<asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False"
DataSourceID="MatrixSqlDataSource1" PageSize="14" AllowPaging="True" EnableSortingAndPagingCallbacks="True" Height="325px" HorizontalAlign="Center">
<PagerSettings PageButtonCount="20" Mode="NumericFirstLast" />
<Columns>
<asp:BoundField DataField="org_name" HeaderText="org_name" SortExpression="org_name" />
<asp:BoundField DataField="sys_name" HeaderText="sys_name" SortExpression="sys_name" />
<asp:BoundField DataField="uid" HeaderText="uid" SortExpression="uid" />
<asp:BoundField DataField="is_active" HeaderText="is_active" SortExpression="is_active" />
<asp:BoundField DataField="valid_from" HeaderText="valid_from" SortExpression="valid_from" />
<asp:BoundField DataField="valid_to" HeaderText="valid_to" SortExpression="valid_to" />
<asp:BoundField DataField="notes" HeaderText="notes" SortExpression="notes" />
</Columns>
<EditRowStyle BorderStyle="Groove" />
<HeaderStyle BackColor="#C0FFC0" />
<AlternatingRowStyle BackColor="AntiqueWhite" />
</asp:GridView>
<asp:SqlDataSource ID="MatrixSqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ASAPConnectionString %>"
SelectCommand="SELECT o.org_name, s.sys_name, a.uid, a.is_active, a.valid_from, a.valid_to, a.notes FROM asap.auth_matrix_t a INNER JOIN asap.org_t o ON a.org_id = o.org_id INNER JOIN asap.system_t s ON a.sys_id = s.sys_id where a.uid = @uid">
<SelectParameters>
<asp:SessionParameter Name="uid" SessionField="UID" />
</SelectParameters>
</asp:SqlDataSource>
</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="248px" 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.