<%@ Page Language="C#" MasterPageFile="~/masterpages/eDashboard.master" AutoEventWireup="true" Inherits="site_HITS_ReturnAuthorizations_Default" Title="Brightstar Device Protection: Return Authorizations Master" 
    Theme ="eMain" Culture="auto" UICulture="auto" Codebehind="Default.aspx.cs" %>
    
<%@ 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 Assembly="eSecuritel.HITS.UI.Components" Namespace="eSecuritel.HITS.UI.Components" TagPrefix="cc1" %>   
<asp:Content ID="Content1" ContentPlaceHolderID="eContent" Runat="Server">
 
    <script src="../../../script/eSetFormControls.js" type="text/javascript"></script>
    <script src="../../../script/eGridHelper.js" type="text/javascript"></script>
 
    <uc:ScriptingHelper ID="ScriptingHelper1" runat="server" />
    <!-------------------------------Page Heading---------------------------------------->
    <h1>
        <asp:Literal ID="m_litPageHeader" runat="server" Text="<%$ Resources: LogisticsManagement, LabelReturnAuthorizations %>" />
    </h1>
    <!-------------------------------HEADER UC---------------------------------------->
    <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_litSearch" runat = "server" Text = "<%$ Resources: Default, LabelSearchCriteria %>" />
    </div>
 
