<%@ Page Language="C#" MasterPageFile="~/masterpages/eFulfillmentWizard.master" MaintainScrollPositionOnPostback="true"
    AutoEventWireup="True" Inherits="site_HITS_Claims_Wizard_Fulfillment_VerifyClaim"
    Title="Fulfillment Wizard - Step 2" Culture="auto" UICulture="auto" Theme="eMain"
    CodeBehind="VerifyClaim.aspx.cs" %>

<%@ Register Assembly="eSecuritel.HITS.UI.Components" Namespace="eSecuritel.HITS.UI.Components"
    TagPrefix="cc1" %>
<%@ Register Src="~/Controls/GridViews/NoteHistory.ascx" TagPrefix="uc" TagName="NoteHistory" %>
<%@ Register Src="~/Controls/GridViews/SubscriberData.ascx" TagPrefix="uc" TagName="SubscriberData" %>
<%@ Register Src="~/Controls/GridViews/ClaimHistory.ascx" TagPrefix="uc" TagName="ClaimHistory" %>
<%@ Register Src="~/Controls/HITSCalendar.ascx" TagName="HITSCalendar" TagPrefix="uc" %>
<%@ Register Src="~/Controls/Payment.ascx" TagName="PaymentControl" TagPrefix="uc" %>
<%@ Register TagPrefix="eSecuritelHITSControls" Namespace="WebSite.Controls" Assembly="WebSite" %>

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

    <center>
        <asp:Label ID="lbl_FlowInfo" runat="server" style="color: green; font-size: medium; font-weight: bold"></asp:Label>
        &nbsp;&nbsp;
        <div id="divProgressBar" style="font-size: 1.2em; font-family: Arial; display: none;">
            <asp:Label ID="ProgressBarLabel" runat="server" Text="<%$ Resources:FulfillmentManagement, LabelProgressBar %>" />  
            <img id="imgProgressBar" alt="Progress Bar" src="../../../../../images/preloader4.gif" />
        </div>
    </center>
    <h2>
        <asp:Label ID="Label1" runat="server" Text="<%$ Resources : ClaimsManagement,LabelClaimStatus %>" />
    </h2>
    <div class="claimsWizardFormAction">
        <center>
            </span><span style="margin-right: 10px;">
                <asp:Button ID="PaymentButton" runat="server" Text="<%$ Resources : FulfillmentManagement,LabelFulfill %>" Width="100px" OnClientClick="disableButton();"   
                    UseSubmitBehavior="false" OnClick="PaymentButton_Click" Visible="False" />
            </span><span style="margin-right: 10px;">
                <asp:Button ID="m_btnFulfill" runat="server" Text="<%$ Resources : FulfillmentManagement,LabelFulfill %>" TabIndex="6" Width="100px"
                    OnClick="m_btnFulfill_Clicked" />
            </span><span style="margin-right: 10px;">
                <asp:Button ID="m_btnRepair" runat="server" TabIndex="7" Text="<%$ Resources : Default,LabelRepair %>" Width="100px"
                    OnClick="m_btnRepair_Clicked" />
            </span><span style="margin-right: 10px;">
                <asp:Button ID="m_btnUpgrade" runat="server" TabIndex="8" Text="<%$ Resources : Default,HeaderTextUpgraded %>" Width="100px"
                    OnClick="m_btnUpgrade_Clicked" />
            </span><span style="margin-right: 10px;">
                <asp:Button ID="m_btnRejectFulfillmentWizard" runat="server" TabIndex="9" Visible="false"
                    Text="<%$ Resources : Default,ButtonReject %>" Width="100px" OnClick="m_btnRejectFulfillmentWizard_Clicked" />
            </span><span style="margin-right: 10px;">
                <input id="m_btnEscalation" type="button" runat="server" value="<%$ Resources : EscalationManagement,ButtonEscalation %>" visible="false" />
            </span>
        </center>
    </div>
    <div style="display: inline-block">
        <div style="margin-bottom: 5px; font-size: 18px; padding-right: 20px; display: inline">
            <b>
                <asp:Label ID="m_lblClaimID" runat="server" Text="<%$ Resources : FulfillmentManagement,LabelClaimID %>" />
            </b>
        </div>
        <div style="margin-bottom: 5px; font-size: 18px; display: inline">
            <b>
                <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources : ServicePlanManagement,LabelDeductibleColon %>" />
                <asp:Label ID="DeductibleLabel" runat="server" />
            </b>
        </div>
    </div>
    <br />
    <asp:Label ID="ClaimInformationLabel" runat="server" Font-Bold="true" />
    <h2>
        <asp:Label ID="Label3" runat="server" Text="<%$ Resources : ClaimsManagement,LabelClaimDetails %>" />
    </h2>
    <div class="greyblock">
        <table>
            <tr>
                <td>
                    <table>
                        <tr>
                            <td align="right">
                                <b>
                                    <asp:Label ID="Label10" runat="server" Text="<%$ Resources : Default,LabelLossDateColon %>" /><span
                                        style="color: #ff0000">* </span></b>
                            </td>
                            <td>
                                <uc:HITSCalendar ID="m_calLossDate" runat="server" Enabled="false" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <b>
                                    <asp:Label ID="Label11" runat="server" Text="<%$ Resources : Default,LabelLossDescriptionColon %>" /><span
                                        style="color: #ff0000">* </span></b>
                            </td>
                            <td>
                                <asp:Label ID="lblLossDescription" runat="server" Width="500px" />
                            </td>
                        </tr>
                        <asp:Panel ID="m_pnlLostStolen" runat="server" Visible="False">
                            <tr>
                                <td align="right">
                                    <b>
                                        <asp:Label ID="Label5" runat="server" Text="<%$ Resources : ClaimsManagement,LabelPoliceNumberColon %>" /></b>
                                </td>
                                <td>
                                    <asp:CheckBox ID="m_chkPoliceReportNumberAvailable" runat="server" TabIndex="12"
                                        AutoPostBack="True" OnCheckedChanged="m_chkPoliceReportNumberAvailable_CheckChanged" />
                                </td>
                            </tr>
                            <asp:Panel ID="m_pnlPoliceReportNumber" runat="server" Visible="False">
                                <tr>
                                    <td align="right">
                                        <b>
                                            <asp:Label ID="Label6" runat="server" Text="<%$ Resources : ClaimsManagement,LabelPoliceReportNumberColon %>" /><span
                                                style="color: #ff0000">* </span></b>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="m_txtPoliceReportNumber" runat="server" TabIndex="13" />
                                        <asp:RequiredFieldValidator ID="m_rfvPoliceReportNumber" runat="server" ControlToValidate="m_txtPoliceReportNumber"
                                            Text="<%$ Resources:Default, ValidatorText %>" ErrorMessage="<%$ Resources:ClaimsManagement,ErrorMessagePoliceReportNumber %>"
                                            ToolTip="<%$ Resources:ClaimsManagement,ErrorMessagePoliceReportNumber %>" Display="Dynamic" />
                                    </td>
                                </tr>
                            </asp:Panel>
                            <tr>
                                <td align="right">
                                    <b>
                                        <asp:Label ID="Label7" runat="server" Text="<%$ Resources : ClaimsManagement,PoliceStationLabel %>" /></b>
                                </td>
                                <td>
                                    <asp:TextBox ID="m_txtPoliceStation" runat="server" TabIndex="14" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <b>
                                        <asp:Label ID="Label8" runat="server" Text="<%$ Resources : ClaimsManagement,LabelPoliceStationTelephoneColon %>" /></b>
                                </td>
                                <td>
                                    <asp:TextBox ID="m_txtPoliceStationTelephone" runat="server" TabIndex="15" />
                                </td>
                            </tr>
                        </asp:Panel>
                        <asp:Panel ID="m_pnlDamageDefectiveWarranty" runat="server" Visible="False">
                            <tr>
                                <td align="right">
                                    <b>
                                        <asp:Label ID="Label9" runat="server" Text="<%$ Resources : ClaimsManagement,LabelWaterDamageColon %>" /></b>
                                </td>
                                <td>
                                    <asp:CheckBox ID="m_chkWaterDamage" runat="server" TabIndex="16" />
                                </td>
                            </tr>
                        </asp:Panel>
                    </table>
                </td>
                <td valign="top">
                    <asp:CheckBox ID="m_chkOverrideLossType" runat="server" Text="<%$ Resources : ClaimsManagement,LabelOverrideLossTypeColon %>"
                        AutoPostBack="True" OnCheckedChanged="m_chkOverrideLossType_CheckChanged" Visible="false" />
                    <asp:DropDownList ID="m_ddlLossType" runat="server" Visible="False" />
                </td>
            </tr>
        </table>
    </div>
    <uc:SubscriberData ID="m_ucSubscriberData" runat="server" />
    <uc:PaymentControl ID="ucPaymentControl" runat="server" Visible="false" OnValidationError = "ucPaymentControl_ValidationError" />
    <asp:Panel ID="pnlShippingMethods" runat="server" Visible="false">
        <h2>
            <asp:Localize ID="Localize1" runat="server" EnableViewState="False" Text="<%$ Resources: LogisticsManagement, LabelShippingMethod %>" />
        </h2>
        <div class="claimsWizardSectionGridInput">
            <table>
                <tr>
                    <td>
                        <asp:RadioButtonList ID="m_rblShippingMethod" runat="server" AutoPostBack="True"
                            OnSelectedIndexChanged="m_rblShippingMethod_SelectedIndexChanged" RepeatDirection="Vertical">
                            <asp:ListItem Text="<%$ Resources: LogisticsManagement, LabelNextDay %>" Value="117" />
                            <asp:ListItem Text="<%$ Resources: LogisticsManagement, Label2ndDay %>" Value="95" />
                            <asp:ListItem Text="<%$ Resources: LogisticsManagement, LabelGround %>" Value="96"
                                Selected="True" />
                        </asp:RadioButtonList>
                    </td>
                    <td>
                        <b>
                            <asp:Label ID="lblShippingMethod" runat="server" EnableViewState="False" Text="<%$ Resources: LogisticsManagement, LabelShippingMethodsColon %>" />
                        </b>
                        <asp:GridView ID="grdShipByLocation" runat="server" AutoGenerateColumns="false" OnRowDataBound="grdShipByLocation_RowDataBound">
                            <Columns>
                                <asp:BoundField HeaderText="<%$ Resources: Default, LabelService %>" DataField="ShippingMethodName" />

                                <asp:TemplateField HeaderText="<%$ Resources: LogisticsManagement, LabelFee %>" ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="lblFee" runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:BoundField HeaderText="<%$ Resources: LogisticsManagement, LabelTransitDays %>"
                                    DataField="TransitDays" />
                                <asp:TemplateField HeaderText="<%$ Resources: LogisticsManagement, LabelExpectedArrivalDate %>">
                                    <ItemTemplate>
                                        <asp:Label ID="lblExpectedDate" runat="server" />
                                        <asp:HiddenField ID="hdnShippingMethod" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                    <td>
                        <b>
                            <h>Charges:</h>
                        </b>
                        <asp:GridView ID="grdCharges" runat="server" AutoGenerateColumns="false" ShowFooter="true"
                            OnRowDataBound="grdCharges_RowDataBound">
                            <Columns>
                                <asp:BoundField HeaderText="<%$ Resources: LogisticsManagement, LabelFees %>" DataField="FeeDescription" />
                                

                                <asp:TemplateField HeaderText="<%$ Resources: LogisticsManagement, LabelAmount %>" ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="lblAmount" runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField Visible="false">
                                    <HeaderTemplate>
                                        <asp:Label ID="Label2" runat="server" Text="<%$ Resources: LogisticsManagement, LabelWaiveFee %>"></asp:Label></HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkWaiveFee" runat="server" AutoPostBack="True" OnCheckedChanged="chkWaiveFee_CheckedChanged"  />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
                        <asp:Localize ID="Localize6" runat="server" Text="<%$ Resources: LogisticsManagement, LabelFeeCharged %>"
                            EnableViewState="False" />
                        <%=HttpContext.Current.Session["CultureCurrencySymbol"]%>: <span style="color: #ff0000">
                            * </span>&nbsp;&nbsp;
                        <asp:TextBox ID="m_txtAmount" runat="server" Width="50px" />
                        <asp:RequiredFieldValidator ID="m_rfvAmount" runat="server" ControlToValidate="m_txtAmount"
                            Text="<%$ Resources:Default, ValidatorText %>" ErrorMessage="<%$ Resources: LogisticsManagement, ErrorMessageAmountRequired %>"
                            ToolTip="<%$ Resources: LogisticsManagement, ErrorMessageAmountRequired %>" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td>
                        <asp:Literal ID="Literal42" runat="server" EnableViewState="false" Visible="false"
                            Text="<%$ Resources: LogisticsManagement, LabelShippingChargesColon %>" />
                    </td>
                    <td>
                        <asp:Label ID="m_lblShippingCharges" runat="server" Visible="false" />
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <uc:ClaimHistory ID="m_ucClaimHistory" runat="server" />
    <uc:NoteHistory ID="m_ucNoteHistory" runat="server" OnNoteSubmitted="m_ucNoteHistory_NoteSubmitted" />
    <asp:Panel ID="pnlNoteArchive" runat="server" Style="display: none; width: 800px;">
    <asp:Panel ID="pnlNoteArchiveHeader" runat="server" EnableViewState="false" CssClass="modalHeader">
        <table cellpadding="0" cellspacing="0" width="99%; margin: 0px;">
            <tr>
                <td align="center" style="margin: 0px; padding: 2px;">
                    <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ Resources: SubscriberManagement, NotesHeaderText %>" />
                </td>
                <td align="right" style="margin: 0px; padding: 2px;">
                    <asp:ImageButton ID="imgArchiveNote" runat="server" CausesValidation="false" CssClass="modalClose" Height="18px"
                        ImageUrl="~/images/closeButton.png" ToolTip="<%$ Resources: Default, ToolTipClose %>" Width="18px" />
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="pnlNoteArchiveBody" runat="server" CssClass="modalContent">
        <div ID="divNotes" runat="server" style="width:100%;height:375px;overflow:scroll;">
                        <uc:NoteHistory ID="ucNoteArchive" runat="server" />
           </div>         
    </asp:Panel>
        </asp:Panel>

        <asp:Button runat="server" EnableViewState="false" ID="hiddenTargetControlForModalPopup"
        Style="display: none" />
    <eSecuritelHITSControls:HITSModalPopupExtender runat="server" ID="modalPopupWindow" TargetControlID="hiddenTargetControlForModalPopup"
        PopupControlID="pnlNoteArchive" BackgroundCssClass="modalBackground" BehaviorID="DisplayMessage"
         PopupDragHandleControlID="pnlNoteArchiveHeader" CancelControlID="imgArchiveNote" />
    <script language="javascript" type="text/javascript" >
        function disablePreviousStep() {
            var previous = document.getElementById('ctl00_eContent_ctl03_m_btnPreviousStep');
            if (previous != null) {
                previous.disabled = 'true';
            }
        }

        function disableButton() {
            disablePreviousStep();
            setTimeout('showProgressBar()', 1500);
        }

        function showProgressBar() {

            var button = document.getElementById('ctl00_eContent_PaymentButton');
            var validationSummary = document.getElementById('ctl00_m_extValidationSummary');
            var divProgressBar = document.getElementById('divProgressBar');

            if (validationSummary != null && validationSummary.childElementCount == 0) {
                if (divProgressBar != null) {
                    divProgressBar.style.display = 'inline';
                    setTimeout('document.images["imgProgressBar"].src = "../../../../../images/preloader4.gif"', 300);
                    button.disabled = 'true';
                }
            }
        }
    </script>
</asp:Content>
