<%@ control language="VB" autoeventwireup="false" inherits="RCC_Billing_CC_CommissionDetail, 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-md-12 col-xs-12">
        <div class="card">
            <div class="body">

                <asp:Panel ID="Pnl_Search" runat="server" DefaultButton="Btn_Search">
                    <div class="row">
                        <div class="panel-group search-panel" id="AS_ComDetail" role="tablist" aria-multiselectable="true">
                            <div class="col-xs-12" role="tab" id="SH_ComDetail">
                                <div class="card">
                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_ComDetail" href="#<%= CSB_ComDetail.ClientID%>" aria-expanded="true" aria-controls="SH_ComDetail">
                                        <h3>
                                            <%= Resources.Content.GN0000395%>
                                        </h3>
                                    </div>
                                    <div id="CSB_ComDetail" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_ComDetail" aria-expanded="false">
                                        <div class="row">
                                            <div class="col-xs-12 col-sm-4 col-md-2">
                                                <div class="form-group form-float">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_InvoiceId" runat="server"></asp:TextBox>
                                                        <asp:Label ID="Label1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000718%>" class="form-label"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-2">
                                                <div class="form-group form-float">
                                                    <asp:DropDownList ID="Ddl_ComStatus" runat="server">
                                                        <asp:ListItem Text="<%$ Resources:Content,SelectStatus %>" Value="-1" Selected="True"></asp:ListItem>
                                                        <asp:ListItem Text="<%$ Resources:Content,GN0000348 %>" Value="0"></asp:ListItem>
                                                        <asp:ListItem Text="<%$ Resources:Content,USM0103 %>" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="<%$ Resources:Content,GN0000347 %>" Value="2"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="clearfix hidden-md hidden-lg"></div>
                                            <div class="col-xs-12 col-sm-4 col-md-3">
                                                <label class="row-label display-date-label">
                                                    <asp:Literal ID="Ltrl_FromDate" runat="server" Text="<%$ Resources:Content,GN00001547%>"></asp:Literal>:
                                                </label>
                                                <div class="form-group display-date-input">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_FromDate" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <i runat="server" id="Ibtn_FromDate" class="material-icons icon-calendar col-calendar"></i>
                                                <ajax:CalendarExtender id="CE_FromDate" runat="server" targetcontrolid="TxBx_FromDate"
                                                    popupbuttonid="Ibtn_FromDate" cssclass="date__calendar">
                                                </ajax:CalendarExtender>
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-3">
                                                <label class="row-label display-date-label">
                                                    <asp:Literal ID="Div8" runat="server" EnableViewState="false" Text='<%$ Resources:Content, DGN1119986 %>' />
                                                </label>
                                                <div class="form-group display-date-input">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_ToDate" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <i runat="server" id="Ibtn_ToDate" class="material-icons icon-calendar col-calendar"></i>
                                                <ajax:CalendarExtender id="CE_ToDate" runat="server" targetcontrolid="TxBx_ToDate"
                                                    popupbuttonid="Ibtn_ToDate" cssclass="date__calendar">
                                                </ajax:CalendarExtender>
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-2 padding-top-10px">
                                                <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>

                <CustomGrid:MPGridView ID="GV_ResellerCommissionDetail" CssClass="table table-bordered table-striped table-hover" AllowSorting="true" AllowPaging="true"
                    EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False" CurrentSortExpression="CustomerId" CurrentSortDirection="DESC">

                    <Columns>
                        <asp:TemplateField HeaderText='<%$ Resources:Content, USM0102 %>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                            <ItemTemplate>
                                <asp:Label ID="Img_Status" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000718 %>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" SortExpression="InvoiceId">
                            <ItemTemplate>
                                <asp:LinkButton ID="Lbtn_InvoiceId" runat="server" Text='<%# Eval("InvoiceId")%>' PostBackUrl='<%# String.Format("~/RCC/Billing/InvoiceDetail.aspx?InvoiceId={0}|{1}", Eval("InvoiceId"), Eval("CompanyID"))%>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content, USM0107 %>' HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2" SortExpression="InvoicedAmount">
                            <ItemTemplate>
                                <asp:Literal ID="Ltrl_InvoicedAmount" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content, USM0098 %>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" SortExpression="Income">
                            <ItemTemplate>
                                <asp:Label ID="Ltrl_Income" runat="server" data-toggle="tooltip" data-placement="top" title="" data-original-title="" data-html="true" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000721 %>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" SortExpression="DateStamp">
                            <ItemTemplate>
                                <asp:Literal ID="Ltrl_Date" runat="server" Text='<%# CType(Eval("DateStamp"), Date).ToShortDateString()%>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <%--PagerTemplate Start--%>
                    <PagerTemplate>
                        <UC:Pager ID="Pager" runat="server" />
                    </PagerTemplate>
                    <%--PagerTemplate End--%>
                </CustomGrid:MPGridView>

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