<%@ Page Title="" Language="C#" AutoEventWireup="false" MasterPageFile="~/SiteMaster.Master"
    CodeBehind="UsersRolePage.aspx.cs" Inherits="MKinsight.Online.UIServices.UsersRolePage" %>

<%@ Register Src="../UIControls/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="../UIControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc2" %>
<%@ Register Src="../UIControls/PopupsHandler.ascx" TagName="PopupsHandler" TagPrefix="uc4" %>
<%@ Register Src="../UIControls/PopupPanel.ascx" TagName="PopupPanel" TagPrefix="uc5" %>
<%@ Register Assembly="UIWebControls" Namespace="UIWebControls" TagPrefix="cc4" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<%@ Register Src="../UIControls/Interface/TextBoxEx.ascx" TagName="TextBoxEx" TagPrefix="uc6" %>
<%@ Register Src="../UIControls/Interface/MultilineTextBoxEx.ascx" TagName="MultilineTextBoxEx" TagPrefix="uc7" %>
<%@ Register Src="../UIControls/Interface/CheckBoxEX.ascx" TagName="CheckBoxEX" TagPrefix="uc8" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="c_M" runat="server">
    <uc1:Header ID="usc_Header" runat="server" />
    <asp:UpdatePanel ID="pD" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            
            <uc2:MessageBox ID="usc_M" runat="server" />

            <asp:MultiView ID="Mv" runat="server">
                <asp:View ID="vM" runat="server">
                    <asp:Panel ID="tbP" runat="server" CssClass="w-bar">

                        <asp:LinkButton runat="server" ID="tbl_New" CssClass="w-button" Style="background: url(../images/add32.png);">
                            <asp:Label ID="tbl_NewLabel" runat="server"></asp:Label>
                        </asp:LinkButton>

                        <asp:LinkButton runat="server" ID="tbl_Users" CssClass="w-button" Style="background: url(../images/user32.png);">
                            <asp:Label ID="tbl_UsersLabel" runat="server"></asp:Label>
                        </asp:LinkButton>

                        <asp:LinkButton runat="server" ID="tbl_Roles" CssClass="w-button" Style="background: url(../images/role32.png);">
                            <asp:Label ID="tbl_RolesLabel" runat="server"></asp:Label>
                        </asp:LinkButton>

                    </asp:Panel>
                    <table runat="server" style="width: 100%">

                        <tr>
                            <td class="left" style="width: 290px; vertical-align: top;">
                                <asp:Panel ID="pt" runat="server" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"
                                    Height="450px" ScrollBars="Both" Width="300px">
                                    <cc4:MKGridView ID="dg_CS" runat="server" AllowPaging="True" AllowSorting="True"
                                        AutoGenerateColumns="False" BorderStyle="None" CellPadding="3" DataKeyNames="ID"
                                        OnRowDataBound="OnRowDataBound" Width="95%">
                                        <AlternatingRowStyle CssClass="alternatingrowstyle" />
                                        <FooterStyle BackColor="White" ForeColor="#000066" />
                                        <HeaderStyle CssClass="headerstyle" Font-Bold="True" HorizontalAlign="Left" Wrap="False" />
                                        <PagerStyle HorizontalAlign="Left" />
                                        <Columns>
                                            <asp:CommandField HeaderText="Select" ShowSelectButton="True" />
                                            <asp:BoundField DataField="ID" HeaderText="ID" />
                                            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                                            <asp:CheckBoxField DataField="Archived" HeaderText="Archived" SortExpression="Archived" />
                                        </Columns>
                                        <PagerTemplate>
                                            <asp:Label ID="lbl_ShowRows" runat="server" Text="Show rows:" /><asp:DropDownList
                                                ID="ddlPageSize" runat="server" AutoPostBack="true" OnSelectedIndexChanged="OnSelectedIndexChanged">
                                                <asp:ListItem Value="5" />
                                                <asp:ListItem Value="10" />
                                                <asp:ListItem Value="15" />
                                                <asp:ListItem Value="20" />
                                            </asp:DropDownList>&nbsp;&nbsp;<asp:Label ID="lbl_page" runat="server" Text="Page" /><asp:TextBox ID="txtGoToPage" runat="server" AutoPostBack="true" CssClass="gotopage"
                                                OnTextChanged="GoToPageOnTextChanged" /><asp:Label ID="lbl_Of" runat="server" Text="of" /><asp:Label ID="lblTotalNumberOfPages" runat="server" />&nbsp;&nbsp;<asp:Button ID="btn_p" runat="server" CommandArgument="Prev" SkinID="_"
                                                    CommandName="Page" CssClass="previous" ToolTip="Previous Page" /><asp:Button ID="btn_n"
                                                        runat="server" CommandArgument="Next" SkinID="_" CommandName="Page" CssClass="next"
                                                        ToolTip="Next Page" />
                                        </PagerTemplate>
                                        <SelectedRowStyle BackColor="#D6E8FF" ForeColor="Black" />
                                    </cc4:MKGridView>
                                </asp:Panel>
                            </td>
                            <td class="left" colspan="2" style="vertical-align: top;">
                                <asp:Panel ID="pv" runat="server" Visible="false">
                                    <div style="text-align: left; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #C0C0C0;">
                                        <asp:Panel ID="tbM" runat="server" CssClass="w-bar">

                                            <asp:LinkButton runat="server" ID="tbl_Details" CssClass="w-button" Style="background: url(../images/detail32.png);">
                                                <asp:Label ID="tbl_DetailsLabel" runat="server"></asp:Label>
                                            </asp:LinkButton>

                                            <asp:LinkButton runat="server" ID="tbl_Permission" CssClass="w-button" Style="background: url(../images/config32.png);">
                                                <asp:Label ID="tbl_PermissionLabel" runat="server"></asp:Label>
                                            </asp:LinkButton>

                                        </asp:Panel>
                                    </div>
                                    <div>
                                        <asp:MultiView ID="mv_R" runat="server">
                                            <asp:View ID="v_RD" runat="server">
                                                <table class="style1">
                                                    <tr>
                                                        <td>
                                                            <uc6:TextBoxEx ID="u_Name" runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <uc7:MultilineTextBoxEx ID="u_Description" runat="server" />
                                                        </td>
                                                    </tr>                                                    
                                                    <tr>
                                                        <td>
                                                            <uc8:CheckBoxEX ID="u_SuspendAlerts" runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <uc8:CheckBoxEX ID="u_Archived" runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <uc4:PopupsHandler ID="ph_Users" runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <hr class="ee" />
                                                            <asp:HiddenField ID="hdID" runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Button ID="btn_Add" runat="server" Font-Bold="true" Text="Add" />
                                                            <asp:Button ID="btn_Update" runat="server" Font-Bold="true" Text="Update" />
                                                            <asp:Button ID="btn_Cancel" runat="server" Text="Cancel" />
                                                            <span class="tab"></span>
                                                            <asp:Button ID="btn_Delete" runat="server" ForeColor="Red" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </asp:View>
                                            <asp:View ID="v_RP" runat="server">
                                                <table class="style1" runat="server" id="tb_RiskPer">
                                                    <tr>
                                                        <td colspan="2">&#160;&#160;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Literal ID="lit_CreateRisk" runat="server" Text="CreateRisk"></asp:Literal>
                                                        </td>
                                                        <td class="amend_field">
                                                            <asp:DropDownList ID="RiskCreate" runat="server" CssClass="amend" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Literal ID="lit_LAmendRisk" runat="server" Text="Amend Risk" />
                                                        </td>
                                                        <td class="amend_field">
                                                            <asp:DropDownList ID="RiskAmend" runat="server" CssClass="amend" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Literal ID="lit_LDeleteRisk" runat="server" Text="Delete Risk" />
                                                        </td>
                                                        <td class="amend_field">
                                                            <asp:DropDownList ID="RiskDelete" runat="server" CssClass="amend" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Literal ID="lit_Archive" runat="server" Text="Archive Risk" />
                                                        </td>
                                                        <td class="amend_field">
                                                            <asp:DropDownList ID="ArchiveRisk" runat="server" CssClass="amend" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Literal ID="lit_LApproveRisk" runat="server" Text="Approve Risk" />
                                                        </td>
                                                        <td class="amend_field">
                                                            <asp:DropDownList ID="RiskApproval" runat="server" CssClass="amend" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Literal ID="lit_LAssessRisk" runat="server" Text="Assess Risk" />
                                                        </td>
                                                        <td class="amend_field">
                                                            <asp:DropDownList ID="RiskAssessment" runat="server" />
                                                            <asp:DropDownList ID="drp_RiskAssessDSA" runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <hr class="ee" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"></td>
                                                    </tr>
                                                    <tr>
                                                        <td>&#160;&#160;
                                                        </td>
                                                        <td class="amend_field">&#160;&#160;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"></td>
                                                    </tr>
                                                </table>
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <asp:Table ID="tb_P" runat="server">
                                                            </asp:Table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <hr class="ee" />
                                                            <asp:Button ID="btn_Per_Update" runat="server" Text="Update" />
                                                            <asp:Button ID="btn_Per_Cancel" runat="server" Text="Cancel" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </asp:View>
                                        </asp:MultiView>
                                    </div>
                                </asp:Panel>
                            </td>
                        </tr>
                    </table>
                </asp:View>
            </asp:MultiView>
            <asp:Button ID="btn_pHandler" runat="server" Text="Button" Style="display: none;" />
            <asp:Panel ID="P" runat="server" CssClass="frame" Style="display: none;">
                <div class="overlay">
                    <div style="float: right; margin-top: -28px; margin-right: -10px;">
                        <asp:ImageButton ID="ImageButton1" ImageUrl="~/images/jq/close.png" runat="server" />
                    </div>
                    <div class="floatright">
                        <asp:Button ID="btn_TopOK" runat="server" OnClick="OnOK" />
                    </div>
                    <uc5:PopupPanel ID="usc_PP" runat="server" />
                    <div class="divpok">
                        <asp:Button ID="btn_POK" runat="server" />
                    </div>
                </div>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="mdp" runat="server" TargetControlID="btn_pHandler" PopupControlID="P"
                BackgroundCssClass="modalBackground">
            </cc1:ModalPopupExtender>
            <cc1:DragPanelExtender ID="dpE" runat="server" DragHandleID="pnlHeader" TargetControlID="p" />

        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
