<%@ Page Language="C#" MasterPageFile="~/masterpages/eDashboard.master" MaintainScrollPositionOnPostback="true"
    AutoEventWireup="true" EnableEventValidation="false" EnableViewStateMac="false" Inherits="site_HITS_LossAffidavit_Default"
    Title="Brightstar Device Protection: Claim Master" Theme="eMain"   
      CodeBehind="Default.aspx.cs" %>

<%@ Register Src="~/Controls/PhoneNumber.ascx" TagName="PhoneNumber" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/ScriptingHelper.ascx" TagName="ScriptingHelper" TagPrefix="uc" %>
<%@ Register Src="~/Controls/HITSCalendar.ascx" TagName="HITSCalendar" TagPrefix="uc" %>
<%@ Register Src="~/Controls/DefaultHeader.ascx" TagName="DefaultHeader" TagPrefix="uc" %>
<%@ Register Src="~/Controls/CustomSorter.ascx" TagName="CustomSorter" TagPrefix="uc" %>
<%@ Register Src="~/Controls/Claims/ReshipHelperDialogue.ascx" TagPrefix="uc" TagName="ReshipHelperDialogue" %>
<%@ Register Src="~/Controls/PopupWindow.ascx" TagName="CricketMWRejectPopupWindow" TagPrefix="uc" %>
<%@ Register Assembly="eSecuritel.HITS.UI.Components" Namespace="eSecuritel.HITS.UI.Components"
    TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="eContent" runat="Server">

     <script language="javascript" type="text/javascript">
         
         function disableSearch() {
                    
             var isValid = true;
         
             if (typeof (Page_ClientValidate) == 'function') {
                 isValid = Page_ClientValidate();
             }
             if (isValid) {
                 this.disabled = true;
                 resetStatusText();
             }
             return isValid;
         }

         function isIE() {
             var ie = (navigator.userAgent.indexOf("MSIE") != -1);
             return ie;
         }
         function resetStatusText() {
             var hdnLabelSearching = document.all('ctl00_eContent_hdnLabelSearching');
             if (isIE()) {
                 var a = document.getElementById("ctl00_eContent_m_lblSuccessMessage");
                 if (a != null) {
                     a.innerHTML = hdnLabelSearching.value; 
                     a.className = "successmessage";
                 }
             }
             else {
                 var b = document.all('ctl00_eContent_m_lblSuccessMessage');
                 if (b != null) {
                     b.innerHTML = hdnLabelSearching.value; 
                     b.className = "successmessage";
                 }
             }
         }

    </script>
    <asp:HiddenField runat="server" ID="hdnLabelSearching" Value="<%$ Resources: Default, LabelSearching %>" />
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/script/eSetFormControls.js" />
            <asp:ScriptReference Path="~/script/eGridHelper.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
   
    <uc:ScriptingHelper ID="ScriptingHelper1" runat="server" />

    
    <table width="100%">
        <tr>
            <td>
                <h1>
                    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources: ClaimsManagement, ClaimsLabel %>" />
                </h1>
            </td>
        </tr>
    </table>
    <uc:DefaultHeader ID="DefaultHeader1" runat="server" />
    <div class="mastersearch">
        <table cellspacing="0" cellpadding="0">
            <tr>
                <td style="padding-right: 0px">
                    <img src="../../../images/Collapse_13x13.jpg" class="showstate" onclick="expandMasterSearch(this, 'm_pnlMasterSearchCriteria')"
                        alt="contract" />
                </td>
                <td width="100%">
                    <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources: Default, LabelSearchCriteria %>" />
                </td>
            </tr>
        </table>
    </div>
    <asp:UpdatePanel runat="server" ID="update" UpdateMode="Conditional">
        <Triggers>
            <asp:PostBackTrigger ControlID="m_btnSetFilter"  /> 
        </Triggers>
        <ContentTemplate>
            <div id="m_pnlMasterSearchCriteria" style="background-color: #DBDCDE"><br />
                <table border="0" cellpadding="0" cellspacing="0" class="gvTable">
                    <tr>
                        <td align="right" style="width: 150px;">
                            <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources: ClaimsManagement, LabelClaimIDColon %>" />
                        </td>
                        <td align="left">
                            <asp:TextBox ID="m_txtClaimID" runat="server" style="width: 148px;"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Literal ID="Literal6" runat="server" 
                                Text="<%$ Resources : HandsetManagement, LabelMDNColon %>" />
                        </td>
                        <td align="left">
                            <uc1:PhoneNumber ID="m_ucMDN" runat="server" Required="false" style="width: 148px;" />
                        </td>
                    </tr>
                </table>
                <table border="0" cellpadding="0" cellspacing="0" class="gvTable">
                    <tr>
                        <td align="right" style="width: 150px">
                            <asp:Literal ID="Literal12" runat="server" Text="<%$ Resources: Default, LabelRecordsPerPageColon %>" />
                        </td>
                        <td>
                            <asp:DropDownList ID="m_ddlPageSize" runat="server" >
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </div>
                        
           
        </ContentTemplate>

    </asp:UpdatePanel>
    <br /> 
    <div style="text-align: center">
        <asp:Button ID="m_btnSetFilter" runat="server" Text="<%$ Resources: Default, ButtonSearch %>"  OnClick="m_btnSetFilter_Click"
            OnClientClick="this.disabled = disableSearch()" UseSubmitBehavior="false" 
            CssClass="pagebutton"/>
        <input id="m_btnClear" type="button" runat="server" value="<%$ Resources: Default, ButtonClear %>" class="pagebutton" />
    </div>

    <br />
    <asp:Label ID="m_lblSuccessMessage" runat="server" Visible="True" CssClass="successmessage"/><br />
    <asp:Panel ID="m_pnlClaimsGrid" Visible="False" runat="server">
        <h3>
            <asp:Literal ID="Literal23" runat="server" Text="<%$ Resources: ClaimsManagement, ResultsLabel %>" />
        </h3>
        <uc:ReshipHelperDialogue ID="ucReshipHelperDialogue" runat="server" OnClaimReshiped="ucReshipHelperDialogue_ClaimReshiped" UpdateMode="Conditional"
            OnClaimReshipCancelled="ucReshipHelperDialogue_ClaimReshipCancelled" />
        <div style="width: 100%; overflow: scroll">
        <cc1:HitsSearchGridView ID="m_gvClaims" runat="server" AutoGenerateColumns="False" DataSourceID="odsClaimsDataSource" ScrollBars="Horizontal"
            AllowPaging="True" OnRowDataBound="m_gvClaims_RowDataBound" OnPageIndexChanged="m_gvClaims_PageIndexChanged"
            OnPageIndexChanging="m_gvClaims_PageIndexChanging" OnMenuItemCommand="m_gvClaims_OnMenuItemCommand"
            ShowMenu="True" ShowSelectField="True" ShowSetStatus="True" ShowExportCSVWithSummary="True"
            ShowExportXMLWithSummary="True" ShowActivateMenu="False" ShowDeActivateMenu="False"
            ShowEmailMenu="False" ShowHotlineMenu="False" ShowDeHotlineMenu="False" CustomPagerID="HitsPager1"
            ClientFunctionPrint="window.print();" OnCustomPageIndexChanged="m_gvClaims_PageIndexChanged"
            OnCustomPageIndexChanging="m_gvClaims_PageIndexChanging" AtlasScriptManagerID=""
            ClientFunctionActivateSelected="" ClientFunctionDeActivateSelected="" ClientFunctionDeHotline=""
            ClientFunctionDelete="" ClientFunctionEmailSelected="" ClientFunctionExportSelected=""
            ClientFunctionHotline="" ClientFunctionSetStatus="" 
            CssClassCustomPaging="" CssClassMenu="" PropagateActionToChildID="" ShowDeleteMenu="True"
            ShowDeSelectMenu="True" ShowExportCSV="True" ShowExportMenu="True" ShowExportXML="True"
            ShowPrintMenu="True" ShowSelectMenu="True" ShowUnfulfill="True" ShowReship="True"
            Width="80%" AllowToExportAll="False" ClientFunctionDeSelectAllClicked="" 
            ClientFunctionExecute="" ClientFunctionGenerateSelected="" ClientFunctionNew="" 
            ClientFunctionReshipReplacement="" ClientFunctionSelectAllClicked="" 
            ClientFunctionUnfulfill="" ClientFunctionValidate="" ShowExecuteMenu="False" 
            ShowExportXLS="True" ShowGenerate="False" ShowNewMenu="False" 
            ShowSelectMenuChk="False" ShowValidateMenu="False" 
            ShowVerifyModelMapMenu="False">  
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal24" Text="<%$ Resources: ClaimsManagement, ColumnHeaderClaimID %>"></asp:Literal>
                        <br />
                        <uc:CustomSorter runat="server" ID="m_csClaimId" SortExpression="ClaimId" OnSortAscendingClicked="customSorter_SortClicked"
                            OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lblIsCallRecording" />
                        <asp:LinkButton runat="server" ID="m_lbtnClaimId" OnClick="m_lbtnClaimId_Click"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal50" Text="<%$ Resources: ClaimsManagement, HeaderTextClaimDate %>"></asp:Literal>
                        <br />
                          <uc:CustomSorter runat="server" ID="m_csClaimDate" SortExpression="ClaimDate" OnSortAscendingClicked="customSorter_SortClicked"
                            OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lblClaimDate"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal51" Text="<%$ Resources: ClaimsManagement, NameHeaderText %>"></asp:Literal>
                        <br />
                        
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="m_lbtnSubscriberName"
                            OnClick="m_lbtnSubscriberName_Click"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal52" Text="MDN"></asp:Literal>
                        <br />
                       
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Literal ID="ltlSubscriberId" runat="server" Visible="false"></asp:Literal>
                        <asp:LinkButton runat="server" ID="m_lbtnMDN"
                            OnClick="m_lbtnMDN_Click"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal53" Text="<%$ Resources: ClaimsManagement, ClaimTypeHeaderText %>"></asp:Literal>
                        <br />
                        
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lblClaimType"></asp:Label><br /><asp:ImageButton ID="imgBatteryReplacement" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/images/battery_duracell_16x16.png" AlternateText="Battery Replacement Claim" ToolTip="Battery Replacement Claim" Visible="False" Enabled="False" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal25" Text="<%$ Resources: ClaimsManagement, ClaimsStatusHeaderText %>"></asp:Literal>
                        <br />
                       
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lblStatus"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="LitSubType" Text="<%$ Resources: ClaimsManagement, SubTypeHeaderText %>"></asp:Literal>
                        <br />
                        
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblLossSubType"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal26" Text="<%$ Resources: HandsetManagement, HeaderTextOldESN %>"></asp:Literal>
                        <br />
                        
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="m_lbtnOldESN"
                            OnClick="m_lbtnOldESN_Click"></asp:LinkButton>
                        <br />
                        <asp:Label ID="m_lblOldESNHex" runat="server" ></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal27" Text="<%$ Resources: HandsetManagement, LabelOldHandset %>"></asp:Literal>
                        <br />
                        
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="m_lbtnOldHandset"
                            OnClick="m_lbtnOldHandset_Click"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal28" Text="<%$ Resources: Default, HeaderTextLossDate %>"></asp:Literal>
                        <br />
                        
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lblLossDate"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal29" Text="<%$ Resources: ClaimsManagement, CoveredSinceHeaderText %>"></asp:Literal>
                        <br />
                        
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lblCoveredSince"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal30" Text="<%$ Resources: ClaimsManagement, TermDateHeaderText %>"></asp:Literal>
                        <br />
                       
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lblTermDate"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal31" Text="<%$ Resources: HandsetManagement, HeaderTextNewESN %>"></asp:Literal>
                        <br />
                        
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="m_lbtnNewESN"
                            OnClick="m_lbtnNewESN_Click"></asp:LinkButton>
                        <br />
                        <asp:Label ID="m_lblNewESNHex" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal32" Text="<%$ Resources: HandsetManagement, HeaderTextNewHandset %>"></asp:Literal><br />
                       
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="m_lbtnNewHandset"
                            OnClick="m_lbtnNewHandset_Click"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal33" Text="<%$ Resources: FulfillmentManagement, HeaderTextFulfilledBy %>"></asp:Literal>
                        <br />
                       
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="m_lbtnFulfilledBy"
                            OnClick="m_lbtnFulfilledBy_Click"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal34" Text="<%$ Resources: FulfillmentManagement, HeaderTextFulfilledDate %>"></asp:Literal>
                        <br />
                       
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lblFulfilledDate"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Label runat="server" Text="<%$ Resources: ClaimsManagement, ServicePlanHeaderText %>" ID="m_lblRatePlanFeaturesHeader"></asp:Label>
                        <br />
                       
                    </HeaderTemplate>
                    <HeaderStyle VerticalAlign="Top" />
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lblRatePlanFeatures"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal35" Text="<%$ Resources: FulfillmentManagement, HeaderTextFulfillmentMethod %>"></asp:Literal>
                        <br />
                       
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lbFulfillmentMethod"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal36" Text="<%$ Resources: FulfillmentManagement, HeaderTextFulfillmentMethodSubtype %>"></asp:Literal>
                        <br />
                       
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lbFulfillmentMethodSubtype"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="Literal37" Text="<%$ Resources: FulfillmentManagement, HeaderTextFulfillmentStatus %>"></asp:Literal>
                        <br />
                        
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lbFulfillmentStatus"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="LiteralCarrierName" Text="<%$ Resources: OrganizationManagement, LabelCarrier %>"></asp:Literal>
                        <br />
                       
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lbCarrierName"  ></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="LiteralClientName" Text="<%$ Resources: OrganizationManagement, LabelClient %>"></asp:Literal>
                        <br />
                        
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lbClientName"  ></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal runat="server" ID="LiteralRampStatus" Text="<%$ Resources: OrganizationManagement, LabelRampStatus %>"></asp:Literal>
                        <br />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="m_lbRampStatus"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

            </Columns>
            
            <PagerTemplate>
                <cc1:HitsPager ID="HitsPager1" runat="server" GoButtonText="<%$ Resources: Default, GoButtonText %>"/>
            </PagerTemplate>
            <PagerSettings Mode="NumericFirstLast" />
            <RowStyle HorizontalAlign="Left" />
            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" />
            <EditRowStyle HorizontalAlign="Left" VerticalAlign="Top" />
            
        </cc1:HitsSearchGridView>
            </div>
     </asp:Panel>
    <asp:Label ID="m_lblNoClaimsResultsFound" Font-Bold="True" ForeColor="Red" runat="server" Visible="False" Text="<%$ Resources: Default, LabelNoResultsFound %>"/>
    <uc:CricketMWRejectPopupWindow ID="ucCricketMWRejectPopupWindow" runat="server" OnOkPressed="ucCricketMWRejectPopupWindow_Clicked" />
    <asp:ObjectDataSource ID="odsClaimsDataSource" runat="server" SelectMethod="SelectClaims" TypeName="ClaimsDataSource" EnablePaging="True" SelectCountMethod="SelectClaimsCount" >
        <SelectParameters>
            <asp:ControlParameter ControlID="m_txtClaimID"  Name="claimId" PropertyName="Text" Type="String"/>
            <asp:ControlParameter ControlID="m_ucMDN"       Name="mdn" PropertyName="PhoneNumber" Type="String"/>
            <asp:ControlParameter ControlID="m_gvClaims"    Name="startRowIndex" DefaultValue="1"   PropertyName="PageIndex" Type="Int32" />
            <asp:Parameter DefaultValue="10"                Name="maximumRows" Type="Int32" />
            <asp:SessionParameter                           Name="claimsSortExpression" SessionField="ClaimsSortExpression" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>

   

</asp:Content>
