<%@ page Language="C#" MasterPageFile="~/masterpages/eDashboard.master" AutoEventWireup="true"
    Inherits="site_HITS_ShipFileProcessing_Default" Title="Brightstar Device Protection: Ship File Processing"
    Theme="eMain" CodeBehind="Default.aspx.cs" %>

<%@ register src="~/Controls/HITSCalendar.ascx" tagname="HITSCalendar" tagprefix="uc" %>
<%@ Register Src="~/Controls/DefaultHeader.ascx" TagName="DefaultHeader" TagPrefix="uc" %>
<%@ register tagprefix="cc1" namespace="eSecuritel.HITS.UI.Components" assembly="eSecuritel.HITS.UI.Components" %>

<asp:Content ID="cSearch" ContentPlaceHolderID="eContent" runat="Server">

    <script>

        function m_btnClear() {

            $('[id$=m_txtDate]').val('');
            $('#<%= m_txtClaimNumber.ClientID %>').val('');
            $('#<%= m_ddlException.ClientID %>').val('');
            $('#<%= m_ddlCarrier.ClientID %>').val('0');
    }

    </script>

    <style>
        .width-200 {
            width: 200px;
        }

        #searchButtons {
            padding-bottom: 10px;
            padding-left: 20px;
        }
    </style>

    <!--Begin Header-->
    <h1>
        <asp:Literal ID="m_litPageHeader" runat="server" Text="<%$ Resources : LogisticsManagement, ShipFileProcessing %>" />
    </h1>
    <uc:DefaultHeader ID="DefaultHeader1" runat="server" />
    <div class="mastersearch">
        <img src="../../../images/Collapse_13x13.jpg" class="showstate" onclick="expandMasterSearch(this, 'm_pnlMasterSearchCriteria')"
            alt="contract" />
        <asp:Literal ID="m_litSearchUsersHeader" runat="server" Text="<%$ Resources : Default,LabelSearchCriteria %>" />
    </div>
    <!--End Header-->
    
    
<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="m_litFileDate" runat="server" Text="<%$ Resources : LogisticsManagement, FileDateFrom %>" />
            </td>
            <td align="left">
                <uc:hitscalendar id="m_calFileDateFrom" DateTextBox-Width="200px" DateTextBox-CssClass="m_txtDate" runat="server"/>
            </td>
        </tr>
        <tr>
            <td align="right" style="width: 150px;">
                <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources : LogisticsManagement, FileDateTo %>" />
            </td>
            <td align="left">
                <uc:hitscalendar id="m_calFileDateTo" DateTextBox-Width="200px" DateTextBox-CssClass="m_txtDate" runat="server"/>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Literal ID="m_litClaimNumber" runat="server" Text="<%$ Resources : LogisticsManagement, LabelClaimId %>" />
            </td>
            <td align="left">
                <asp:TextBox ID="m_txtClaimNumber" CssClass="width-200" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Literal ID="m_litException" runat="server" Text="<%$ Resources : LogisticsManagement, ErrorReason %>" />
            </td>
            <td align="left">
                <asp:DropDownList ID="m_ddlException" CssClass="width-200" runat="server"></asp:DropDownList>
            </td>
        </tr> 
        <tr>
            <td align="right">
                <asp:Literal ID="m_litCarrier" runat="server" Text="<%$ Resources : Default, CarrierListItem %>" />
            </td>
            <td align="left">
                <asp:DropDownList ID="m_ddlCarrier" CssClass="width-200" runat="server"></asp:DropDownList>
            </td>
        </tr>      
    </table>
    <div id="searchButtons">
        <asp:Button ID="m_btnSetFilter" runat="server" Text="<%$ Resources : Default, ButtonSearch %>" CssClass="pagebutton"   
                        OnClick="m_btnSetFilter_Click" />
        <input id="Button1" type="button" runat="server" value="<%$ Resources : Default, ButtonClear %>" class="pagebutton" onclick="m_btnClear()" />
    </div>
</div>
 
