<%@ page language="VB" masterpagefile="~/Template/Master.master" autoeventwireup="false" inherits="RCC_SharePoint_SPUsageReport, 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">
    <div class="col-xs-12">
        <div class="row">
            <div class="col-xs-12">
                <div class="card">
                    <div class="body">

                        <EM:TabContainer ID="TbCntr_ServerGroups" runat="server" OnClientActiveTabChanged="loadTabPanel">
                            <EM:TabPanel ID="Tab_ServerGroups" runat="server" HeaderText="<%$ Resources:Content,SMI0215%>">
                                <%--"<%$ Resources:Content,GN0000835%>">--%>
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab0" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent0" runat="server">

                                        <div class="row">
                                            <asp:Panel class="col-xs-12" ID="tblFilter" runat="server" DefaultButton="Btn_Filter">
                                                <div class="row">
                                                    <div class="panel-group search-panel" id="AS_SPReport" role="tablist" aria-multiselectable="true">
                                                        <div class="col-xs-12" role="tab" id="SH_SPReport">
                                                            <div class="card">
                                                                <div class="header" role="button" data-toggle="collapse" data-parent="#AS_VPSReport" href="#<%= CSB_SPReport.ClientID%>" aria-expanded="true" aria-controls="SH_VPSReport">
                                                                    <h3>
                                                                        <%= Resources.Content.GN0000395 %>
                                                                    </h3>
                                                                </div>
                                                                <div id="CSB_SPReport" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_SPReport" aria-expanded="false">
                                                                    <div class="row">
                                                                        <div class="col-md-3 col-sm-6 col-xs-12" id="tb_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" id="tb_lblWebApplication" runat="server">
                                                                            <div class="form-group form-float">
                                                                                <asp:DropDownList ID="DDL_WebApplication" runat="server" AppendDataBoundItems="true">
                                                                                    <asp:ListItem Text="<%$ Resources:Content,L00237%>" Value="0" Selected="True"></asp:ListItem>
                                                                                </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_Title" runat="server"></asp:TextBox>
                                                                                    <asp:Label ID="Label2" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000280%>" class="form-label"></asp:Label>
                                                                                </div>
                                                                            </div>
                                                                        </div>

                                                                        <div class="col-md-3 col-sm-6 col-xs-12">
                                                                            <div class="form-group form-float">
                                                                                <div class="form-line">
                                                                                    <asp:TextBox ID="TxBx_Url" runat="server"></asp:TextBox>
                                                                                    <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ Resources:Content,SPT002066%>" class="form-label"></asp:Label>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-md-3 col-sm-6 col-xs-12">
                                                                            <div class="form-group form-float">
                                                                                <div class="form-line">
                                                                                    <asp:TextBox ID="TxBx_CustomerName" runat="server"></asp:TextBox>
                                                                                    <asp:Label ID="Label6" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000268%>" class="form-label"></asp:Label>
                                                                                </div>
                                                                            </div>
                                                                        </div>

                                                                        <div class="col-md-3 col-sm-6 col-xs-12">
                                                                            <div class="form-group form-float">
                                                                                <div class="form-line">
                                                                                    <asp:TextBox ID="TxBx_CustCompanyName" runat="server"></asp:TextBox>
                                                                                    <asp:Label ID="Label7" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001077%>" class="form-label"></asp:Label>
                                                                                </div>
                                                                            </div>
                                                                        </div>


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

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

                                            <div class="col-xs-12">
                                                <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_ExportOrganizationExcel" class="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,Ex001 %>' />
                                                                    <asp:Button ID="BtnExportToPDF" class="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,strExportToPDF %>' />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-xs-12">
                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <div class="clearfix">
                                                            <div class="double-scroll-wrapper1">
                                                                <div>
                                                                </div>
                                                            </div>
                                                            <div class="double-scroll-wrapper2">
                                                                <asp:GridView ID="GV_SPOrganizationReport" Style="width: 2260px" 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="CustomerId" HeaderText='<%$ Resources:Content,GN0000850%>'
                                                                            HeaderStyle-Width="250px">
                                                                            <ItemTemplate>
                                                                                <%#DataBinder.Eval(Container, "DataItem.CustomerId")%> -  
                                                                                            <%#DataBinder.Eval(Container, "DataItem.Customer")%> <%# If(DataBinder.Eval(Container, "DataItem.CustCompanyName") = "", "", " [" & DataBinder.Eval(Container, "DataItem.CustCompanyName") & "]")%>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="OrganizationName"
                                                                            HeaderText='<%$ Resources:Content, DGN1110608 %>' HeaderStyle-Width="250px">
                                                                            <ItemTemplate>
                                                                                <asp:HyperLink ID="LB_Org" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.OrganizationName")%>'></asp:HyperLink>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText='<%$ Resources:Content,String345%>' HeaderStyle-Width="200px">
                                                                            <ItemTemplate>
                                                                                <%#DataBinder.Eval(Container, "DataItem.DomainNames")%>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="Owner" HeaderText='<%$ Resources:Content, SPT002811 %>'
                                                                            HeaderStyle-Width="250px">
                                                                            <ItemTemplate>
                                                                                <%#DataBinder.Eval(Container, "DataItem.Owner")%>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="FeaturePack" HeaderText='<%$ Resources:Content, USM0022 %>'
                                                                            HeaderStyle-Width="200px">
                                                                            <ItemTemplate>
                                                                                <%# DataBinder.Eval(Container, "DataItem.FeaturePack")%>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="SiteUrl" HeaderText='<%$ Resources:Content, String394 %>'
                                                                            HeaderStyle-Width="250px">
                                                                            <ItemTemplate>
                                                                                <%# DataBinder.Eval(Container, "DataItem.SiteUrl")%>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="Title" HeaderText='<%$ Resources:Content, GN0000280 %>'
                                                                            HeaderStyle-Width="200px">
                                                                            <ItemTemplate>
                                                                                <%# DataBinder.Eval(Container, "DataItem.Title")%>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="MaxStorage" HeaderText='<%$ Resources:Content, MIR1112 %>'
                                                                            HeaderStyle-Width="170px">
                                                                            <ItemTemplate>
                                                                                <asp:Literal ID="Ltl_MaxStorage" runat="server"></asp:Literal>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="PortalStorageInMB"
                                                                            HeaderText='<%$ Resources:Content, MIR1122 %>' HeaderStyle-Width="170px">
                                                                            <ItemTemplate>
                                                                                <asp:Literal ID="Ltl_PortalStorageInMB" runat="server"></asp:Literal>
                                                                                &nbsp;<asp:Label ID="lblMB" runat="server" Text="<%$ Resources:Content,GN0000216%>"></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="ActiveDomains" HeaderText='<%$ Resources:Content, GN00001507 %>'
                                                                            HeaderStyle-Width="150px">
                                                                            <ItemTemplate>
                                                                                <%# Eval("ActiveDomains") %>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField SortExpression="UsedUsers" HeaderText='<%$ Resources:Content, GN0000636 %>'
                                                                            HeaderStyle-Width="150px">
                                                                            <ItemTemplate>
                                                                                <%# DataBinder.Eval(Container, "DataItem.UsedUsers")%>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                    <%--PagerTemplate Start--%>
                                                                    <PagerTemplate>
                                                                        <EM:Pager ID="Pager1" runat="server" />
                                                                    </PagerTemplate>
                                                                    <%--PagerTemplate End--%>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                        </EM:TabContainer>

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

</asp:Content>
