<%@ Page Language="C#" MasterPageFile="~/masterpages/eDashboard.master" AutoEventWireup="true" Inherits="site_HITS_Loader_Default" Title="Brightstar Device Protection: Loader Master"
    Theme="eMain" Culture="auto" UICulture="auto" Codebehind="Default.aspx.cs" %>

<%@ Register Src="~/Controls/PhoneNumber.ascx" TagName="PhoneNumber" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/PersistNav.ascx" TagName="PersistNav" TagPrefix="uc" %>
<%@ 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" />
    <table width="100%">
        <tr>
            <td>
                <h1>
                    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources: AdministrationManagement, LabelLoader %>" />
                </h1>
            </td>
            <td align=right >
                <span class='failuremessage'>
                     <asp:Label ID="m_lblLoaderProcessState" runat="server" Text="" />
                </span>    
                <%--<uc:PersistNav ID="m_persistNav" runat="server" />--%>
            </td>
        </tr>
    </table>
    <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="Literal2" runat="server" Text="<%$ Resources: Default, LabelSearchCriteria %>" />
    </div>
    <asp:UpdatePanel runat="server" ID="update" UpdateMode="Conditional">
        <ContentTemplate>
<DIV style="BACKGROUND-COLOR: #DBDCDE" id="m_pnlMasterSearchCriteria"><TABLE class="gvTable" cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD style="WIDTH: 150px" align=right><asp:Literal id="Literal3" runat="server" Text="<%$ Resources: AdministrationManagement, LabelFileName %>"></asp:Literal> </TD><TD align=left><asp:TextBox id="m_txtFileName" runat="server"></asp:TextBox> </TD>
    <TD align=right><asp:Literal id="Literal4" runat="server" Text="<%$ Resources: OrganizationManagement, LabelClientColon %>"></asp:Literal> </TD>
    <TD align=left><asp:DropDownList id="m_ddlCarriers" runat="server">
                            </asp:DropDownList> </TD></TR><TR><TD align=right><asp:Literal id="Literal5" runat="server" Text="<%$ Resources: AdministrationManagement, LabelLoaderMIN %>"></asp:Literal> </TD><TD><uc1:PhoneNumber id="m_ucMIN" runat="server" Required="false"></uc1:PhoneNumber> &nbsp; </TD><TD align=right><asp:Literal id="Literal6" runat="server" Text="<%$ Resources: HandsetManagement, LabelMDNColon %>"></asp:Literal> </TD><TD><uc1:PhoneNumber id="m_ucMDN" runat="server" Required="false"></uc1:PhoneNumber> &nbsp; </TD></TR><TR><TD align=right><asp:Literal id="Literal7" runat="server" Text="<%$ Resources: Default, DateFromLabel %>"></asp:Literal> </TD><TD><uc:HITSCalendar id="m_calDateFrom" runat="server" ValidationName="Date From"></uc:HITSCalendar> </TD><TD align=right><asp:Literal id="Literal8" runat="server" Text="<%$ Resources: Default, DateToLabel %>"></asp:Literal> </TD><TD><uc:HITSCalendar id="m_calDateTo" runat="server" ValidationName="Date To"></uc:HITSCalendar> </TD></TR></TBODY></TABLE><TABLE class="gvTable" cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD noWrap align=right><asp:Literal id="Literal11" runat="server" Text="<%$ Resources: AdministrationManagement, LabelSource %>"></asp:Literal> </TD><TD noWrap><asp:CheckBox id="m_chbFile" runat="server" Text="<%$ Resources: AdministrationManagement, ChkBoxFile %>" OnSelectedIndexChanged="m_chkBoxlstSource_SelectedIndexChanged" AutoPostBack="True" TextAlign="Left"></asp:CheckBox> <asp:CheckBox id="m_chbWebService" runat="server" Text="<%$ Resources: AdministrationManagement, ChkBoxWebService %>" OnSelectedIndexChanged="m_chkBoxlstSource_SelectedIndexChanged" AutoPostBack="True" TextAlign="Left"></asp:CheckBox> <%-- <asp:CheckBoxList ID="m_chkBoxlstSource" runat="server"
                                RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="m_chkBoxlstSource_SelectedIndexChanged">
                            </asp:CheckBoxList></td>--%></TD></TR><TR><TD noWrap align=right><asp:Literal id="Literal10" runat="server" Text="<%$ Resources: AdministrationManagement, LabelExecutedStatus %>"></asp:Literal> </TD><TD noWrap><asp:CheckBox id="m_chbExecuted" runat="server" Text="<%$ Resources: AdministrationManagement, ChkBoxExecuted %>" OnSelectedIndexChanged="m_chkBoxlstExecutedStatus_SelectedIndexChanged" AutoPostBack="True" TextAlign="Left"></asp:CheckBox> <asp:CheckBox id="m_chbNonExecuted" runat="server" Text="<%$ Resources: AdministrationManagement, ChkBoxNonExecuted %>" OnSelectedIndexChanged="m_chkBoxlstExecutedStatus_SelectedIndexChanged" AutoPostBack="True" TextAlign="Left"></asp:CheckBox> <%--<asp:CheckBox ID="m_chbAll" runat="server"  TextAlign="Left" Text="Both" AutoPostBack="True" OnSelectedIndexChanged="m_chkBoxlstExecutedStatus_SelectedIndexChanged"/>                               --%><%--<asp:CheckBoxList ID="m_chkBoxlstExecutedStatus" runat="server" 
                                RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="m_chkBoxlstExecutedStatus_SelectedIndexChanged">
                            </asp:CheckBoxList>--%></TD></TR><TR><TD style="HEIGHT: 25px" noWrap align=right><asp:Literal id="Literal12" runat="server" Text="<%$ Resources: Default, RecordsperpageLabel %>"></asp:Literal> </TD><TD style="HEIGHT: 25px"><asp:DropDownList id="m_ddlPageSize" runat="server">
                            </asp:DropDownList> </TD></TR></TBODY></TABLE></DIV>
