<%@ page language="VB" masterpagefile="~/Template/Master.master" autoeventwireup="false" inherits="RCC_Exchange_DistributionList, 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" %>

<asp:Content ID="Content4" ContentPlaceHolderID="CPH_Content" runat="Server">
    <div class="col-xs-12">
        <div class="card">
            <div class="header">
                <h3>
                    <%= Resources.Content.DistributionListManager%> 
                </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-xs-12">
                        <%--Add Button--%>
                        <div class="card Div_OpsRow" id="tbl_Operations" runat="server">
                            <div class="header">
                                <h3>
                                    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,GN00001320%>" EnableViewState="false" />
                                </h3>
                            </div>
                            <div class="body">
                                <asp:Button ID="Btn_AddNewDL" runat="server" Text="<%$ Resources:Content,DGN1110428%>" class="btn btn-primary waves-effect btnAction" />
                                <asp:Button ID="Btn_RemoveAllDLs" runat="server" Custom1="Custom" Style="display: none"
                                    Text="<%$ Resources:Content,GN0000377%>" SkinID="cancelButton" class="btn btn-primary waves-effect btnAction" />
                            </div>
                        </div>
                    </div>
                </div>
                <%--Search Option--%>
                <asp:Panel ID="Pnl_Search" runat="server" DefaultButton="Btn_SrchMB">
                    <div class="row">
                        <div class="panel-group search-panel" id="AS_Mailboxes" role="tablist" aria-multiselectable="true">
                            <div class="col-xs-12" role="tab" id="SH_Mailboxes">
                                <div class="card">
                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_Mailboxes" href="#<%= CSB_Mailboxes.ClientID%>" aria-expanded="true" aria-controls="SH_Mailboxes">
                                        <h3>
                                            <%= Resources.Content.GN0000395%>
                                        </h3>
                                    </div>
                                    <div id="CSB_Mailboxes" runat="server" class="body panel-collapse collapse in" role="tabpanel" aria-labelledby="SH_Mailboxes" aria-expanded="true">
                                        <div class="row">
                                            <div class="col-md-3 col-sm-6 col-xs-12" runat="server" id="td_Owner">
                                                <div class="form-group form-float">
                                                    <asp:DropDownList ID="DDl_Owner" runat="server" onchange="setOwnerCookie(this)"></asp:DropDownList>
                                                </div>
                                            </div>
                                            <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_OrgName" runat="server" MaxLength="200"></asp:TextBox>
                                                        <asp:Label ID="Label1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,DGN1110608%>" class="form-label"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <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_MailDOmain" runat="server" MaxLength="200"></asp:TextBox>
                                                        <asp:Label ID="Label2" runat="server" EnableViewState="false" Text="<%$ Resources:Content,DGN1110516%>" class="form-label"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <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_CustomerID" runat="server"></asp:TextBox>
                                                        <asp:Label ID="Label3" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000715%>" class="form-label"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <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_CustomerName" runat="server" MaxLength="200"></asp:TextBox>
                                                        <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000268%>" class="form-label"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <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_CompanyName" runat="server" MaxLength="200"></asp:TextBox>
                                                        <asp:Label ID="Label6" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001077%>" class="form-label"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <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_DisplayName" runat="server" MaxLength="200"></asp:TextBox>
                                                        <asp:Label ID="Label32" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001113%>" class="form-label"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <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_Email" runat="server" MaxLength="200"></asp:TextBox>
                                                        <asp:Label ID="Label5" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000652%>" class="form-label"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <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_Member" runat="server" MaxLength="200"></asp:TextBox>
                                                        <asp:Label ID="Label7" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GroupMember%>" class="form-label"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-xs-12">
                                                <div class="form-group form-float">
                                                    <asp:Button ID="Btn_SrchMB" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000391%>" />
                                                    <asp:Button ID="Btn_ClearSearchMB" Visible="false" class="btn btn-primary waves-effect" runat="server" OnClick="Btn_ClearSearchMB_Click"
                                                        Text="<%$ Resources:Content,String289 %>" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </asp:Panel>


                <asp:Panel CssClass="row" ID="Pnl_AddDL" DefaultButton="Btn_OK" runat="server" Visible="false">
                    <div class="col-xs-12">
                        <div class="card">
                            <div class="header">
                                <h3>
                                    <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content,DGN1110428%>" EnableViewState="false" />
                                </h3>
                            </div>
                            <div class="body">
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <label>
                                            <asp:Literal ID="Ltrl_DGN1110617" runat="server"
                                                Text="<%$ Resources:Content,DGN1110617%>" EnableViewState="false"></asp:Literal>:</label>
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <asp:DropDownList ID="DDL_DistributionGroupType" runat="server" AutoPostBack="true">
                                                <asp:ListItem Text="<%$ Resources:Content,Exch026%>" Value="0" />
                                                <asp:ListItem Text="<%$ Resources:Content,Exch027%>" Value="1" />
                                                <asp:ListItem Text="<%$ Resources:Content,Exch028%>" Value="2" />
                                                <asp:ListItem Text="<%$ Resources:Content,Exch921%>" Value="3" />
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <label>
                                            <asp:Literal ID="Literal2" runat="server"
                                                Text="<%$ Resources:Content,DGN1110567%>" EnableViewState="false"></asp:Literal>:</label>
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <asp:DropDownList ID="DDL_Orgs" runat="server" />
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-xs-12">
                                        <asp:Button ID="Btn_OK" runat="server" Text="<%$ Resources:Content,GN0000858%>" class="btn btn-primary waves-effect" />
                                        <asp:Button ID="Btn_Cancel" runat="server" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </asp:Panel>

                <div class="card" id="Pnl_Listing" runat="server">

                    <div class="body">
                        <div class="row">

                            <div class="col-lg-1 col-md-2 col-sm-12 col-xs-12">
                                <label class="row-label">
                                    <asp:Literal ID="Literal14" runat="server" Text="<%$ Resources:Content,strSortBy%>" EnableViewState="false" />:
                                </label>
                            </div>
                            <div class="col-md-3 col-sm-12 col-xs-12">
                                <div class="form-group form-float">
                                    <asp:DropDownList ID="DDL_SortBy" runat="server">
                                        <asp:ListItem Text="<%$ Resources:Content,GN000165%>" Value="DistListName"></asp:ListItem>
                                        <asp:ListItem Text="<%$ Resources:Content,SMI0504%>" Value="EmailAddress"></asp:ListItem>
                                        <%--     <asp:ListItem Text="<%$ Resources:Content,strMemberName%>" Value="MemberDisplayName"></asp:ListItem>
                                        <asp:ListItem Text="<%$ Resources:Content,MemberEmails%>" Value="MemberEMailAddress"></asp:ListItem>--%>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="col-md-2 col-sm-12 col-xs-12">
                                <div class="form-group form-float">
                                    <asp:DropDownList ID="DDL_SortDirection" runat="server">
                                        <asp:ListItem Text="<%$ Resources:Content, strAscending %>" Value="Asc" Selected="True"></asp:ListItem>
                                        <asp:ListItem Text="<%$ Resources:Content,strDescending%>" Value="Desc"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="col-xs-12 col-md-3">
                                <div class="form-group form-float">
                                    <asp:Button ID="Btn_SortMB" runat="server" CssClass="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000647%>" />
                                </div>
                            </div>
                            <div class="col-xs-12">
                                <%--Listing--%>
                                <asp:GridView CssClass="table table-bordered table-striped table-hover" EmptyDataText="<%$ Resources:Content, GN00001375 %>"
                                    ID="GV_DstLst" AllowPaging="True" AllowSorting="true" runat="server" AutoGenerateColumns="false"
                                    DataKeyNames='DistListID,DistListName,ExchHostingID,OrganizationID'>

                                    <Columns>
                                        <asp:TemplateField HeaderText='<%$ Resources:Content,GN0000370 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                            <HeaderTemplate>
                                                <asp:CheckBox runat="server" ID="ChkBx_All" onclick="SetCheckedHeader(this.checked, this, 'All');"
                                                    Text=" " CssClass="option-menu" />
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox Text=" " ID="ChkBx_All" runat="server" onclick="SetCheckedHeader(this.checked, this,'1');" CssClass="option-menu" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN00001113%>" SortExpression="DistListName" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <%--<asp:LinkButton ID="LB_Name" runat="server" CommandName="Show_DListDetail"></asp:LinkButton>--%>
                                                <asp:HyperLink ID="LB_Name" runat="server" Target="_blank"></asp:HyperLink>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000652%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <%--<asp:LinkButton ID="LB_Email" runat="server" CommandName="Show_DListDetail"></asp:LinkButton>--%>
                                                <asp:HyperLink ID="LB_Email" runat="server" Target="_blank"></asp:HyperLink>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000673%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_Type" runat="server" Text="" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,DGN1110518%>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                            <ItemTemplate>
                                                <asp:Label ID="lbl_Members" runat="server" Text=" " />
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="<%$ Resources:Content,String385%>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                            <ItemTemplate>

                                                <asp:LinkButton ID="LB_Status" CommandName="Status" runat="server"></asp:LinkButton>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000360%>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="LB_Delete" CommandName="Delete_DList" CssClass="btn btn-primary waves-effect btnAction"
                                                    Text="<%$ Resources:Content,GN0000377%>" runat="server"></asp:LinkButton>
                                                <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,CBE001%>"
                                                    TargetControlID="LB_Delete" runat="server">
                                                </EM:ConfirmButtonExtender>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <%--PagerTemplate Start--%>
                                    <PagerTemplate>
                                        <EM:Pager ID="Pager4" runat="server" />
                                    </PagerTemplate>
                                    <%--PagerTemplate End--%>
                                </asp:GridView>
                            </div>
                        </div>

                    </div>
                </div>

            </div>
        </div>
    </div>



    <asp:Button ID="Button1" runat="server" CssClass="btn-dummy" />
    <asp:Button ID="Button2" runat="server" CssClass="btn-dummy" />
    <EM:ModalPopupExtender runat="server" ID="MPE_ExportPST" BackgroundCssClass="modalBackground"
        DropShadow="false" CancelControlID="Btn_Close" PopupControlID="Pnl_ExportPST" TargetControlID="Button1"
        OkControlID="Button2">
    </EM:ModalPopupExtender>

</asp:Content>
