<%@ control language="VB" autoeventwireup="false" inherits="RCC_Billing_CC_UsageBasedBillDetail, MachSol.MachPanel.Web" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Ajax" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility" TagPrefix="CustomGrid" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="UC" %>

<div class="row">
    <div class="col-xs-12">
        <asp:Panel ID="Pnl_Search_Inner" DefaultButton="Btn_Search" runat="server">
            <div class="row">
                <div class="panel-group search-panel" id="AS_UsageBasedBill" role="tablist" aria-multiselectable="true">
                    <div class="col-xs-12" role="tab" id="SH_UsageBasedBill">
                        <div class="card">
                            <div class="header" role="button" data-toggle="collapse" data-parent="#AS_UsageBasedBill" href="#<%= CSB_UsageBasedBill.ClientID%>" aria-expanded="true" aria-controls="SH_UsageBasedBill">
                                <h3>
                                    <%= Resources.Content.GN0000395%>
                                </h3>
                            </div>
                            <div id="CSB_UsageBasedBill" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_UsageBasedBill" aria-expanded="false">
                                <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_CustomerName" runat="server"></asp:TextBox>
                                                <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000268%>" class="form-label"></asp:Label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                        <div class="form-group form-float">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_Package" runat="server"></asp:TextBox>
                                                <asp:Label ID="Label6" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN000141%>" 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_SubsName" runat="server"></asp:TextBox>
                                                <asp:Label ID="Label8" runat="server" EnableViewState="false" Text="<%$ Resources:Content,DGN1110287%>" class="form-label"></asp:Label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-xs-12">
                                        <div class="form-group form-float">
                                            <asp:Button ID="Btn_Search" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000391%>" />
                                            <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>

        <%--filter with date range box--%>
        <asp:Panel ID="Pnl_Filter_Doc" runat="server" DefaultButton="Btn_RangeDocGo">
            <div class="row">
                <div class="col-xs-12">
                    <div class="card">
                        <div class="header">
                            <h3>
                                <%= Resources.Content.GN00001363%>
                            </h3>
                        </div>
                        <div class="body">
                            <div class="row">
                                <div class="col-xs-12 col-sm-5 col-md-4">
                                    <label class="row-label display-date-label">
                                        <asp:Literal ID="Literal14" runat="server" Text="<%$ Resources:Content,GN0000687%>" EnableViewState="false" />:
                                    </label>
                                    <div class="form-group display-date-input">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_DRangeAfter" Enabled="false" runat="server"></asp:TextBox>
                                        </div>
                                    </div>

                                    <i runat="server" id="A_DRangeAfter" class="material-icons icon-calendar col-calendar"></i>
                                    <ajax:calendarextender id="CE_DRangeAfter" runat="server" targetcontrolid="TxBx_DRangeAfter"
                                        popupbuttonid="A_DRangeAfter" cssclass="date__calendar">
                                    </ajax:calendarextender>
                                </div>
                                <div class="col-xs-12 col-sm-5 col-md-4">
                                    <label class="row-label display-date-label">
                                        <asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:Content,GN0000688%>" EnableViewState="false" />:
                                    </label>
                                    <div class="form-group display-date-input">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_DRangeBefore" Enabled="false" runat="server"></asp:TextBox>
                                        </div>
                                    </div>

                                    <i runat="server" id="A_DRangeBefore" class="material-icons icon-calendar col-calendar"></i>
                                    <ajax:calendarextender id="CE_DRangeBefore" runat="server" targetcontrolid="TxBx_DRangeBefore"
                                        popupbuttonid="A_DRangeBefore" cssclass="date__calendar">
                                    </ajax:calendarextender>
                                </div>
                                <div class="col-xs-12 col-sm-2 col-md-4 padding-top-10px">
                                    <asp:Button ID="Btn_RangeDocGo" runat="server" Text='<%$ Resources:Content, GN0000395 %>' class="btn btn-primary waves-effect btnAction" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </asp:Panel>

    </div>
    <div class="col-xs-12">
        <asp:Button ID="Btn_UsageBasedBillExportToExcel" runat="server" class="btn btn-primary waves-effect" Text='<%$ Resources:Content, Ex001 %>' CausesValidation="false" />
    </div>
    <div class="col-xs-12">
        <CustomGrid:MPGridView ID="GV_UsageBasedBillDetail" CssClass="table table-bordered table-striped table-hover" AllowSorting="true" AllowPaging="true"
            EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False" CurrentSortExpression="CustomerName" CurrentSortDirection="DESC">

            <Columns>
                <asp:TemplateField HeaderText='<%$ Resources:Content, SM0091 %>' HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4" SortExpression="CustomerName">
                    <ItemTemplate>
                        <table class="table small">
                            <tbody>
                                <tr>
                                    <td class="col-xs-4 row-label">
                                        <asp:Label ID="lblMeter" runat="server"
                                            EnableViewState="false" Text='<%$ Resources:Content,GN0000268%>'></asp:Label>:
                                    </td>
                                    <td class="col-xs-8">
                                        <asp:HyperLink ID="LtrlCustomer" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.CustomerName")%>'></asp:HyperLink>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-xs-4 row-label">
                                        <asp:Label ID="Label1" runat="server"
                                            EnableViewState="false" Text='<%$ Resources:Content,DGN1110287%>'></asp:Label>:
                                    </td>
                                    <td class="col-xs-8">
                                        <asp:Literal ID="LtlOfferName" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.OfferName")%>'></asp:Literal>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-xs-4 row-label">
                                        <asp:Label ID="Literal6" runat="server"
                                            EnableViewState="false" Text='<%$ Resources:Content,GN000141%>'></asp:Label>:
                                    </td>
                                    <td class="col-xs-8">
                                        <asp:HyperLink ID="LtlPackage" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.PackageName")%>'></asp:HyperLink>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText='<%$ Resources:Content, SPT001003 %>' HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4">
                    <ItemTemplate>
                        <table class="table small">
                            <tbody>
                                <tr>
                                    <td class="col-xs-6 row-label">
                                        <asp:Label ID="Label2" runat="server"
                                            EnableViewState="false" Text='<%$ Resources:Content,GN00001473%>'></asp:Label>:
                                    </td>
                                    <td class="col-xs-6">
                                        <asp:Literal ID="Ltl_BillingCycle" runat="server" Text='Monthly'></asp:Literal>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-xs-6 row-label">
                                        <asp:Label ID="lblQuantity" runat="server"
                                            EnableViewState="false" Text='<%$ Resources:Content,BillQuantity%>'></asp:Label>:
                                    </td>
                                    <td class="col-xs-6">
                                        <asp:Literal ID="ltlQuantity" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.BillQuantity")%>'></asp:Literal>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-xs-6 row-label">
                                        <asp:Label ID="lblStartDate" runat="server"
                                            EnableViewState="false" Text='<%$ Resources:Content,ChargeStartDate%>'></asp:Label>:
                                    </td>
                                    <td class="col-xs-6">
                                        <asp:Literal ID="ltlStartDate" runat="server" Text='<%# CType(DataBinder.Eval(Container, "DataItem.ChargeStartDate"),DateTime).ToShortDateString() %>'></asp:Literal>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-xs-6 row-label">
                                        <asp:Label ID="lblChargeEndDate" runat="server"
                                            EnableViewState="false" Text='<%$ Resources:Content,ChargeEndDate%>'></asp:Label>:
                                    </td>
                                    <td class="col-xs-6">
                                        <asp:Literal ID="ltlChargeEndDate" runat="server" Text='<%# CType(DataBinder.Eval(Container, "DataItem.ChargeEndDate"),DateTime).ToShortDateString() %>'></asp:Literal>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText='<%$ Resources:Content, GN00001490 %>' HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4">
                    <ItemTemplate>
                        <table class="table small">
                            <tbody>
                                <tr>
                                    <td class="col-xs-4 row-label">
                                        <asp:Label ID="lblstrUnitPrice" runat="server"
                                            EnableViewState="false" Text='<%$ Resources:Content,strUnitPrice%>'></asp:Label>:
                                    </td>
                                    <td class="col-xs-8">
                                        <asp:Literal ID="LtlstrUnitPrice" runat="server" Text='<%# ViewState("Currency") & " " & Utility.RoundTo2(DataBinder.Eval(Container, "DataItem.ProviderUnitPrice"))%>'></asp:Literal>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="col-xs-4 row-label">
                                        <asp:Label ID="lblBillAmount" runat="server"
                                            EnableViewState="false" Text='<%$ Resources:Content,GN000154%>'></asp:Label>:
                                    </td>
                                    <td class="col-xs-8">
                                        <asp:Literal ID="LtlBillAmount" runat="server" Text='<%# ViewState("Currency") & " " & Utility.RoundTo2(DataBinder.Eval(Container, "DataItem.ProviderCharges"))%>'></asp:Literal>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <%--PagerTemplate Start--%>
            <PagerTemplate>
                <UC:Pager ID="Pager" runat="server" />
            </PagerTemplate>
            <%--PagerTemplate End--%>
        </CustomGrid:MPGridView>
    </div>
</div>