</ContentTemplate>
    </asp:UpdatePanel>
    <div class="subpanelheader hr">
        <img id="m_imgSearchCriteria" runat="server" src="../../../images/Collapse_13x13.jpg" class="showstate"
            onclick="expandMasterSearch(this, 'm_pnlAdditionalCriteria')" alt="contract" />
        <asp:Literal ID="m_litAdditionalSearchCriteriaHeader" runat="server" Text="<%$ Resources: Default, AdditionalSearchCriteriaLabel %>"
            /></div>
    <div id="m_pnlAdditionalCriteria" style="<%=AdditionalCriteriaStyle %>">
        <div class="mastersubpanelAddition">
            <table border="0" cellpadding="0" cellspacing="0" class="gvTable">
                <tr>
                    <td align="right">
                        <asp:Literal ID="Literal13" runat="server" Text="<%$ Resources: AdministrationManagement, LabelTotalRecords %>" />
                    </td>
                    <td>
                        <asp:TextBox ID="m_txtTotalRecords" runat="server"></asp:TextBox>
                    </td>
                    <td align="right">
                        <asp:Literal ID="Literal14" runat="server" Text="<%$ Resources: AdministrationManagement, LabelTotalNewRecords %>" />
                    </td>
                    <td>
                        <asp:TextBox ID="m_txtTotalNewRecords" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Literal ID="Literal15" runat="server" Text="<%$ Resources: AdministrationManagement, LabelMissingRequiredFields %>" />
                    </td>
                    <td>
                        <asp:TextBox ID="m_txtMissingRequiredFields" runat="server"></asp:TextBox>
                    </td>
                    <td align="right">
                        <asp:Literal ID="Literal16" runat="server" Text="<%$ Resources: AdministrationManagement, LabelTotalDeactivatedRecords %>" />
                    </td>
                    <td>
                        <asp:TextBox ID="m_txtTotalDeactivatedRecords" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Literal ID="Literal17" runat="server" Text="<%$ Resources: AdministrationManagement, LabelMissingModelDefs %>" />
                    </td>
                    <td>
                        <asp:TextBox ID="m_txtMissingModelDefs" runat="server"></asp:TextBox>
                    </td>
                    <td align="right">
                        <asp:Literal ID="Literal18" runat="server" Text="<%$ Resources: AdministrationManagement, LabelTotalChangeRecords %>" />
                    </td>
                    <td>
                        <asp:TextBox ID="m_txtTotalChangeRecords" runat="server"></asp:TextBox>
                    </td>
                </tr>        
            </table>
        </div>
    </div>
    <div style="padding-left: 275px">
        <asp:Button ID="m_btnSetFilter" runat="server" Text="<%$ Resources: Default, ButtonSearch %>" CssClass="pagebutton"
            OnClick="m_btnSetFilter_Click" />
        <input id="m_btnClear" type="button" runat="server" value="<%$ Resources: Default, ButtonClear %>" class="pagebutton" />
    </div>
    <asp:Panel ID="m_pnlSearchResults" runat="server">
        <h2>
            <asp:Literal ID="Literal20" runat="server" Text="<%$ Resources: Default, LabelSearchResults %>" />
            <asp:Label ID="m_lblSuccessMessage" runat="server"  CssClass="successmessage" /></h2>   
    <asp:Label ID="m_lblNoLoaderResultsFound" Font-Bold="True" ForeColor="Red" runat="server"
        Visible="False" Text="<%$ Resources: Default, LabelNoResultsFound %>" />
    </asp:Panel>
    <asp:Panel ID="m_pnlLoaderGrid" Visible="False" runat="server">    
         <h3>
            <asp:Literal ID="Literal23" runat="server" Text="<%$ Resources: Default, ResultsLabel %>" />
        </h3>
        <cc1:HitsSearchGridView  ID="m_gvLoader" runat="server" AutoGenerateColumns="False"
            AllowPaging="True" OnRowDataBound="m_gvLoader_RowDataBound" OnPageIndexChanged="m_gvLoader_PageIndexChanged"
            OnPageIndexChanging="m_gvLoader_PageIndexChanging" OnMenuItemCommand="m_gvLoader_OnMenuItemCommand"
            ShowMenu="True" ShowSelectField="True" ShowSetStatus="False" ShowExportCSVWithSummary="True"
            ShowExportXMLWithSummary="True" ShowActivateMenu="False" ShowDeActivateMenu="False"
            ShowEmailMenu="False" ShowHotlineMenu="False" ShowDeHotlineMenu="False" CustomPagerID="HitsPager1"
            ClientFunctionPrint="window.print();" OnCustomPageIndexChanged="m_gvLoader_PageIndexChanged"
            OnCustomPageIndexChanging="m_gvLoader_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"  ShowValidateMenu ="True"  ShowExecuteMenu="True" Width="100%" 
            OverrideExportMessage = "<%$ Resources: AdministrationManagement, QuestionMaximumRecords5000 %>">
            <Columns>
                <asp:TemplateField>   
                        <HeaderTemplate>
                            <asp:Literal runat="server" ID="m_litDetails" Text="<%$ Resources: AdministrationManagement, HeaderTextMore3Point %>" ></asp:Literal>
                        </HeaderTemplate>                                 
                        <ItemTemplate>
                                <div style="overflow: hidden; width: 31px; height: 25px;">
                                    <asp:HyperLink runat="server" ID="m_hlDetails" ImageUrl="~/images/MoreDetails.gif"></asp:HyperLink>
                                    <asp:HiddenField runat="server" ID="m_hfLoaderId"></asp:HiddenField>
                                </div>
                        </ItemTemplate>                                    
                </asp:TemplateField>                               
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="Literal50" Text="<%$ Resources: OrganizationManagement, HeaderTextCompany %>"></asp:Literal>
                          <BR /><uc:CustomSorter runat="server" ID="m_csCompnany" SortExpression="Compnany" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                            <asp:Label runat="server" ID="m_lblCompany"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="Literal51" Text="<%$ Resources: AdministrationManagement, HeaderTextFileName %>" ></asp:Literal>
                         <BR /><uc:CustomSorter runat="server" ID="m_csFileName" SortExpression="FileName" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                        <asp:Label runat="server" ID="m_lblFileName"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="Literal52" Text="<%$ Resources: AdministrationManagement, HeaderTextDateUpload %>" ></asp:Literal>
                          <BR /><uc:CustomSorter runat="server" ID="m_csDateUpload" SortExpression="DateUpload" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                            <asp:Label runat="server" ID="m_lblDateUpload"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                          <asp:Literal runat="server" ID="Literal25" Text="<%$ Resources: AdministrationManagement, HeaderTextExecOn %>" ></asp:Literal>
                         <br />
                         <uc:CustomSorter runat="server" ID="m_csExecOn" SortExpression="ExecOn" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                            <asp:Label runat="server" ID="m_lblExecOn"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="Literal26" Text="<%$ Resources: AdministrationManagement, HeaderTextTotalRecs %>"></asp:Literal>
                        <BR /><uc:CustomSorter runat="server" ID="m_csTotalRecs" OnSortDescendingClicked="customSorter_SortClicked" OnSortAscendingClicked="customSorter_SortClicked" SortExpression="TotalRecs"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                        <asp:Label runat="server" ID="m_lblTotalRecs"></asp:Label>
                     </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="Literal27" Text="<%$ Resources: AdministrationManagement, HeaderTextMissingFields %>"></asp:Literal>
                          <BR /><uc:CustomSorter runat="server" ID="m_csMissingFields" OnSortDescendingClicked="customSorter_SortClicked" OnSortAscendingClicked="customSorter_SortClicked" SortExpression="MissingFields"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                            <asp:Label runat="server" ID="m_lblMissingFields"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="Literal28" Text="<%$ Resources: AdministrationManagement, HeaderTextModelErrors %>" ></asp:Literal>
                         <br />
                         <uc:CustomSorter runat="server" ID="m_csMissingModelDefs" SortExpression="MissingModelDefs" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                            <asp:Label runat="server" ID="m_lblMissingModelDefs"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="Literal29" Text="<%$ Resources: AdministrationManagement, HeaderTextNew %>"></asp:Literal>
                        <br />
                         <uc:CustomSorter runat="server" ID="m_csNewLoaded" SortExpression="NewLoaded" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                            <asp:Label runat="server" ID="m_lblNew"></asp:Label>
                </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="Literal30" Text="<%$ Resources: AdministrationManagement, HeaderTextDeacts %>" ></asp:Literal>
                         <br />
                         <uc:CustomSorter runat="server" ID="m_csDeacts" SortExpression="Deacts" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                            <asp:Label runat="server" ID="m_lblDeacts"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                            <asp:Literal runat="server" ID="Literal31" Text="<%$ Resources: AdministrationManagement, HeaderTextChanges %>"></asp:Literal>
                              <BR /><uc:CustomSorter runat="server" ID="m_csChanges" OnSortDescendingClicked="customSorter_SortClicked" OnSortAscendingClicked="customSorter_SortClicked" SortExpression="Changes"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                        <asp:Label runat="server" ID="m_lblChanges"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                            <asp:Literal runat="server" ID="Literal32" Text="<%$ Resources: AdministrationManagement, HeaderTextFailed %>" ></asp:Literal><br />
                              <uc:CustomSorter runat="server" ID="m_csLoaded" OnSortDescendingClicked="customSorter_SortClicked" OnSortAscendingClicked="customSorter_SortClicked" SortExpression="Failed"></uc:CustomSorter>
                    </headertemplate>
                    <itemtemplate>
                            <asp:Label runat="server" ID="m_lblLoaded"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <headertemplate>
                        <asp:Literal runat="server" ID="Literal33" Text="<%$ Resources: AdministrationManagement, HeaderTextLog %>"></asp:Literal>                                                
                    </headertemplate>
                    <itemtemplate>
                            <asp:HyperLink runat="server" ID="m_linkLog"></asp:HyperLink>
                    </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>
    </asp:Panel>    
    <asp:ObjectDataSource ID="odsLoaderDataSource" runat="server" SelectMethod="Select"
        TypeName="LoaderDataSource" EnablePaging="True" SelectCountMethod="SelectCount">
        <SelectParameters>
            <asp:SessionParameter Name="objLoaderSearchCriteria" SessionField="LoaderData" Type="Object" />
            <asp:ControlParameter ControlID="m_gvLoader" DefaultValue="1" Name="startRowIndex"
                PropertyName="PageIndex" Type="Int32" />
            <asp:Parameter DefaultValue="10" Name="maximumRows" Type="Int32" />
            <asp:SessionParameter Name="LoaderSortExpression" SessionField="LoaderSortExpression"
                Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
