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

<%@ Register Assembly="GroupRadioButton" Namespace="Vladsm.Web.UI.WebControls" TagPrefix="EM" %>
<%@ Register Assembly="GroupRadioButton" Namespace="Vladsm.Web.UI.WebControls" TagPrefix="EM" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>

<div class="row">
    <div id="Div_Error" class="col-xs-12 row-label col-red" runat="server" visible="false">
    </div>
    <div id="Pnl_Listing" runat="server">
        
        <div class="col-xs-12">
            <asp:GridView ID="GV_AddOnType" CssClass="table table-bordered table-striped table-hover" runat="server" AllowPaging="false"
                AllowSorting="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>' AutoGenerateColumns="false">

                <Columns>
                    <asp:TemplateField HeaderText='<%$ Resources:Content,GN0000370 %>' HeaderStyle-CssClass="add-on-checkbox col-common-style" ItemStyle-CssClass="add-on-checkbox col-common-style">
                        <HeaderTemplate>
                            <asp:CheckBox runat="server" ID="ChkBx_All" onclick="SetCheckedaddon(this.checked, this, 'All');"
                                Text=" " class="option-menu" Style="display: none;" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:HiddenField ID="HF_AddOnTypeId" runat="server" Value='<%#DataBinder.Eval(Container, "DataItem.AddOnTypeId")%>' />
                            <asp:CheckBox ID="ChkBx_All" runat="server" onClick="SetCheckedaddon(this.checked, this,'1');" Text=" " CssClass="option-menu" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <%--Add-On Type--%>
                    <asp:TemplateField SortExpression="" HeaderText="<%$ Resources:Content,GN000142%>" HeaderStyle-CssClass="add-On-type col-common-style" ItemStyle-CssClass="add-On-type col-common-style">
                        <ItemTemplate>
                            <asp:LinkButton ID="LB_AddOnName" runat="server"></asp:LinkButton>
                            <div id="Div_Details" runat="server" />
                            <div id="Div_expand" runat="server" class="cursor-pointer" />
                            <div id="HF_Data" runat="server" style="display: none;" />
                            <div id="HF_FullData" runat="server" style="display: none;" />
                            <asp:HiddenField ID="HF_Op" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <%--Quantity--%>
                    <asp:TemplateField SortExpression="" HeaderText="<%$ Resources:Content,String35%>" HeaderStyle-CssClass="add-on-quantity col-common-style" ItemStyle-CssClass="add-on-quantity col-common-style">
                        <ItemTemplate>
                            <div class="col-xs-12 p-l-0 p-r-0">
                                <div class="quantity-label">x</div>
                                <div class="form-group at-the-rate pull-left with-80-per">
                                    <div class="form-line">
                                        <asp:TextBox ID="TxBx_Quantity" runat="server"></asp:TextBox>
                                        <EM:FilteredTextBoxExtender ID="FTE_DisplayValue" Enabled="false" runat="server"
                                            FilterType="Numbers" TargetControlID="TxBx_Quantity">
                                        </EM:FilteredTextBoxExtender>
                                    </div>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <%--AddOn--%>
                    <asp:TemplateField HeaderText="<%$ Resources:Content,GN000129%>" HeaderStyle-CssClass="add-on-name col-common-style" ItemStyle-CssClass="add-on-name col-common-style">
                        <ItemTemplate>
                            <div class="row" id="Tbl_AddOn" runat="server">
                                <div class="col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="DDL_AddOn" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DDL_AddOn_SelectedIndexChanged" />
                                    </div>
                                </div>
                                <div class="col-xs-12" id="TR_Billing" runat="server">
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <asp:Literal ID="Ltl_SetupPrice" runat="server" Text="<%$ Resources:Content,GN0000201%>" EnableViewState="false" />:
                                        </div>
                                        <div class="col-sm-3 col-xs-12">
                                            <asp:HiddenField ID="HTxBx_ODiscount" runat="server" />
                                            <asp:HiddenField ID="HTxBx_OSetup" runat="server" />
                                            <asp:HiddenField ID="HTxBx_OPrice" runat="server" />
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_SetupPrice" runat="server"></asp:TextBox>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <asp:Literal ID="Ltl_Paid" runat="server" Text="<%$ Resources:Content,GN000112%>" EnableViewState="false" />:
                                        </div>
                                        <div class="col-sm-3 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_Paid" runat="server"></asp:TextBox>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <asp:Repeater ID="Rep_CBL_AddOns" runat="server" OnItemDataBound="Rep_CBL_AddOns_ItemDataBound">
                                <ItemTemplate>
                                    <div id="Tbl_CBAddon" runat="server">
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <asp:CheckBox ID="CB_AddOn" runat="server" Text=" " />
                                                <input type="hidden" id="HTxBx_AddOnId" runat="server" />
                                                <input type="hidden" id="HTxBx_ODiscount" runat="server" />
                                                <input type="hidden" id="HTxBx_OSetup" runat="server" />
                                                <input type="hidden" id="HTxBx_OPrice" runat="server" />
                                            </div>
                                        </div>
                                        <div class="row" id="TR_CBBilling" runat="server">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,GN0000201%>"
                                                    EnableViewState="false" />:
                                            </div>
                                            <div class="col-sm-3 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_Setup" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Content,GN000112%>"
                                                    EnableViewState="false" />:
                                            </div>
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_Price" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </ItemTemplate>
                                <AlternatingItemTemplate>
                                    <div id="Tbl_CBAddon" runat="server">
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <asp:CheckBox ID="CB_AddOn" runat="server" Text=" " />
                                                <input type="hidden" id="HTxBx_AddOnId" runat="server" />
                                                <input type="hidden" id="HTxBx_ODiscount" runat="server" />
                                                <input type="hidden" id="HTxBx_OSetup" runat="server" />
                                                <input type="hidden" id="HTxBx_OPrice" runat="server" />
                                            </div>
                                        </div>
                                        <div class="row" id="TR_CBBilling" runat="server">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,GN0000201%>"
                                                    EnableViewState="false" />:
                                            </div>
                                            <div class="col-sm-3 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_Setup" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Content,GN000112%>"
                                                    EnableViewState="false" />:
                                            </div>
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_Price" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </AlternatingItemTemplate>
                            </asp:Repeater>

                            <asp:Repeater ID="Rep_RBL_AddOns" runat="server" OnItemDataBound="Rep_RBL_AddOns_ItemDataBound">
                                <ItemTemplate>
                                    <div id="Tbl_RBAddon" runat="server">
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <%--<asp:RadioButton ID="RB_AddOn" runat="server" />--%>
                                                <EM:GroupRadioButton ID="RB_AddOn" runat="server" />
                                                <label><div id="Div_AddOn" runat="server" class="displayInlineBlock">
                                                </div></label>
                                                <input type="hidden" id="HTxBx_AddOnId" runat="server" />
                                                <input type="hidden" id="HTxBx_ODiscount" runat="server" />
                                                <input type="hidden" id="HTxBx_OSetup" runat="server" />
                                                <input type="hidden" id="HTxBx_OPrice" runat="server" />
                                            </div>
                                        </div>
                                        <div class="row" id="TR_RBBilling" runat="server">
                                            <div class=" col-sm-3 col-xs-12 row-label">
                                                <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,GN0000201%>"
                                                    EnableViewState="false" />:
                                            </div>
                                            <div class=" col-sm-3 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_Setup" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class=" col-sm-3 col-xs-12 row-label">
                                                <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Content,GN000112%>"
                                                    EnableViewState="false" />:
                                            </div>
                                            <div class=" col-sm-3 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_Price" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </ItemTemplate>
                                <AlternatingItemTemplate>
                                    <div id="Tbl_RBAddon" runat="server">
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <%--<asp:RadioButton ID="RB_AddOn" runat="server" />--%>
                                                <EM:GroupRadioButton ID="RB_AddOn" runat="server" />
                                                <label><div id="Div_AddOn" runat="server" class="displayInlineBlock">
                                                </div></label>
                                                <input type="hidden" id="HTxBx_AddOnId" runat="server" />
                                                <input type="hidden" id="HTxBx_ODiscount" runat="server" />
                                                <input type="hidden" id="HTxBx_OSetup" runat="server" />
                                                <input type="hidden" id="HTxBx_OPrice" runat="server" />
                                            </div>
                                        </div>
                                        <div class="row" id="TR_RBBilling" runat="server">
                                            <div class=" col-sm-3 col-xs-12 row-label">
                                                <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,GN0000201%>"
                                                    EnableViewState="false" />:
                                            </div>
                                            <div class=" col-sm-3 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_Setup" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class=" col-sm-3 col-xs-12 row-label">
                                                <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Content,GN000112%>"
                                                    EnableViewState="false" />:
                                            </div>
                                            <div class=" col-sm-3 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_Price" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </AlternatingItemTemplate>
                            </asp:Repeater>

                        </ItemTemplate>
                    </asp:TemplateField>
                    <%--Cycle--%>
                    <asp:TemplateField HeaderText="<%$ Resources:Content,GN000144%>" HeaderStyle-CssClass="add-on-cycle col-common-style" ItemStyle-CssClass="add-on-cycle col-common-style">
                        <ItemTemplate>
                            <div class="col-xs-12">
                                <div class="form-group">
                                    <asp:DropDownList ID="DDL_Cycle" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DDL_Cycle_SelectedIndexChanged" />
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <%--Options--%>
                    <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000360%>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1" Visible="false">
                        <ItemTemplate>
                            <asp:LinkButton class="btn btn-primary waves-effect" ID="LB_PreviewBill" runat="server" CommandName="PreviewBill" Text="<%$ Resources:Content,GN000146%>" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>

    <asp:Panel ID="Pnl_PreviewBill" runat="server" CssClass="col-xs-12" Visible="false">
        <div class="card">
            <div class="header">
                <h3>
                    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,GN000146%>" EnableViewState="false"></asp:Literal>
                </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content,GN000112%>"
                            EnableViewState="false" />:
                    </div>
                    <div class="col-sm-9 col-xs-12" id="TD_Price" runat="server"></div>
                </div>
                <div class="row" id="Tr_Discount" runat="server">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:Content,GN000147%>"
                            EnableViewState="false" />:
                    </div>
                    <div class="col-sm-9 col-xs-12" id="TD_Discount" runat="server"></div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal15" runat="server" Text="<%$ Resources:Content,GN0000201%>"
                            EnableViewState="false" />:
                    </div>
                    <div class="col-sm-9 col-xs-12" id="TD_Setup" runat="server"></div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal16" runat="server" Text="<%$ Resources:Content,GN000114%>"
                            EnableViewState="false" />:
                    </div>
                    <div class="col-sm-9 col-xs-12" id="TD_Total" runat="server"></div>
                </div>
                <div class="row" id="Tr_YouGet" runat="server">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Content,USM0098%>"
                            EnableViewState="false" />:
                    </div>
                    <div class="col-sm-9 col-xs-12" id="TD_Income" runat="server"></div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <asp:Button class="btn btn-primary waves-effect" ID="LB_Close" runat="server" Text="<%$ Resources:Content,GN000150%>" CausesValidation="false" />
                    </div>
                </div>
            </div>
        </div>
    </asp:Panel>
    <%--<asp:Button ID="Btn_Display" runat="server" Style="display: none;" Text="<%$ Resources:Content,GN0000858%>" />
<EM:ModalPopupExtender runat="server" ID="MPE_PreviewBill" BackgroundCssClass="modalBackground"
    DropShadow="false" PopupControlID="Pnl_PreviewBill" TargetControlID="Btn_Display" OkControlID="LB_Close">
</EM:ModalPopupExtender>--%>
</div>
