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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="System.Web.UI" TagPrefix="cc1" %>

<asp:Content ID="Content5" ContentPlaceHolderID="CPH_Content" runat="Server">

    <script>
        function ShowFullText(event) {
            $("span[data-num='FullText" + $(event).attr("data-num") + "']").removeClass("hide");
            $("span[data-num='PartialText" + $(event).attr("data-num") + "']").addClass("hide");
            $(event).addClass("hide")
            $("button[data-num2='Less" + $(event).attr("data-num") + "']").removeClass("hide");
        }
        function ShowPartialText(event) {
            $("span[data-num='FullText" + $(event).attr("data-num") + "']").addClass("hide");
            $("span[data-num='PartialText" + $(event).attr("data-num") + "']").removeClass("hide");
            $(event).addClass("hide")
            $("input[data-num2='More" + $(event).attr("data-num") + "']").removeClass("hide");
        }
    </script>
    <div class="col-xs-12">
        <div class="card">
            <div class="body">
                <EM:TabContainer ID="TbCntr_O365UsageReport" runat="server" OnClientActiveTabChanged="loadTabPanel">

                    <EM:TabPanel ID="Tab_TenantUsageReport" runat="server" HeaderText="<%$ Resources:Content,O365UsageReport%>">
                        <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="header">
                                                <h3>
                                                    <%= Resources.Content.GN00001320%>                                                                                                                                 
                                                </h3>
                                            </div>
                                            <div class="body">
                                                <div class="clearfix">
                                                    <asp:Button ID="Btn_ExportTenantReportToExcel" class="btn btn-primary waves-effect" runat="server"
                                                        Text='<%$ Resources:Content,Ex001 %>' />

                                                    <asp:Button ID="Btn_ExportTenantReportToPDF" class="btn btn-primary waves-effect" runat="server"
                                                        Text='<%$ Resources:Content,strExportToPDF %>' />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <asp:Panel ID="Pnl_Filter" runat="server" DefaultButton="Btn_Filter">

                                    <div class="row">
                                        <div class="panel-group search-panel" id="AS_SearchFilter" role="tablist" aria-multiselectable="true">
                                            <div class="col-xs-12" role="tab" id="SH_SearchFilter">
                                                <div class="card">
                                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_SearchFilter" href="#<%= CSB_SearchFilter.ClientID%>" aria-expanded="true" aria-controls="SH_SearchFilter">
                                                        <h3>
                                                            <%= Resources.Content.GN0000395%>
                                                        </h3>
                                                    </div>
                                                    <div id="CSB_SearchFilter" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_SearchFilter" aria-expanded="false">

                                                        <div class="row">
                                                            <div class="col-md-3 col-sm-6 col-xs-12" id="td_DDL_Owner" runat="server">
                                                                <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_TenantName" MaxLength="200" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Ltrl_TenantName" runat="server" class="form-label" Text='<%$ Resources:Content,TenantName %>'></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-3 col-sm-6 col-xs-12" id="td_customername" runat="server">
                                                                <div class="form-group form-float">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_CustomerName" MaxLength="255" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Ltrl_CustomerName" runat="server" class="form-label" Text="<%$ Resources:Content,GN0000268%>"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-3 col-sm-6 col-xs-12" id="td_companyname" runat="server">
                                                                <div class="form-group form-float">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_CustCompanyName" MaxLength="255" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Ltrl_CompanyName" runat="server" class="form-label" Text='<%$ Resources:Content,GN00001077%>'></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <asp:Button ID="Btn_Filter" class="btn btn-primary waves-effect" runat="server" 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>



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

                                                <Columns>
                                                    <asp:TemplateField SortExpression="Customer" HeaderText='<%$ Resources:Content,GN0000850%>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%-- <%#Eval("CustomerID")%>--%>
                                                            <asp:HyperLink ID="LB_Customer" runat="server" Text='<%#Eval("CustomerID") & " " & Eval("Customer")%>' href='<%# ResolveUrl("~/RCC/Clients/ClientDetail.aspx?CID=" + Eval("CustomerId").ToString())%>'></asp:HyperLink>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="CustomerNumber"
                                                        HeaderText='<%$ Resources:Content,GN000924%>' HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%#Eval("CustomerNumber")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="CustCompanyName"
                                                        HeaderText='<%$ Resources:Content,GN00001077%>' HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("CustCompanyName")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="Owner" HeaderText='<%$ Resources:Content, SPT002811 %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("Owner")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="TenantName" HeaderText='<%$ Resources:Content, TenantName %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <asp:HyperLink ID="LB_Tenant" runat="server" Text='<%#Eval("TenantName")%>'></asp:HyperLink>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText='<%$ Resources:Content,String345%>' HeaderStyle-Width="250px">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Lbl_Domains_All"
                                                                data-num='<%# "FullText" & DataBinder.Eval(Container.DataItem, "TenantId")%>'
                                                                runat="server" Text="" CssClass="hide break-word-all" />
                                                            <asp:Label ID="Lbl_Domains_One"
                                                                data-num='<%# "PartialText" & DataBinder.Eval(Container.DataItem, "TenantId") %>'
                                                                CssClass="break-word-all"
                                                                runat="server" Text="" />
                                                            <br />
                                                            <asp:Button
                                                                ID="lbtn_More"
                                                                runat="server"
                                                                CommandName="Detail"
                                                                CommandArgument='<%# DataBinder.Eval(Container.DataItem, "TenantId")%>'
                                                                Text="<%$ Resources:Content,ShowMore %>"
                                                                CssClass="btn btn-primary btn-sm"
                                                                data-num='<%# DataBinder.Eval(Container.DataItem, "TenantId")%>'
                                                                data-num2='<%# "More" & DataBinder.Eval(Container.DataItem, "TenantId")%>'
                                                                OnClientClick="ShowFullText($(this));return false;"></asp:Button>
                                                            <button id="btn_ViewLess"
                                                                class="btn btn-primary btn-sm hide"
                                                                data-num='<%#  DataBinder.Eval(Container.DataItem, "TenantId") %>'
                                                                data-num2='<%# "Less" & DataBinder.Eval(Container.DataItem, "TenantId")%>'
                                                                onclick="ShowPartialText($(this));return false;">
                                                                <%= Resources.Content.ShowLess %></button>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="ActiveUsers" HeaderText='<%$ Resources:Content, ActiveUsers %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("ActiveUsers")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="DeletedUsers" HeaderText='<%$ Resources:Content, DeletedUsers %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("DeletedUsers")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="TotalUsers" HeaderText='<%$ Resources:Content, USM0085 %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("TotalUsers")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="UserMailBoxes" HeaderText='<%$ Resources:Content, UserMailBoxes %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("UserMailBoxes")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="SharedMailBoxes"
                                                        HeaderText='<%$ Resources:Content, FAM00111 %>' HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("SharedMailBoxes")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="RoomMailBoxes" HeaderText='<%$ Resources:Content, RoomMailBoxes %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("RoomMailBoxes")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="EquipmentMailBoxes"
                                                        HeaderText='<%$ Resources:Content, EquipmentMailBoxes %>' HeaderStyle-Width="180px">
                                                        <ItemTemplate>
                                                            <%# Eval("EquipmentMailBoxes")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="SFBUsers" HeaderText='<%$ Resources:Content, SFBUsers %>' HeaderStyle-Width="150px">

                                                        <ItemTemplate>
                                                            <%# Eval("SFBUsers")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="DistributionGroups" HeaderText='<%$ Resources:Content, DistributionGroups %>'
                                                        HeaderStyle-Width="170px">

                                                        <ItemTemplate>
                                                            <%# Eval("DistributionGroups")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="DynamicDistributionGroups"
                                                        HeaderText='<%$ Resources:Content, DynamicDistributionGroups %>' HeaderStyle-Width="220px">
                                                        <ItemTemplate>
                                                            <%# Eval("DynamicDistributionGroups")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="MailEnabledSecurityGroups"
                                                        HeaderText='<%$ Resources:Content, MailEnabledSecurityGroups %>' HeaderStyle-Width="220px">
                                                        <ItemTemplate>
                                                            <%# Eval("MailEnabledSecurityGroups")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="SimpleSecurityGroups"
                                                        HeaderText='<%$ Resources:Content, SimpleSecurityGroups %>' HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%# Eval("SimpleSecurityGroups")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="UnifiedGroups" HeaderText='<%$ Resources:Content, UnifiedGroups %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%# Eval("UnifiedGroups")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="MailContacts" HeaderText='<%$ Resources:Content, DGN1110407 %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("MailContacts")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="DateCreated" HeaderText='<%$ Resources:Content, GN00001496 %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%# Eval("DateCreated")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="LastSyncedAt" HeaderText='<%$ Resources:Content, LastSyncedAt %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%# Eval("LastSyncedAt")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <%--PagerTemplate Start--%>
                                                <PagerTemplate>
                                                    <EM:Pager ID="Pager1" runat="server" />
                                                </PagerTemplate>
                                                <%--PagerTemplate End--%>
                                            </asp:GridView>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>

                    <EM:TabPanel ID="Tab_SubsUsageReport" runat="server" HeaderText="<%$ Resources:Content, strO365SubsUsageRpt%>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab1" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">


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


                                </div>
                                <asp:Panel ID="Pnl_Subs_Filter" runat="server" DefaultButton="Btn_Subs_Filter">
                                    <div class="row">
                                        <div class="col-xs-12" id="tblFilter" runat="server">
                                            <div class="row">
                                                <div class="panel-group search-panel" id="AS_O365SubUsageReport" role="tablist" aria-multiselectable="true">
                                                    <div class="col-xs-12" role="tab" id="SH_O365SubUsageReport">
                                                        <div class="card">
                                                            <div class="header" role="button" data-toggle="collapse" data-parent="#AS_O365SubUsageReport" href="#<%= CSB_O365SubUsageReport.ClientID%>" aria-expanded="true" aria-controls="SH_O365SubUsageReport">
                                                                <h3>
                                                                    <%= Resources.Content.GN0000395%>
                                                                </h3>
                                                            </div>
                                                            <div id="CSB_O365SubUsageReport" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_O365SubUsageReport" aria-expanded="false">
                                                                <div class="row">

                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="td_subs_DDL_Owner" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <asp:DropDownList ID="Ddl_Subs_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_Subs_TenantName" MaxLength="200" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Literal3" runat="server" class="form-label" Text='<%$ Resources:Content,TenantName %>'></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="td_subs_customername" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_Subs_CustomerName" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Literal4" runat="server" class="form-label" Text="<%$ Resources:Content,GN0000268%>"></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="td_subs_companyname" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_Subs_CompanyName" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Literal5" runat="server" class="form-label" Text='<%$ Resources:Content,GN00001077%>'></asp:Label>

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

                                                                    <div class="col-xs-12">
                                                                        <div class="form-group form-float">
                                                                            <asp:Button ID="Btn_Subs_Filter" class="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,GN0000395 %>' />
                                                                            <asp:Button ID="Btn_Subs_Clear" Visible="false" class="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,String289 %>" />
                                                                        </div>
                                                                    </div>

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




                                    <div class="row">
                                        <div class="col-xs-12">
                                            <div class="double-scroll-wrapper1">
                                                <div>
                                                </div>
                                            </div>
                                            <div class="double-scroll-wrapper2">
                                                <asp:GridView ID="GV_Subs_UsageReport" CssClass="table table-bordered table-striped table-hover table-layout-fixed" AllowSorting="true"
                                                    AllowPaging="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server"
                                                    AutoGenerateColumns="False" Width="2950px">

                                                    <Columns>
                                                        <asp:TemplateField SortExpression="Customer" HeaderText='<%$ Resources:Content,GN0000850%>'
                                                            HeaderStyle-Width="150px">
                                                            <ItemTemplate>
                                                                <asp:HyperLink ID="LB_Customer" runat="server" Text='<%#Eval("CustomerID") & " " & Eval("Customer")%>' href='<%# ResolveUrl("~/RCC/Clients/ClientDetail.aspx?CID=" + Eval("CustomerId").ToString())%>'></asp:HyperLink>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="CustomerNumber"
                                                            HeaderText='<%$ Resources:Content,GN000924%>' HeaderStyle-Width="100px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_CustomerNumber" runat="server" Text='<%#Eval("CustomerNumber")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="CustCompanyName"
                                                            HeaderText='<%$ Resources:Content,GN00001077%>' HeaderStyle-Width="150px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_CustCompanyName" runat="server" Text='<%#Eval("CustCompanyName")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="Owner" HeaderText='<%$ Resources:Content, SPT002811 %>'
                                                            HeaderStyle-Width="150px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_Owner" runat="server" Text='<%#Eval("Owner")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="TenantName" HeaderText='<%$ Resources:Content, TenantName %>'
                                                            HeaderStyle-Width="150px">
                                                            <ItemTemplate>
                                                                <asp:HyperLink ID="LB_Tenant" runat="server" Text='<%#Eval("TenantName")%>' href='<%# ResolveUrl("~/RCC/O365/TenantDetail.aspx?TId=" + Eval("TenantId").ToString())%>'></asp:HyperLink>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="LinkedWithLocalOrg"
                                                            HeaderText='<%$ Resources:Content, strLinkedWithLocalOrg %>' HeaderStyle-Width="100px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_LinkedWithLocalOrg" runat="server" Text='<%# IIf(Eval("LinkedWithLocalOrg"), Resources.Content.GN0000004, Resources.Content.GN0000005)%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="SubscriptionName"
                                                            HeaderText='<%$ Resources:Content, DGN1110287 %>' HeaderStyle-Width="250px">
                                                            <ItemTemplate>
                                                                <asp:HyperLink ID="LB_SubscriptionName" runat="server" Text='<%#Eval("SubscriptionName")%>'
                                                                    href='<%# ResolveUrl("~/RCC/O365/O365Sub.aspx?SubId=" + Eval("ServiceHostingId").ToString())%>'></asp:HyperLink>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="CustomOfferName"
                                                            HeaderText='<%$ Resources:Content, strOfferName %>' HeaderStyle-Width="250px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_CustomOfferName" runat="server" Text='<%#Eval("CustomOfferName")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="MSOfferId"
                                                            HeaderText='<%$ Resources:Content, strMSOfferId %>' HeaderStyle-Width="250px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_MSOfferId" runat="server" Text='<%#Eval("MSOfferId")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="IsAddOn"
                                                            HeaderText='<%$ Resources:Content, strIsAddOn %>' HeaderStyle-Width="95px" ItemStyle-HorizontalAlign="center">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_IsAddOn" runat="server" Text='<%# IIf(Eval("IsAddOn"), Resources.Content.GN0000004, Resources.Content.GN0000005)%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="Quantity"
                                                            HeaderText='<%$ Resources:Content, String35 %>' HeaderStyle-Width="100px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_Quantity" runat="server" Text='<%#Eval("Quantity")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="UnitPrice"
                                                            HeaderText='<%$ Resources:Content, strUnitPrice %>' HeaderStyle-Width="100px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_Quantity" runat="server"
                                                                    Text='<%#String.Format("{0} {1}", Eval("CurrencySymbol"), Eval("UnitPrice"))%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="UnitCost"
                                                            HeaderText='<%$ Resources:Content, strUnitCost %>' HeaderStyle-Width="100px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_Quantity" runat="server"
                                                                    Text='<%# String.Format("{0} {1}", Eval("CurrencySymbol"), Eval("UnitCost"))%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="MSStatus"
                                                            HeaderText='<%$ Resources:Content, String385 %>' HeaderStyle-Width="100px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_MSStatus" runat="server" Text='<%# [Enum].GetName(GetType(MachSol.O365.DataModels.Entities.CSP.Order.SubscriptionStatus), Eval("MSStatus"))%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="CategoryCustomName"
                                                            HeaderText='<%$ Resources:Content, DEV1172 %>' HeaderStyle-Width="200px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_CategoryCustomName" runat="server" Text='<%#Eval("CategoryCustomName")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="PackageName"
                                                            HeaderText='<%$ Resources:Content, String490 %>' HeaderStyle-Width="200px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_PackageName" runat="server" Text='<%#Eval("PackageName")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="ProfileName"
                                                            HeaderText='<%$ Resources:Content, L00193 %>' HeaderStyle-Width="150px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_ProfileName" runat="server" Text='<%#Eval("ProfileName")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="SubscriptionSetupDate"
                                                            HeaderText='<%$ Resources:Content, GN00001082 %>' HeaderStyle-Width="105px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_SubscriptionSetupDate" runat="server" Text='<%#CType(Eval("SubscriptionSetupDate"), Date).ToShortDateString()%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="SubscriptionEndDate"
                                                            HeaderText='<%$ Resources:Content, DGN1119986 %>' HeaderStyle-Width="105px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_SubscriptionEndDate" runat="server" Text='<%#CType(Eval("SubscriptionEndDate"),Date).ToShortDateString()%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="SuspendDate"
                                                            HeaderText='<%$ Resources:Content, strSuspendDate %>' HeaderStyle-Width="125px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_SuspendDate" runat="server" Text='<%#CType(Eval("SuspendDate"), Date).ToShortDateString()%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <%--PagerTemplate Start--%>
                                                    <PagerTemplate>
                                                        <EM:Pager ID="Pager2" runat="server" />
                                                    </PagerTemplate>
                                                    <%--PagerTemplate End--%>
                                                </asp:GridView>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>

                    <EM:TabPanel ID="Tab_TenantDetailedUsageReport" runat="server" HeaderText="<%$ Resources:Content,DetailedUsageReport%>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab2" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent2" runat="server" Visible="false">

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

                                                    <asp:Button ID="Btn_Details_ExportTenantReportToPDF" class="btn btn-primary waves-effect" runat="server"
                                                        Text='<%$ Resources:Content,strExportToPDF %>' />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <asp:Panel ID="Pnl_Details_Filter" runat="server" DefaultButton="Btn_Details_Filter">
                                    <div class="row">
                                        <div class="col-xs-12" id="tblFilter2" runat="server">
                                            <div class="row">
                                                <div class="panel-group search-panel" id="AS_O365DetailReport" role="tablist" aria-multiselectable="true">
                                                    <div class="col-xs-12" role="tab" id="SH_O365DetailReport">
                                                        <div class="card">
                                                            <div class="header" role="button" data-toggle="collapse" data-parent="#AS_O365DetailReport" href="#<%= CSB_O365DetailReport.ClientID%>" aria-expanded="true" aria-controls="SH_O365DetailReport">
                                                                <h3>
                                                                    <%= Resources.Content.GN0000395%>
                                                                </h3>
                                                            </div>
                                                            <div id="CSB_O365DetailReport" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_O365DetailReport" aria-expanded="false">
                                                                <div class="row">

                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="td_details_DDL_Owner" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <asp:DropDownList ID="DDL_Details_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_Details_TenantName" MaxLength="200" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Ltrl_Details_TenantName" runat="server" class="form-label" Text='<%$ Resources:Content,TenantName %>'></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="td_details_customername" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_Details_CustomerName" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="LtrlDetails__CustomerName" runat="server" class="form-label" Text="<%$ Resources:Content,GN0000268%>"></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="td_details_companyname" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_Details_CustCompanyName" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Ltrl_Details_CompanyName" runat="server" class="form-label" Text='<%$ Resources:Content,GN00001077%>'></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="col-xs-12">
                                                                        <div class="form-group form-float">
                                                                            <asp:Button ID="Btn_Details_Filter" class="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,GN0000395 %>' />
                                                                            <asp:Button ID="Btn_Details_Clear" Visible="false" class="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,String289 %>" />

                                                                        </div>
                                                                    </div>

                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>



                                <div class="row">
                                    <div class="col-xs-12">

                                        <div class="double-scroll-wrapper1">
                                            <div>
                                            </div>
                                        </div>
                                        <div class="double-scroll-wrapper2">
                                            <asp:GridView ID="GV_Details_O365TenantReport" Style="width: 2600px" CssClass="table table-bordered table-striped table-hover table-layout-fixed" AllowSorting="true"
                                                AllowPaging="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False">
                                                <Columns>
                                                    <asp:TemplateField SortExpression="Customer" HeaderText='<%$ Resources:Content,GN0000850%>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("CustomerID") &" "& Eval("Customer")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="CustomerNumber"
                                                        HeaderText='<%$ Resources:Content,GN000924%>' HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%#Eval("CustomerNumber")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="CustCompanyName"
                                                        HeaderText='<%$ Resources:Content,GN00001077%>' HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("CustCompanyName")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="Owner" HeaderText='<%$ Resources:Content, SPT002811 %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("Owner")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="TenantName" HeaderText='<%$ Resources:Content, TenantName %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <asp:HyperLink ID="LB_Tenant" runat="server" Text='<%#Eval("TenantName")%>'></asp:HyperLink>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="DisplayName" HeaderText='<%$ Resources:Content, GN00001113 %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%# Eval("DisplayName")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="UserPrincipalName"
                                                        HeaderText='<%$ Resources:Content, DEV1042 %>'
                                                        HeaderStyle-Width="350px">
                                                        <ItemTemplate>
                                                            <%# Eval("UserPrincipalName")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="Licenses" HeaderText='<%$ Resources:Content, Licenses %>'
                                                        HeaderStyle-Width="250px">
                                                        <ItemTemplate>
                                                            <div id="Div_Licenses" runat="server" />
                                                            <div id="Div_expandLicenses" runat="server" class="cursor-pointer" />
                                                            <div id="HF_DataLicenses" runat="server" style="display: none;" />
                                                            <div id="HF_FullDataLicenses" runat="server" style="display: none;" />
                                                            <asp:HiddenField ID="HF_OpLicenses" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="AssignedRoles" HeaderText='<%$ Resources:Content, USM0079 %>'
                                                        HeaderStyle-Width="250px">
                                                        <ItemTemplate>
                                                            <div id="Div_AssignedRoles" runat="server" />
                                                            <div id="Div_expandAssignedRoles" runat="server" class="cursor-pointer" />
                                                            <div id="HF_DataAssignedRoles" runat="server" style="display: none;" />
                                                            <div id="HF_FullDataAssignedRoles" runat="server" style="display: none;" />
                                                            <asp:HiddenField ID="HF_OpAssignedRoles" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="BlockCredential"
                                                        HeaderText='<%$ Resources:Content, SignInStatus %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# IIf(Eval("BlockCredential"), Resources.Content.SPT002527, Resources.Content.String167)%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="IsDeleted"
                                                        HeaderText='<%$ Resources:Content, GN0000302 %>' HeaderStyle-Width="100px">
                                                        <ItemTemplate>
                                                            <%# Eval("IsDeleted")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="MailBoxType" HeaderStyle-Width="150px" HeaderText='<%$ Resources:Content, DGN1110617 %>'>
                                                        <ItemTemplate>
                                                            <asp:Literal ID="Ltrl_MailBoxType" runat="server"></asp:Literal>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="SfbEnabled"
                                                        HeaderText='<%$ Resources:Content, SfbEnabled %>' HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# IIf(Eval("SfbEnabled"), Resources.Content.GN0000553, Resources.Content.GN0000552)%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <%--PagerTemplate Start--%>
                                                <PagerTemplate>
                                                    <EM:Pager ID="Pager3" runat="server" />
                                                </PagerTemplate>
                                                <%--PagerTemplate End--%>
                                            </asp:GridView>
                                        </div>

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

                    <EM:TabPanel ID="Tab_AzureUsageReport" runat="server" HeaderText="<%$Resources:Content,strAzureUsageReport %>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab3" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent3" runat="server" Visible="false">

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

                                                    <asp:Button ID="Btn_AzureUsageReport_ExportToPDF" class="btn btn-primary waves-effect" runat="server"
                                                        Text='<%$ Resources:Content,strExportToPDF %>' />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <asp:Panel ID="Pnl_AzureReport_Filter" runat="server" DefaultButton="Btn_AzureUsageReport_Filter">
                                    <div class="row">
                                        <div class="col-xs-12" id="tblFilter3" runat="server">
                                            <div class="row">
                                                <div class="panel-group search-panel" id="AS_AzureUsageReport" role="tablist" aria-multiselectable="true">
                                                    <div class="col-xs-12" role="tab" id="SH_AzureUsageReport">
                                                        <div class="card">
                                                            <div class="header" role="button" data-toggle="collapse" data-parent="#AS_AzureUsageReport" href="#<%= CSP_O365AzureUsageReport.ClientID%>" aria-expanded="true" aria-controls="SH_AzureUsageReport">
                                                                <h3>
                                                                    <%= Resources.Content.GN0000395%>
                                                                </h3>
                                                            </div>
                                                            <div id="CSP_O365AzureUsageReport" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_AzureUsageReport" aria-expanded="false">
                                                                <div class="row">

                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="td_AzureReport_DDL_Owner" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <asp:DropDownList ID="DDL_AzureReport_Owner" runat="server" onchange="setOwnerCookie(this)">
                                                                            </asp:DropDownList>
                                                                        </div>
                                                                    </div>

                                                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                                                        <label class="font-bold">
                                                                            <asp:Literal ID="Ltrl_AzureReport_FromDate" runat="server" Text='<%$ Resources:Content,strChargedFromDate%>'></asp:Literal>
                                                                        </label>
                                                                        <div class="form-group display-date-input">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_AzureReport_FromDate" MaxLength="255" runat="server"></asp:TextBox>
                                                                            </div>
                                                                        </div>
                                                                        <asp:Image ImageUrl="~/images/icons/SmallCalendar.png" runat="server" ID="Img_AzureReport_FromDate" />
                                                                        <EM:CalendarExtender ID="CE_AzureReport_FromDate" runat="server" TargetControlID="TxBx_AzureReport_FromDate"
                                                                            Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>"
                                                                            PopupButtonID="Img_AzureReport_FromDate" CssClass="date__calendar">
                                                                        </EM:CalendarExtender>
                                                                    </div>
                                                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                                                        <label class="font-bold">
                                                                            <asp:Literal ID="Ltrl_AzureReport_ToDate" runat="server" Text='<%$ Resources:Content,strChargedToDate%>'></asp:Literal>
                                                                        </label>
                                                                        <div class="form-group display-date-input">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_AzureReport_ToDate" MaxLength="255" runat="server"></asp:TextBox>
                                                                            </div>
                                                                        </div>
                                                                        <asp:Image ImageUrl="~/images/icons/SmallCalendar.png" runat="server" ID="Img_AzureReport_ToDate" />
                                                                        <EM:CalendarExtender ID="CE_AzureReport_ToDate" runat="server" TargetControlID="TxBx_AzureReport_ToDate"
                                                                            Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>"
                                                                            PopupButtonID="Img_AzureReport_ToDate" CssClass="date__calendar">
                                                                        </EM:CalendarExtender>
                                                                    </div>
                                                                </div>
                                                                <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_AzureReport_TenantName" MaxLength="200" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Ltrl_AzureReport_TenantName" runat="server" class="form-label" Text='<%$ Resources:Content,TenantName %>'></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="td_AzureReport_customername" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_AzureReport_CustomerName" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Label1" runat="server" class="form-label" Text="<%$ Resources:Content,GN0000268%>"></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="td_AzureReport_companyname" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_AzureReport_CustCompanyName" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Ltrl_AzureReport_CompanyName" runat="server" class="form-label" Text='<%$ Resources:Content,GN00001077%>'></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_AzureReport_ServiceType" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Ltrl_AzureReport_ServiceType" runat="server" class="form-label" Text='<%$ Resources:Content,GN000135%>'></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_AzureReport_ServiceName" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Ltrl_AzureReport_ServiceName" runat="server" class="form-label" Text='<%$ Resources:Content,DGN1119975%>'></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_AzureReport_Resource" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Ltrl_AzureReport_Resource" runat="server" class="form-label" Text='<%$ Resources:Content,L0060%>'></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_AzureReport_Region" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Ltrl_AzureReport_Region" runat="server" class="form-label" Text='<%$ Resources:Content,FAM0058%>'></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="td_Currency_Filter" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_AzureReport_Currency" MaxLength="255" runat="server"></asp:TextBox>
                                                                                <asp:Label ID="Ltrl_AzureReport_Currency" runat="server" class="form-label" Text='<%$ Resources:Content,GN0000952%>'></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-xs-12">
                                                                        <div class="form-group pull-right">
                                                                            <asp:Button ID="Btn_AzureUsageReport_Filter" class="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,GN0000395 %>' />
                                                                            <asp:Button ID="Btn_AzureUsageReport_Clear" Visible="false" class="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,String289 %>" />

                                                                        </div>
                                                                    </div>

                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>

                                <div class="row">
                                    <div class="col-xs-12">

                                        <div class="double-scroll-wrapper1">
                                            <div>
                                            </div>
                                        </div>
                                        <div class="double-scroll-wrapper2">
                                            <asp:GridView ID="GV_O365AzureUsageReport" Style="width: 3700px" CssClass="table table-bordered table-striped table-hover table-layout-fixed" AllowSorting="true"
                                                AllowPaging="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False">
                                                <Columns>
                                                    <asp:TemplateField SortExpression="Customer" HeaderText='<%$ Resources:Content,GN0000850%>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("CustomerID") &" "& Eval("Customer")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="CustomerNumber"
                                                        HeaderText='<%$ Resources:Content,GN000924%>' HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%#Eval("CustomerNumber")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="CustCompanyName"
                                                        HeaderText='<%$ Resources:Content,GN00001077%>' HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("CustCompanyName")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="Owner" HeaderText='<%$ Resources:Content, SPT002811 %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("Owner")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="TenantName" HeaderText='<%$ Resources:Content, TenantName %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <asp:HyperLink ID="LB_Tenant" runat="server" Text='<%#Eval("TenantName")%>'></asp:HyperLink>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="Region" HeaderText='<%$ Resources:Content, FAM0058 %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("Region")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="ResourceId" HeaderText='<%$ Resources:Content, strResourceId %>'
                                                        HeaderStyle-Width="300px">
                                                        <ItemTemplate>
                                                            <%#Eval("ResourceId")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="ResourceName" HeaderText='<%$ Resources:Content, GN0000199 %>'
                                                        HeaderStyle-Width="300px">
                                                        <ItemTemplate>
                                                            <%#Eval("ResourceName")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="ServiceType" HeaderText='<%$ Resources:Content, GN000135 %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("ServiceType")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="ServiceName" HeaderText='<%$ Resources:Content, DGN1119975 %>'
                                                        HeaderStyle-Width="250px">
                                                        <ItemTemplate>
                                                            <%#Eval("ServiceName")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="ChargeStartDate" HeaderText='<%$ Resources:Content, strChargedFromDate %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("ChargeStartDate")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="ChargeEndDate" HeaderText='<%$ Resources:Content, strChargedToDate %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("ChargeEndDate")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="ConsumedQuantity" HeaderText='<%$ Resources:Content, strConsumedQuantity %>'
                                                        HeaderStyle-Width="100px">
                                                        <ItemTemplate>
                                                            <%#Eval("ConsumedQuantity")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="Unit" HeaderText='<%$ Resources:Content, strUnit %>'
                                                        HeaderStyle-Width="100px">
                                                        <ItemTemplate>
                                                            <%#Eval("Unit")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="IncludedQuantity" HeaderText='<%$ Resources:Content,strIncludedQuantity  %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%#Eval("IncludedQuantity")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="OverageQuantity" HeaderText='<%$ Resources:Content, strOverageQuantity %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%#Eval("OverageQuantity")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="MicrosoftCharges" HeaderText='<%$ Resources:Content, strMicrosoftCharges %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# String.Format("{0:d} {1}", Eval("CurrencySymbol"), Eval("MicrosoftCharges"))%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="CustomerCharges" HeaderText='<%$ Resources:Content,  strCustomerCharges%>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# String.Format("{0:d} {1}", Eval("CurrencySymbol"), Eval("CustomerCharges"))%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="ProviderIncome" HeaderText='<%$ Resources:Content, strProviderIncome %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%# String.Format("{0:d} {1}", Eval("CurrencySymbol"), Eval("ProviderIncome"))%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="ResellerIncome" HeaderText='<%$ Resources:Content, strResellerIncome %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# String.Format("{0:d} {1}", Eval("CurrencySymbol"), Eval("ResellerIncome"))%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

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

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

                    <EM:TabPanel ID="Tab_DirectRoutingReport" runat="server" HeaderText="<%$ Resources:Content,strDirectRoutingReport%>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab4" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent4" runat="server" Visible="false">

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

                                    <div class="row">
                                        <div class="panel-group search-panel" id="AS_DirectRoutingSearchFilter" role="tablist" aria-multiselectable="true">
                                            <div class="col-xs-12" role="tab" id="SH_DirectRoutingSearchFilter">
                                                <div class="card">
                                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_SearchFilter" href="#<%= CSB_DirectRoutingSearchFilter.ClientID%>" aria-expanded="true" aria-controls="SH_DirectRoutingSearchFilter">
                                                        <h3>
                                                            <%= Resources.Content.GN0000395%>
                                                        </h3>
                                                    </div>
                                                    <div id="CSB_DirectRoutingSearchFilter" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_SearchFilter" aria-expanded="false">

                                                        <div class="row">
                                                            <div class="col-md-3 col-sm-6 col-xs-12" id="td_DR_DDL_Owner" runat="server">
                                                                <div class="form-group form-float">
                                                                    <asp:DropDownList ID="DDL_OwnerDR" 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_TenantNameDR" MaxLength="200" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Label2" runat="server" class="form-label" Text='<%$ Resources:Content,TenantName %>'></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-3 col-sm-6 col-xs-12" id="td_DR_DDL_CustomerName" runat="server">
                                                                <div class="form-group form-float">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_CustomerNameDR" MaxLength="255" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Label3" runat="server" class="form-label" Text="<%$ Resources:Content,GN0000268%>"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-3 col-sm-6 col-xs-12" id="td_DR_DDL_CustCompanyName" runat="server">
                                                                <div class="form-group form-float">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_CustCompanyNameDR" MaxLength="255" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Label4" runat="server" class="form-label" Text='<%$ Resources:Content,GN00001077%>'></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <asp:Button ID="Btn_FilterDR" class="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,GN0000395 %>' />
                                                                    <asp:Button ID="Btn_ClearDR" Visible="false" class="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,String289 %>" />
                                                                </div>
                                                            </div>

                                                        </div>

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>

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

                                                <Columns>
                                                    <asp:TemplateField SortExpression="Customer" HeaderText='<%$ Resources:Content,GN0000850%>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%-- <%#Eval("CustomerID")%>--%>
                                                            <asp:HyperLink ID="LB_Customer" runat="server" Text='<%#Eval("CustomerID") & " " & Eval("Customer")%>' href='<%# ResolveUrl("~/RCC/Clients/ClientDetail.aspx?CID=" + Eval("CustomerId").ToString())%>'></asp:HyperLink>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField SortExpression="CustCompanyName"
                                                        HeaderText='<%$ Resources:Content,GN00001077%>' HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("CustCompanyName")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="Owner" HeaderText='<%$ Resources:Content, SPT002811 %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <%#Eval("Owner")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField SortExpression="TenantName" HeaderText='<%$ Resources:Content, TenantName %>'
                                                        HeaderStyle-Width="200px">
                                                        <ItemTemplate>
                                                            <asp:HyperLink ID="LB_Tenant" runat="server" Text='<%#Eval("TenantName")%>'></asp:HyperLink>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText='<%$ Resources:Content, strPSTNGateway %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("Domain")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText='<%$ Resources:Content, strAssociatedPhoneNumbers %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("AssociatedPhoneNumbers")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText='<%$ Resources:Content, strAssignedPhoneNumbers %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("AssignedPhoneNumbers")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText='<%$ Resources:Content, strVoiceMailEnabledUsers %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("VoiceMailCount")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText='<%$ Resources:Content, strEnterpriseVoiceEnabledUsers %>'
                                                        HeaderStyle-Width="150px">
                                                        <ItemTemplate>
                                                            <%# Eval("EnterpriseVoiceCount")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

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

                </EM:TabContainer>
            </div>
        </div>
    </div>

</asp:Content>

