<%@ page language="VB" masterpagefile="~/Template/Master_Client.master" autoeventwireup="false" inherits="Client_Subscriptions, MachSol.MachPanel.Web" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="System.Web.UI" TagPrefix="cc1" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CPH_Content" runat="Server">

    <div class="col-xs-12">
        <div class="card">
            <div class="body">
                <cc1:TabContainer ID="TC_Sub" runat="server" OnClientActiveTabChanged="loadTabPanel">
                    <cc1:TabPanel ID="Tab_AllSub" runat="server" HeaderText="<%$ Resources:Content,M0096%>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab0" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent0" runat="server">
                                <div class="row">

                                    <div class="col-xs-12">
                                        <div class="card">
                                            <div class="body">
                                                <%-- Search Panel  --%>
                                                <div class="row">
                                                    <ajax:UpdatePanel ID="UP_Search" runat="server" UpdateMode="Conditional">
                                                        <ContentTemplate>
                                                            <div class="panel-group search-panel" id="AS_Subs" role="tablist" aria-multiselectable="true">
                                                                <div class="col-xs-12" role="tab" id="SH_Subs">
                                                                    <div class="card">
                                                                        <div class="header" role="button" data-toggle="collapse" data-parent="#AS_Subs" href="#<%= CSB_Subs.ClientID%>" aria-expanded="true" aria-controls="SH_Subs">
                                                                            <h3>
                                                                                <%= Resources.Content.GN0000395%>
                                                                            </h3>
                                                                        </div>
                                                                        <div id="CSB_Subs" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_Subs" aria-expanded="false">

                                                                            <div class="row">
                                                                                <asp:Panel runat="server" DefaultButton="Btn_Search">

                                                                                    <div class="col-md-2 col-sm-3 col-xs-12">
                                                                                        <div class="form-group form-float">
                                                                                            <div class="form-line">
                                                                                                <asp:TextBox ID="TxBx_Id" runat="server"></asp:TextBox>
                                                                                                <asp:Label ID="Literal1" CssClass="form-label" runat="server" Text='<%$ Resources:Content,SPT002807%>' EnableViewState="false"></asp:Label>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>

                                                                                    <div class="col-md-2 col-sm-3 col-xs-12" id='td_SearchWHMCS_Id' runat="server">
                                                                                        <div class="form-group form-float">
                                                                                            <div class="form-line">
                                                                                                <asp:TextBox ID="TxBx_SearchWHMCS_Id" runat="server"></asp:TextBox>
                                                                                                <asp:Label ID="Literal9" CssClass="form-label" runat="server" EnableViewState="false" Text='<%$ Resources:Content,USM0159%>'></asp:Label>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>

                                                                                    <div class="col-md-3 col-sm-3 col-xs-12">
                                                                                        <div class="form-group form-float">
                                                                                            <div class="form-line">
                                                                                                <asp:TextBox ID="TxBx_DomainName" runat="server" MaxLength="255"></asp:TextBox>
                                                                                                <asp:Label CssClass="form-label" ID="Literal5" runat="server" Text='<%$ Resources:Content,GN000125%>'
                                                                                                    EnableViewState="false"></asp:Label>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>

                                                                                    <div class="col-md-3 col-sm-3 col-xs-12">
                                                                                        <div class="form-group">
                                                                                            <asp:DropDownList ID="DDL_ProductTypes" runat="server">
                                                                                                <asp:ListItem Text="<%$ Resources:Content, SelectProductType %>" Value="0" Selected="True"></asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="col-md-3 col-sm-3 col-xs-12">
                                                                                        <div class="form-group form-float">
                                                                                            <asp:DropDownList ID="DDL_Trial" runat="server">
                                                                                                <asp:ListItem Text="<%$ Resources:Content, SelectTrail %>" Value="-1" Selected="True"></asp:ListItem>
                                                                                                <asp:ListItem Text="<%$ Resources:Content, GN00001544 %>" Value="1"></asp:ListItem>
                                                                                                <asp:ListItem Text="<%$ Resources:Content, GN0000267 %>" Value="0"></asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="col-md-2 col-sm-3 col-xs-12" id="Div_Status" runat="server">
                                                                                        <div class="form-group">
                                                                                            <asp:DropDownList ID="DDL_Status" runat="server"></asp:DropDownList>
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                                                                        <div class="form-group form-float">
                                                                                            <asp:CheckBox ID="ChBx_ShowDeleted" runat="server" Text='<%$ Resources:Content,ShowDeleted%>' />
                                                                                        </div>
                                                                                    </div>
                                                                                     <div class="col-md-3 col-sm-6 col-xs-12">
                                                                                        <div class="form-group form-float">
                                                                                            <asp:RadioButton ID="ChBX_ShowExpired" GroupName="Exp" runat="server" AutoPostBack="true" Text='<%$ Resources:Content,strShowExpiredOnly%>' />
                                                                                        </div>
                                                                                    </div>
                                                                                      <div class="col-md-3 col-sm-6 col-xs-12">
                                                                                        <div class="form-group form-float">
                                                                                            <asp:RadioButton ID="ChBx_ShowExpiring" GroupName="Exp" runat="server" AutoPostBack="true" Text='<%$ Resources:Content,strShowExpiringdOnly%>' />
                                                                                        </div>
                                                                                    </div>
                                                                                    <div class="col-xs-12">
                                                                                        <asp:Button ID="Btn_Search" CssClass="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,GN0000391%>" />
                                                                                        <asp:Button ID="Btn_Clear" CssClass="btn btn-primary waves-effect" Visible="false" runat="server" Text="<%$ Resources:Content,String289 %>" />
                                                                                    </div>
                                                                                </asp:Panel>
                                                                            </div>

                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </ContentTemplate>
                                                    </ajax:UpdatePanel>
                                                </div>

                                                <%-- Listing --%>

                                                <ajax:UpdatePanel ID="UP_Subscriptions" runat="server" UpdateMode="Conditional">
                                                    <ContentTemplate>
                                                        <div class="row">
                                                            <div class="col-xs-12 Div_OpsRow" id="Div_OpsRow" runat="server">
                                                                <div class="card">
                                                                    <div class="header">
                                                                        <h3><%= Resources.Content.GN00001320%>  </h3>
                                                                    </div>
                                                                    <div class="body">
                                                                        <asp:Button CssClass="btn btn-primary waves-effect btnAction" ID="Btn_Export" runat="server" Text="<%$ Resources:Content,strExport%>" />
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-xs-12">
                                                                <asp:GridView ID="GV_Subscriptions" AllowSorting="true" AllowPaging="true" runat="server" CssClass="table table-bordered table-striped table-hover"
                                                                    AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>">
                                                                    <Columns>
                                                                        <asp:TemplateField HeaderText='<%$ Resources:Content,String385%>' HeaderStyle-CssClass="col-xs-1">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Lbl_Status" runat="server"></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="DomainName" HeaderText='<%$ Resources:Content,DGN1119987%>'
                                                                            HeaderStyle-CssClass="col-xs-3">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="LB_DomainName" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.DomainName") %>'></asp:Label>
                                                                                <div id="Div_Addons" runat="server">
                                                                                </div>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="Id" HeaderText='<%$ Resources:Content,SPT002807%>'
                                                                            HeaderStyle-CssClass="col-xs-1">
                                                                            <ItemTemplate>
                                                                                <asp:HyperLink ID="LB_Id" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.Id")%>'></asp:HyperLink>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText='<%$ Resources:Content, USM0159 %>' HeaderStyle-CssClass="col-xs-1">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Lbl_WHMCS_SvcId" runat="server"></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText='<%$ Resources:Content,StrIsTrial%>' HeaderStyle-CssClass="col-xs-1">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Lbl_IsTrial" runat="server">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText='<%$ Resources:Content,GN000135%>' HeaderStyle-CssClass="col-xs-1">
                                                                            <ItemTemplate>
                                                                                <div id="Div_ServiceType" runat="server">
                                                                                </div>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText='<%$ Resources:Content, GN00001489 %>'
                                                                            HeaderStyle-CssClass="col-xs-1">
                                                                            <ItemTemplate>
                                                                                <asp:HyperLink ID="LB_AddonCount" runat="server" />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText='<%$ Resources:Content,GN00001547%>' HeaderStyle-CssClass="col-xs-1">
                                                                            <ItemTemplate>
                                                                                <div id="Div_StartDate" runat="server">
                                                                                </div>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText='<%$ Resources:Content,GN000137%>' HeaderStyle-CssClass="col-xs-1">
                                                                            <ItemTemplate>
                                                                                <div id="Div_NextRenewal" runat="server">
                                                                                </div>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                    </Columns>
                                                                    <%--PagerTemplate Start--%>
                                                                    <PagerTemplate>
                                                                        <EM:Pager ID="Pager1" runat="server" />
                                                                    </PagerTemplate>
                                                                    <%--PagerTemplate End--%>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </ContentTemplate>
                                                </ajax:UpdatePanel>

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

                                </div>
                            </asp:Panel>

                        </ContentTemplate>
                    </cc1:TabPanel>

                   <%-- <cc1:TabPanel ID="Tab_ExpiredSub" runat="server" HeaderText='<%$ Resources:Content,GN00001505%>'>
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab1" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                                <div class="row">


                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </cc1:TabPanel>

                    <cc1:TabPanel ID="Tab_ExpringSub" runat="server" HeaderText='<%$ Resources:Content,M0098%>'>
                        <contenttemplate>
                            <asp:Button ID="Btn_Tab2" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent2" runat="server" Visible="false">
                                <div class="row">

                                     </div>
                            </asp:Panel>
                        </contenttemplate>
                    </cc1:TabPanel>--%>
                </cc1:TabContainer>
            </div>
        </div>
    </div>
</asp:Content>
