<%@ Page Language="C#" MasterPageFile="~/masterpages/eDashboard.master" AutoEventWireup="True" CodeBehind="Confirmation.aspx.cs" 
    Inherits="site_HITS_Subscriber_Confirmation" Theme="eMain" Title="Brightstar Device Protection: Enroll Subscriber Confirmation" ValidateRequest="false" %>
<%@ Register TagPrefix="eSecuritelHITSControls" Namespace="WebSite.Controls" Assembly="WebSite" %>

<asp:Content ID="Content1" ContentPlaceHolderID="eContent" runat="server"  >

    
    <script type="text/javascript">

        function ConfirmHandsetDelete() 
        {
            var llConfirmAnswer = window.confirm("<%= Resources.SubscriberManagement.ConfirmHandsetDelete %>");

            if (llConfirmAnswer == false) {
                return false;
            }
            return true;
        }

        function postBack() 
        {
            <%= Page.ClientScript.GetPostBackEventReference(this, "") %>
        }

       function preventBack()
       {
        window.history.forward();
       }

        setTimeout("preventBack()", 0);

        window.onunload=function(){null};
        
        function postBackReceipt() 
        {
            aspnetForm.target ='_self';

            <%= Page.ClientScript.GetPostBackEventReference(this, "") %>
        }
        
        function postBackConfirmation() 
        {
            <%= Page.ClientScript.GetPostBackEventReference(this, "") %>
        }


        function HandleCreditCardUpdate() {
            __doPostBack('<%= lbCreditCardUpdated.UniqueID %>','')
        }


        function showManageCreditCard(subscriberId) {

            try {
                
                
                $.colorbox({
                    iframe: true,
                    href: "../Claims/ManageCreditCard.aspx?ccsubid="+ subscriberId,
                    title: $('[id$=_hdManageCreditCardHeader]').val(),
                    width: "1100px",
                    height: "600px",
                    retinaImage: true,
                    retinaUrl: true,
                    overlayClose: false
                });
            }
            catch (err)
            {
                alert("Error: "  + err.message);
            }

            return false;
        }



    </script>

    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/script/eSetFormControls.js" />
            <asp:ScriptReference Path="~/script/eGridHelper.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
    <eSecuritelHITSControls:ScriptingHelper runat="server" ID="ScriptHelper"></eSecuritelHITSControls:ScriptingHelper>
    <div>
        <eSecuritelHITSControls:DefaultTitle runat="server" ID="DefaultTile" Title="<%$ Resources: SubscriberManagement, ConfirmationIntro %>">
        </eSecuritelHITSControls:DefaultTitle>
        
    </div>
    
    
    <div style="font-size:1.1em;background-color: #DBDCDE;margin-bottom: 15px;margin-top: 5px;padding: 10px;">
        <asp:HiddenField ID="XMLData" runat="server" />
        <asp:HiddenField ID="PostToType" runat="server" />
        <asp:HiddenField ID="EnrollmentPageType" runat="server" />
	    <asp:HiddenField ID="txtPrintReceipt" runat="server" />
        <asp:HiddenField ID="UpdateCCInfo" runat="server" />
        
        <asp:LinkButton ID="lbCreditCardUpdated" Visible="false" runat="server" OnClick ="lbUpdateCreditCard_Command" />

        <asp:Label ID="lblConfirmationIntro" runat="server" Text ="<%$ Resources: SubscriberManagement, ConfirmationMessage %>"></asp:Label>
        <asp:Repeater ID="rptEnrollmentConfirmation" runat="server" OnItemDataBound="rptEnrollmentConfirmation_DataBound">
            <ItemTemplate>
                <table width="60%" style="margin-bottom: 25px;margin-top: 25px;padding: 20px;">
                    <tr>
                        <td>
                            <asp:Label ID="lblCCNumber" runat="server" Font-Underline="true"></asp:Label>
                            <asp:Literal ID="ltlCCNumberHidden" runat="server" Visible="false"></asp:Literal>
                            <asp:Label ID="lblErrorMessage" runat="server" ForeColor="Red" Visible="false"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table width="90%">
                                <asp:Repeater ID="rptCreditCards" runat="server" OnItemDataBound="rptCreditCards_DataBound">
                                    <ItemTemplate>
                        
                                            <tr>
                                                <td>
                                                    <asp:Literal ID="ltlMDN" runat="server"></asp:Literal>
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblEnrolledFailed" runat="server" ForeColor="LightGreen"></asp:Label>
                                                    
                                                </td>
                                                <td>
                                                    <asp:Literal ID="ltlMonthlyPremium" runat="server" Visible="false"></asp:Literal>
                                                    <asp:LinkButton ID="lbDeleteHandset" runat="server" Text="<%$ Resources: SubscriberManagement, DeleteHandset %>" OnCommand="lbDeleteHandset_Command" 
                                                     OnClientClick="javascript:return ConfirmHandsetDelete();" ></asp:LinkButton>
                                                </td>
                                                <td>
                                                    <asp:Literal runat="server" ID="ltlMonthlyFinancePayment" Visible="False"></asp:Literal>
                                                </td>
                                            </tr>
                        
                                    </ItemTemplate>
                                    
                                </asp:Repeater>

                            </table>
                        </td>
                        <td>
                            <asp:LinkButton ID="lbUpdateCreditCard" Text="<%$ Resources: SubscriberManagement, UpdateCreditCardNewEnrollment %>" 
                                runat="server"></asp:LinkButton>
                            
                        </td>
                    </tr>
                    <tr>
                        <td>
                        <asp:Label ID="lblChargeInfo" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:Repeater>
    
    </div>
    <div>
        <asp:Button ID="btnReceipt" runat="server" Text="<%$ Resources: SubscriberManagement, ReceiptLabel %>" OnClick="btnReceipt_Click" />
    </div>
    
 
</asp:Content>