<%@ control language="VB" autoeventwireup="false" inherits="PCC_Exchange_CC_SubscriptionsReport, 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:Panel ID="Pnl_Filter" runat="server" DefaultButton="Btn_Filter">
    <div class="row">
        <div class="panel-group search-panel" id="AS_SubscriptionsReportFilter" role="tablist" aria-multiselectable="true">
            <div class="col-xs-12" role="tab" id="SH_SubscriptionsReportFilter">
                <div class="card">
                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_SubscriptionsReportFilter" href="#<%= CSB_SubscriptionsReportFilter.ClientID%>" aria-expanded="true" aria-controls="SH_SubscriptionsReportFilter">
                        <h3>
                            <%= Resources.Content.GN0000395%>
                        </h3>
                    </div>
                    <div id="CSB_SubscriptionsReportFilter" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_SubscriptionsReportFilter" aria-expanded="false">
                        <div class="row">
                            <div class="col-md-3 col-sm-6 col-xs-12" runat="server" id="Td_OwnerDDL">
                                <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_Customer" runat="server" MaxLength="200"></asp:TextBox>
                                        <asp:Label ID="Label7" 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="Label1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,CompanyName%>" 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_OrgName" runat="server" MaxLength="255"></asp:TextBox>
                                        <asp:Label ID="Label8" 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_PackageOrAddon" runat="server" MaxLength="255"></asp:TextBox>
                                        <asp:Label ID="Label9" runat="server" EnableViewState="false" Text="<%$ Resources:Content,Dev555%>" 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">
                                    <asp:DropDownList ID="DDL_SPLAType" runat="server">
                                        <asp:ListItem Text='<%$ Resources:Content,Dev123%>' Selected="True" Value=""></asp:ListItem>
                                        <asp:ListItem Text='<%$ Resources:Content,String456%>' Value="0"></asp:ListItem>
                                        <asp:ListItem Text='<%$ Resources:Content,SPLA04%>' Value="1"></asp:ListItem>
                                        <asp:ListItem Text='<%$ Resources:Content,SPLA05%>' Value="2"></asp:ListItem>
                                        <asp:ListItem Text='<%$ Resources:Content,SPLA06%>' Value="3"></asp:ListItem>
                                        <asp:ListItem Text='<%$ Resources:Content,Exch00909%>' Value="4"></asp:ListItem>
                                        <asp:ListItem Text='<%$ Resources:Content,String407%>' Value="5"></asp:ListItem>
                                    </asp:DropDownList>
                                </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,GN0000395%>" />
                                    <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>
<%--end button--%>

<div class="row">
    <div class="col-xs-12">
        <div class="card">
            <div class="header">
                <h3>
                    <%= Resources.Content.GN00001320%>      <%--Operations--%>
                </h3>
            </div>
            <div class="body">
                <asp:Button ID="Btn_ExportSubscriptionsReportExcel" class="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,Ex001 %>' />
            </div>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-xs-12">
        <div class="clearfix">
            <div class="double-scroll-wrapper1">
                <div>
                </div>
            </div>
            <div class="double-scroll-wrapper2">
                <asp:GridView ID="GV_SubscriptionsReport" CssClass="table table-bordered table-striped table-hover" AllowSorting="true"
                    AllowPaging="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False"
                    Style="width: 2150px;">

                    <Columns>
                        <asp:TemplateField SortExpression="OrganizationName" HeaderText='<%$ Resources:Content,DGN1110357%>' HeaderStyle-Width="250px">
                            <ItemTemplate>
                                <asp:HyperLink ID="HL_Organization" runat="server" Text='<%# Eval("OrganizationName")%>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="CustomerName" HeaderText='<%$ Resources:Content,strCustomer%>' HeaderStyle-Width="300px">
                            <ItemTemplate>
                                <asp:HyperLink ID="HL_Customer" runat="server"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="Owner" HeaderText='<%$ Resources:Content, strOwner %>' HeaderStyle-Width="150px">
                            <ItemTemplate>
                                <asp:HyperLink ID="HL_Owner" runat="server" Text='<%# Eval("Owner")%>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content,Dev555%>' HeaderStyle-Width="200px">
                            <ItemTemplate>
                                <%#DataBinder.Eval(Container, "DataItem.PackageOrAddon")%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content,AddonQuantity%>' HeaderStyle-Width="200px">
                            <ItemTemplate>
                                <%# iif(IsDBNull(DataBinder.Eval(Container, "DataItem.AddonQuantity")),0, DataBinder.Eval(Container, "DataItem.AddonQuantity"))%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content,NoOfUserOrLinkedMailboxes%>' HeaderStyle-Width="250px">
                            <ItemTemplate>
                                <%# iif(IsDBNull(DataBinder.Eval(Container, "DataItem.NoOfUserOrLinkedMailboxes")),0, (iif(DataBinder.Eval(Container, "DataItem.NoOfUserOrLinkedMailboxes") = "-1", Resources.Content.Unlimited,DataBinder.Eval(Container, "DataItem.NoOfUserOrLinkedMailboxes"))))%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content,NumberOfSharedMbxs%>' HeaderStyle-Width="200px">
                            <ItemTemplate>
                                <%# iif(IsDBNull(DataBinder.Eval(Container, "DataItem.NoOfSharedMailboxes")),0,iif(DataBinder.Eval(Container, "DataItem.NoOfSharedMailboxes") = "-1",Resources.Content.Unlimited, DataBinder.Eval(Container, "DataItem.NoOfSharedMailboxes")))%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content, NumberOfResourceMbxs %>' HeaderStyle-Width="200px">
                            <ItemTemplate>
                                <%# iif(IsDBNull(DataBinder.Eval(Container, "DataItem.NoOfResourceMailboxes")),0,iif(DataBinder.Eval(Container, "DataItem.NoOfResourceMailboxes") = "-1",Resources.Content.Unlimited,DataBinder.Eval(Container, "DataItem.NoOfResourceMailboxes")))%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content, SPLA %>' HeaderStyle-Width="150px">
                            <ItemTemplate>
                                <%# iif(IsDBNull(DataBinder.Eval(Container, "DataItem.SPLA")),Resources.Content.String456,iif(DataBinder.Eval(Container, "DataItem.SPLA") = "0",Resources.Content.String456,iif(DataBinder.Eval(Container, "DataItem.SPLA") = "1",Resources.Content.SPLA04,iif(DataBinder.Eval(Container, "DataItem.SPLA") = "2",Resources.Content.SPLA05,iif(DataBinder.Eval(Container, "DataItem.SPLA") = "3",Resources.Content.SPLA06,iif(DataBinder.Eval(Container, "DataItem.SPLA") = "4", Resources.Content.Exch00909, Resources.Content.String407))))))%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content, String510 %>' HeaderStyle-Width="250px">
                            <ItemTemplate>
                                <%# iif(IsDBNull(DataBinder.Eval(Container, "DataItem.ProhibitSendReceiveAt")),0, (iif(DataBinder.Eval(Container, "DataItem.ProhibitSendReceiveAt") = "-1", Resources.Content.Unlimited, (DataBinder.Eval(Container, "DataItem.ProhibitSendReceiveAt")/ 1024)))) %>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerTemplate>
                        <EM:Pager ID="Pager1" runat="server" />
                    </PagerTemplate>
                </asp:GridView>
            </div>
        </div>
    </div>
</div>
