<%@ control language="VB" autoeventwireup="false" inherits="PCC_DC_CC_SG, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility"
    TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="EM" %>

<asp:Panel ID="Pnl_Filter" runat="server" DefaultButton="Btn_Filter">
    <div class="row">
        <div class="panel-group search-panel" id="AS_SGroup" role="tablist" aria-multiselectable="true">
            <div class="col-xs-12" role="tab" id="SH_SGroup">
                <div class="card">
                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_SGroup" href="#<%= CSB_SGroup.ClientID%>" aria-expanded="true" aria-controls="SH_SGroup">
                        <h3>
                            <%= Resources.Content.GN0000395%>
                        </h3>
                    </div>
                    <div id="CSB_SGroup" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_SGroup" aria-expanded="false">
                        <div class="row">
                            <div class="col-md-3 col-sm-6 col-xs-12">
                                <div class="form-group form-float">
                                    <div class="form-line">
                                        <asp:TextBox ID="TxBx_FilterSG" runat="server"></asp:TextBox>
                                        <asp:Label ID="Label1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001113%>" class="form-label"></asp:Label>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <div class="form-group form-float">
                                    <asp:Button ID="Btn_Filter" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000391%>" />
                                    <asp:Button ID="Btn_Clear" Visible="false" class="btn btn-primary waves-effect" runat="server"
                                        Text="<%$ Resources:Content,String289 %>" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Panel>
<asp:Panel ID="Pnl_List" runat="server">
    <%--End search box--%>
    <%--Start button--%>
    <div class="row">
        <div class="col-xs-12">
            <div class="card">
                <div class="header">
                    <h3>
                        <asp:Literal ID="Literal8" runat="server" Text='<%$ Resources:Content,GN00001320%>' EnableViewState="false" />
                    </h3>
                </div>
                <div class="body">
                    <asp:Button ID="BTN_AddSecurityGroup" class="btn btn-primary waves-effect btnAction" runat="server" Text='<%$ Resources:Content,AD002 %>' />
                </div>
            </div>
        </div>
    </div>

    <%--<div class="row">
        <div class="col-sm-3 col-xs-12 row-label">
            <asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:Content,AD0000100%>"
                EnableViewState="false" />:
        </div>
        <div class="col-sm-9 col-xs-12">
            <asp:Label ID="Lbl_Org" runat="server"></asp:Label>
        </div>
    </div>--%>

    <div class="row">
        <div class="col-xs-12">
            <EM:MPGridView ID="GV_SecurityGroup" DataKeyNames="SGLDAP" CurrentSortExpression="SGName" CurrentSortDirection="Asc"
                CssClass="table table-bordered table-striped table-hover" runat="server" AllowPaging="true" AllowSorting="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>'
                AutoGenerateColumns="false">

                <Columns>
                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN00001113 %>" SortExpression="SGName">
                        <ItemTemplate>
                            <asp:LinkButton ID="Lb_SGName" CommandName="Details" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.SGroupId") %>'
                                runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.SGName") %>'></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <%--<asp:TemplateField HeaderText="<%$ Resources:Content, strSAMAccountName %>" SortExpression="SGSAM" HeaderStyle-CssClass="col-xs-4">
                        <ItemTemplate>
                            <asp:Label ID="Lb_SGSAM" 
                                runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.SGSAM") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>--%>
                    <asp:TemplateField HeaderText="<%$ Resources:Content, GroupScope %>" SortExpression="GroupType">
                        <ItemTemplate>
                            <asp:Label ID="Lb_SGScope" runat="server" ></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Content, strMembers %>" SortExpression="MembersCount">
                        <ItemTemplate>
                            <asp:Label ID="Lb_MembersCount" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.MembersCount") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000360 %>">
                        <ItemTemplate>
                            <asp:LinkButton class="btn btn-primary waves-effect btnAction" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.SGroupId") %>'
                                ID="LB_Remove" CommandName="RemoveSG" runat="server" Text="<%$ Resources:Content,GN0000278%>" />
                            <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,GN000200%>"
                                TargetControlID="LB_Remove" runat="server">
                            </EM:ConfirmButtonExtender>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerTemplate>
                    <EM:Pager ID="Pager" runat="server" />
                </PagerTemplate>
            </EM:MPGridView>
        </div>
    </div>
</asp:Panel>

<asp:Panel CssClass="row" ID="Pnl_AddSG" runat="server" DefaultButton="Btn_Save">
    <div class="col-xs-12">
        <div class="card">
            <div class="header">
                <h3>
                    <asp:Literal ID="Literal33" runat="server" Text="<%$ Resources:Content,AD001%>" EnableViewState="false"></asp:Literal>
                </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-sm-2 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,GN00001113%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="Txt_DisplayName" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" ControlToValidate="Txt_DisplayName"
                                    Display="None" SetFocusOnError="True" ValidationGroup="SG"></asp:RequiredFieldValidator>
                                <asp:ValidationSummary ID="ValidationSummary4" runat="server" ShowMessageBox="true"
                                    ShowSummary="false" ValidationGroup="SG" HeaderText="<%$ Resources:Content,EM000001%>" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-2 col-xs-12 row-label">
                        <asp:Literal ID="Literal3" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GroupScope %>" />:
                    </div>
                    <div class="col-sm-9 col-xs-12">
                        <div class="form-group">
                            <div class="radio">
                                <%---GroupScope
                                Specifies the group scope of the group. The acceptable values for this parameter are:

                                DomainLocal or 0    (-2147483644)
                                Global or 1         (-2147483646)
                                Universal or 2      (-2147483640)
                                --%>
                                <asp:RadioButtonList ID="Rbl_GroupScope" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Text="<%$ Resources:Content,DomainLocal %>" Value="-2147483644"></asp:ListItem>
                                    <asp:ListItem Text="<%$ Resources:Content,SMI0374 %>" Value="-2147483646" Selected="True"></asp:ListItem>
                                    <asp:ListItem Text="<%$ Resources:Content,Universal %>" Value="-2147483640"></asp:ListItem>
                                </asp:RadioButtonList>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row" ID="Div_Members" runat="server">
                    <div class="col-xs-12 row-label">
                        <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,DGN1110100%>"
                            EnableViewState="false" />:
                    </div>
                
                    <div class="col-xs-12">
                        <ajax:UpdatePanel ID="UP_Members" runat="server">
                            <ContentTemplate>
                                <EM:AddSelectableSelected ID="UCMembers" runat="server" />
                            </ContentTemplate>
                        </ajax:UpdatePanel>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal14" runat="server" EnableViewState="false" Text="<%$ Resources:Content,autoAddUsr%>" />:
                    </div>
                    <div class="col-sm-4 col-xs-7">
                        <div class="form-group">
                            <div class="checkbox">
                                <asp:CheckBox ID="ChBx_autoAddUsersInSGroup" runat="server" Text=" "></asp:CheckBox>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_Save" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                            class="btn btn-primary waves-effect btnAction" ValidationGroup="SG" CausesValidation="true" />
                        <asp:Button ID="Btn_Cancel" runat="server" Text="<%$ Resources:Content,GN0000572%>"
                            class="btn btn-primary waves-effect" CausesValidation="false" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Panel>