<!-----------------------------------TABLE 1----------------------------------------->
   
  <div id="m_pnlMasterSearchCriteria" style="background-color: #DBDCDE">
    <table border="0" cellpadding="0" cellspacing="0" class="gvTable" >
        <tr>
            <td align="right">
                <asp:Literal ID="m_litReturnNumberHeader" runat="server" Text="<%$ Resources: LogisticsManagement, LabelRANumberColon %>" />
            </td>
            <td align="left" style="width:200px">
                <asp:TextBox ID="m_tbRANumber" runat="server" Width="200px" />
               <SmartAjaxToolkit:SmartAutoCompleteExtender ID="SmartAutoCompleteExtender1" runat="server"
                        OnAutoCompleteCallback="SearchRANumbers" TargetControlID="m_tbRANumber"
                        UpdateMode="Callback" EnableCaching="false" MinimumPrefixLength="2" /> 
            </td>
            <td align="right">
                <asp:Literal ID="m_litCarriersHeader" runat="server" Text="<%$ Resources: OrganizationManagement, LabelClientColon %>" />
            </td>
            <td align="left" >
                <asp:DropDownList ID="m_ddlCarriers" runat="server" Width="212px" />
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Literal ID="m_litDateFromHeader" runat="server" Text="<%$ Resources: Default, DateFromLabel %>" />
            </td>
            <td align="left" style="width:200px">
             <asp:UpdatePanel runat="server" ID="update" UpdateMode="Conditional">
                <contenttemplate>
                    <uc:HITSCalendar ID="m_calDateFrom" runat="server" DateTextBox-Width="200px"/>
                 </contenttemplate>
             </asp:UpdatePanel>
            </td>
            <td align="right">
                <asp:Literal ID="m_litStatusHeader" runat="server" Text="<%$ Resources: LogisticsManagement, LabelRAStatusColon %>" />
            </td>
            <td align="left" >
                <asp:DropDownList ID="m_ddlStatus" runat="server" Width="212px" />
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Literal ID="m_litDateToHeader" runat="server" Text="<%$ Resources: Default, DateToLabel %>" />
            </td>
            <td align="left" >
             <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
                <contenttemplate>
                    <uc:HITSCalendar ID="m_calDateTo" runat="server" DateTextBox-Width="200px" />
                 </contenttemplate>
             </asp:UpdatePanel>
            </td>
                 <td align="right">
                    <asp:Literal ID="m_litReturnType" runat="server" Text="<%$ Resources: LogisticsManagement, LabelReturnTypeColon %>" />
                </td>
            <td align="left">
                    <asp:DropDownList ID="m_ddlRAType" runat="server" style="width: 212px">
                </asp:DropDownList>
                </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Literal ID="Literal12" runat="server" Text="<%$ Resources: Default, LabelRecordsPerPageColon %>" />
            </td>
            <td align="left" >
                <asp:DropDownList ID="m_ddlPageSize" runat="server">
                </asp:DropDownList>
            </td>
             <td></td>
            <td></td>
        </tr>
    </table>
  </div>
 
    <!----------------------------------------------------Buttons----------------------------------------------------->
    <div align="center">
        <asp:Button ID="m_btnSetFilter" runat="server" Text="<%$ Resources: Default, ButtonSearch %>" CssClass="pagebutton"
            Font-Bold="False" OnClick="m_btnSetFilter_Click" />
        <input id="m_btnClear" type="button" runat="server" value="<%$ Resources: Default, ButtonClear %>" class="pagebutton" />
    </div>
    <!----------------------------------Search Results--------------------------------------------------------->
    <asp:Panel ID="m_pnlSearchResults" runat="server">
        <h2>
            <asp:Literal ID="Literal20" runat="server" Text="<%$ Resources: Default, LabelSearchResults %>" />
            <asp:Label ID="lblSuccess" runat="server" Text="" CssClass="successmessage"></asp:Label>
        </h2>
    </asp:Panel>
    

    <asp:Panel ID="m_pnlGrid" Visible="False" runat="server">
       
        <!----------------------------------Results Grid--------------------------------------------------------->
        <h3>
            <asp:Literal ID="m_litResultsHeader" runat="server" Text="<%$ Resources: Default, ResultsLabel %>" />
        </h3>
        <cc1:HitsSearchGridView ID="m_gvResults" runat="server" AutoGenerateColumns="False"
            AllowPaging="True" OnRowDataBound="m_gvResults_RowDataBound" OnPageIndexChanged="m_gvResults_PageIndexChanged"
            OnPageIndexChanging="m_gvResults_PageIndexChanging" ShowMenu="True" ShowSelectField="True" ShowSetStatus="False" 
            OnMenuItemCommand="m_gvResults_OnMenuItemCommand"  
            ShowExportCSVWithSummary="False" ShowExportXMLWithSummary="False" ShowActivateMenu="False" ShowDeActivateMenu="False"
            ShowEmailMenu="False" ShowHotlineMenu="False" ShowDeHotlineMenu="False" CustomPagerID="HitsPager1"
            ClientFunctionPrint="window.print();" OnCustomPageIndexChanged="m_gvResults_PageIndexChanged"
            OnCustomPageIndexChanging="m_gvResults_PageIndexChanging" AtlasScriptManagerID="" 
            ClientFunctionActivateSelected="" ClientFunctionDeActivateSelected="" ClientFunctionDeHotline="" 
            ClientFunctionDelete="" ClientFunctionEmailSelected="" ClientFunctionExportSelected="" ClientFunctionHotline="" 
            ClientFunctionSetStatus="" CssClassCustomPaging="" CssClassMenu=""  
            PropagateActionToChildID="" ShowDeleteMenu="False" ShowDeSelectMenu="True" ShowExportXLS = "false" ShowExportCSV="True" 
            ShowExportMenu="True" ShowExportXML="True" ShowPrintMenu="True" ShowSelectMenu="True" Width="100%">
            <Columns>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="m_litIdHeader" Text="<%$ Resources: LogisticsManagement, HeaderTextRdotAdotId %>"></asp:Literal>
                        <br />
                        <uc:CustomSorter runat="server" ID="m_csReturnAuthorizationId" SortExpression="RETURN_AUTHORIZATION_ID" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </headertemplate>
                    
                    <itemtemplate>
                            <asp:HyperLink runat="server" ID="m_linkDetails" ToolTip="<%$ Resources: LogisticsManagement, HyperLinkGetReturnAuthorizationDetails %>" ></asp:HyperLink>
                            <asp:HiddenField ID="m_hfId" runat="server"></asp:HiddenField>
                    </itemtemplate>
                </asp:TemplateField>
                
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="m_litCarrier" Text="<%$ Resources: OrganizationManagement, HeaderTextClient %>"></asp:Literal>
                        <br /><uc:CustomSorter runat="server" ID="m_csCarrier" SortExpression="CARRIER_NAME" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </headertemplate>
                    <itemstyle  />
                    <itemtemplate>
                     <div style="overflow:hidden;">
                        <asp:HyperLink runat="server" ID="m_linkCarrier"></asp:HyperLink>
                     </div>
                    </itemtemplate>
                </asp:TemplateField>
                
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="m_litRANumberHeader" Text="<%$ Resources: LogisticsManagement, HeaderTextRANumber %>"></asp:Literal>
                        <br /><uc:CustomSorter runat="server" ID="m_csRANumber" SortExpression="RA_NUMBER" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    
                    </headertemplate>
                    <itemstyle  />
                    <itemtemplate>
                     <div style="overflow:hidden;">
                        <asp:Label runat="server" ID="m_lblRANumber"></asp:Label>
                     </div>
                    
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="m_litQtyHeader" Text="<%$ Resources: BillingManagement, LabelQty %>" ></asp:Literal>
                        <br /><uc:CustomSorter runat="server" ID="m_csQty" SortExpression="QTY" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    
                    </headertemplate>
                    <itemstyle width="3%" />
                    <itemtemplate>
                        <asp:Literal runat="server" ID="m_litQty"></asp:Literal>
                    
                    </itemtemplate>
                </asp:TemplateField> 
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="m_litRATypeHeader" Text="<%$ Resources: LogisticsManagement, HeaderTextReturnType %>"></asp:Literal>
                        <br /><uc:CustomSorter runat="server" ID="m_csRAType" SortExpression="RA_TYPE" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    
                    </headertemplate>
                    <itemstyle  />
                    <itemtemplate>
                        <asp:Literal runat="server" ID="m_litRAType"></asp:Literal>
                    
                    </itemtemplate>
                </asp:TemplateField> 
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="m_litStatusGridHeader" Text="<%$ Resources: LogisticsManagement, HeaderTextRAStatus %>"></asp:Literal>
                        <br /><uc:CustomSorter runat="server" ID="m_csStatus" SortExpression="STATUS" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    
                    </headertemplate>
                    <itemstyle  />
                    <itemtemplate>
                        <asp:Literal runat="server" ID="m_litStatus"></asp:Literal>
                    
                    </itemtemplate>
                </asp:TemplateField> 
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="m_litCreatedHeader" Text="<%$ Resources: UsersManagement, HeaderTextCreatedBy %>"></asp:Literal>
                        <br /><uc:CustomSorter runat="server" ID="m_csCreated" SortExpression="CREATED_BY" OnSortDescendingClicked="customSorter_SortClicked" OnSortAscendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    
                    </headertemplate>
                    <itemstyle />
                    <itemtemplate>
                        <asp:HyperLink runat="server" ID="m_hlCreated"></asp:HyperLink>
                    
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="m_litCreatedOnHeader" Text="<%$ Resources: UsersManagement, HeaderTextCreatedOn %>"></asp:Literal>
                        <br /><uc:CustomSorter runat="server" ID="m_csCreatedOn" SortExpression="CREATED_ON" OnSortDescendingClicked="customSorter_SortClicked" OnSortAscendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    
                    </headertemplate>
                    <itemstyle  />
                    <itemtemplate>
                        <asp:Literal runat="server" ID="m_litCreatedOn"></asp:Literal>
                    
                    </itemtemplate>
                </asp:TemplateField> 
            </Columns>
            <PagerTemplate>
                <cc1:HitsPager ID="HitsPager1" runat="server" GoButtonText="<%$ Resources: Default, GoButtonText %>" />
            </PagerTemplate>
            <RowStyle HorizontalAlign="Left" VerticalAlign="Top" BorderColor="#E0E0E0" BorderWidth="3px" />
            <EditRowStyle HorizontalAlign="Left" VerticalAlign="Top" />
            <HeaderStyle BorderColor="#404040" BorderWidth="2px" />
        </cc1:HitsSearchGridView>
    </asp:Panel>
    <asp:Label ID="m_lblNoFound" Font-Bold="True" ForeColor="Red" runat="server"
        Visible="False" Text="<%$ Resources: Default, LabelNoResultsFound %>"  />
    
    
     <!-----------------------------------------------Data Source----------------------------------------->
    <asp:ObjectDataSource ID="m_objDataSource" runat="server" SelectMethod="Select"
        TypeName="ReturnAuthorizationDataSource" EnablePaging="True" SelectCountMethod="SelectCount">
        <SelectParameters>
            <asp:SessionParameter Name="objSearchCriteria" SessionField="RASearchCriteria_SessionKey" Type="Object" />
            <asp:ControlParameter ControlID="m_gvResults" DefaultValue="1" Name="startRowIndex"
                PropertyName="PageIndex" Type="Int32" />
            <asp:Parameter DefaultValue="10" Name="maximumRows" Type="Int32" />
            <asp:SessionParameter Name="strSortExpression" SessionField="RASortExpression_SessionKey"
                Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <!--------------------------------------------------------------------------------------------------------->

</asp:Content>