<asp:Panel ID="m_pnlFilessGrid" runat="server">
    <h3>
        <asp:Literal ID="Literal23" runat="server" Text="<%$ Resources: ClaimsManagement, ResultsLabel %>" />
    </h3>
    <asp:Label ID="m_lblSuccessMessage" runat="server" Visible="True" CssClass="successmessage"/><br />
    <div style="width: 100%; overflow: scroll">
    <cc1:HitsSearchGridView ID="m_gvFiles" runat="server" AutoGenerateColumns="False" DataSourceID="odsFilesDataSource" ScrollBars="Horizontal"
        AllowPaging="True" OnRowDataBound="m_gvFiles_RowDataBound" OnPageIndexChanged="m_gvFiles_PageIndexChanged"
        OnPageIndexChanging="m_gvFiles_PageIndexChanging" OnMenuItemCommand="m_gvFiles_OnMenuItemCommand"
        ShowMenu="False" ShowSelectField="False" ShowSetStatus="False" ShowExportCSVWithSummary="False"
        ShowExportXMLWithSummary="False" ShowActivateMenu="False" ShowDeActivateMenu="False"
        ShowEmailMenu="False" ShowHotlineMenu="False" ShowDeHotlineMenu="False" CustomPagerID="HitsPager1"
        ClientFunctionPrint="window.print();" OnCustomPageIndexChanged="m_gvFiles_PageIndexChanged"
        OnCustomPageIndexChanging="m_gvFiles_PageIndexChanging" AtlasScriptManagerID=""
        ClientFunctionActivateSelected="" ClientFunctionDeActivateSelected="" ClientFunctionDeHotline=""
        ClientFunctionDelete="" ClientFunctionEmailSelected="" ClientFunctionExportSelected=""
        ClientFunctionHotline="" ClientFunctionSetStatus="" 
        CssClassCustomPaging="" CssClassMenu="" PropagateActionToChildID="" ShowDeleteMenu="False"
        ShowDeSelectMenu="False" ShowExportCSV="False" ShowExportMenu="False" ShowExportXML="False"
        ShowPrintMenu="False" ShowSelectMenu="False" ShowUnfulfill="False" ShowReship="False"
        Width="100%" AllowToExportAll="False" ClientFunctionDeSelectAllClicked="" 
        ClientFunctionExecute="" ClientFunctionGenerateSelected="" ClientFunctionNew="" 
        ClientFunctionReshipReplacement="" ClientFunctionSelectAllClicked="" 
        ClientFunctionUnfulfill="" ClientFunctionValidate="" ShowExecuteMenu="False" 
        ShowExportXLS="False" ShowGenerate="False" ShowNewMenu="False" 
        ShowSelectMenuChk="False" ShowValidateMenu="False" ShowHeaderWhenEmpty="True"
        ShowVerifyModelMapMenu="False">  
        <Columns>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litSelectShipRowHeader" Text=""></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:LinkButton runat="server" ID="m_lbSelectShipRow" Text="<%$ Resources : Default, SelectLabel %>"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litShipDateHeader" Text="<%$ Resources : LogisticsManagement, ShipDate %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litShipDate"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litErrorDescriptionHeader" Text="<%$ Resources : LogisticsManagement, ErrorReason %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litErrorDescription"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litTransactionCodeHeader" Text="<%$ Resources : LogisticsManagement, TransactionCode %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litTransactionCode"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litGridClaimNumberHeader" Text="<%$ Resources : LogisticsManagement, LabelClaimId %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litGridClaimNumber"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litOrderNumberHeader" Text="<%$ Resources : LogisticsManagement, OrderNumber %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litOrderNumber"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litShipToNameHeader" Text="<%$ Resources : LogisticsManagement, ShipToName %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litShipToName"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litShipToAddressHeader" Text="<%$ Resources : LogisticsManagement, ShipToAddress %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litShipToAddress"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litShipToCityHeader" Text="<%$ Resources : LogisticsManagement, ShipToCity %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litShipToCity"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litShipToStateHeader" Text="<%$ Resources : LogisticsManagement, ShipToState %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litShipToState"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litShipToPostalCodeHeader" Text="<%$ Resources : LogisticsManagement, ShipToPostalCode %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litShipToPostalCode"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litIMEIHeader" Text="<%$ Resources : LogisticsManagement, IMEI %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litIMEI"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litReplacementHandsetSKUHeader" Text="<%$ Resources : LogisticsManagement, ReplacementHandsetSKU %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litReplacementHandsetSKU"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litReplacementHandsetModelHeader" Text="<%$ Resources : LogisticsManagement, ReplacementHandsetModel %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litReplacementHandsetModel"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litOutboundTrackingNumberHeader" Text="<%$ Resources : LogisticsManagement, OutboundTrackingNumber %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litOutboundTrackingNumber"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litReturnTrackingNumberHeader" Text="<%$ Resources : LogisticsManagement, ReturnTrackingNumber %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litReturnTrackingNumber"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litPONumberHeader" Text="<%$ Resources : LogisticsManagement, PONumber %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litPONumber"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litSIMCardHeader" Text="<%$ Resources : LogisticsManagement, SIMCard %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litSIMCard"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litTransactionLocationHeader" Text="<%$ Resources : LogisticsManagement, TransactionLocation %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litTransactionLocation"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litInventoryOwnerHeader" Text="<%$ Resources : LogisticsManagement, InventoryOwner %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litInventoryOwner"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litShipmentMethodHeader" Text="<%$ Resources : LogisticsManagement, ShipmentMethod %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litShipmentMethod"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>            
            <asp:TemplateField Visible="False">
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litReplacementHandsetCostHeader" Text="<%$ Resources : LogisticsManagement, ReplacementHandsetCost %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litReplacementHandsetCost"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litReplacementHandsetConditionHeader" Text="<%$ Resources : LogisticsManagement, ReplacementHandsetCondition %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litReplacementHandsetCondition"></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <HeaderTemplate>
                    <asp:Literal runat="server" ID="m_litReplacementClientSKUHeader" Text="<%$ Resources : LogisticsManagement, ReplacementClientSKU %>"></asp:Literal>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" ID="m_litReplacementClientSKU"></asp:Literal>
                </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:ObjectDataSource ID="odsFilesDataSource" runat="server" SelectMethod="SelectFiles" TypeName="ImportedFilesDataSource" EnablePaging="False" >
    <SelectParameters>
        <asp:ControlParameter ControlID="m_calFileDateFrom"  Name="fileDateFrom" PropertyName="SelectedDate" Type="DateTime"/>
        <asp:ControlParameter ControlID="m_calFileDateTo"  Name="fileDateTo" PropertyName="SelectedDate" Type="DateTime"/>
        <asp:ControlParameter ControlID="m_txtClaimNumber"       Name="claimNumber" PropertyName="Text" Type="String"/>
        <asp:ControlParameter ControlID="m_ddlException"       Name="errorReasonCode" PropertyName="Text" Type="String"/>
        <asp:ControlParameter ControlID="m_ddlCarrier"       Name="carrierId" PropertyName="SelectedValue" Type="Int32"/>
        <asp:ControlParameter ControlID="m_gvFiles"    Name="startRowIndex" DefaultValue="1"   PropertyName="PageIndex" Type="Int32" />
        <asp:Parameter DefaultValue="10"                Name="maximumRows" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>
    

</asp:content>
