<%@ Page Language="C#" MasterPageFile="~/masterpages/eDashboard.master" AutoEventWireup="True"
    Inherits="site_HITS_ModelMap_Default" Title="Brightstar Device Protection: Model Maps" Theme="eMain"
    Culture="auto" UICulture="auto" CodeBehind="Default.aspx.cs"   %>

<%@ Register Src="~/Controls/ScriptingHelper.ascx" TagName="ScriptingHelper" TagPrefix="uc" %>
<%@ Register Src="~/Controls/ModelMap/GridOperator.ascx" TagName="GridOperatorHelper"
    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" %>
<%@ Register src="../../../Controls/ClientCarrierDropDowns.ascx" tagname="ClientCarrierDropDowns" tagprefix="uc1" %>

<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> 

    <script type="text/javascript" src="../../../script/ModelMatrixForCarriers/js/jquery-ui.js"></script>
    <link href="../../../style/ModelMatrixForCarriers/css/jquery-ui-1.8.18.custom.css" rel="stylesheet" />
<%--    <link href="../../../style/ModelMatrixForCarriers/css/style.css" rel="stylesheet" />--%>
    
    <script type="text/javascript">

        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequest);
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);

        function BeginRequest(sender, args) {
            var processButtonsDIV = document.getElementById("ProcessButtonsDIV");
            if (processButtonsDIV != null)
                processButtonsDIV.disabled = true;

            document.getElementById("DivOrganization").disabled = true;
        }

        function EndRequest(sender, args) {
            var processButtonsDIV = document.getElementById("ProcessButtonsDIV");
            if (processButtonsDIV != null)
                processButtonsDIV.disabled = false;

            document.getElementById("DivOrganization").disabled = false;
        }

        function btnClear_Click(obj) {
            var ddlActiveSearchDropDownList = document.getElementById("ctl00_eContent_ddlActiveSearch");
            ddlActiveSearchDropDownList.value = "0";
            ResetSkuControls();
        }

        function btnSearch_Click(obj) {
            return SelectAllConfirmation();
        }

        function SelectAllConfirmation() {
            var pageSize = (document.all.ctl00_eContent_m_ddlPageSize.value);
            if (pageSize == '0') {
                if (confirm('<%= Resources.Default.MessageSelectedAll %>')) {
                    return true;
                }
                else {
                    return false;
                }
            }
        }

        function SearchByAccessorySku() {
            document.getElementById('<%= m_txtModelSku.ClientID %>').disabled = true;      // disable the "Model SKU" textbox 
            document.getElementById('<%= m_txtModelSku.ClientID %>').value = "";
            var modelSku = document.getElementById('<%= m_txtModelSku.ClientID %>').value;
            var accessorySku = document.getElementById('<%= m_txtAccessorySku.ClientID %>').value;
            if (accessorySku == '' && modelSku == '') {
                ResetSkuControls();
            }
        }

        function SearchByModelSku() {
            document.getElementById('<%= m_txtAccessorySku.ClientID %>').disabled = true;  // disable the "Accesory SKU" textbox 
            document.getElementById('<%= m_txtAccessorySku.ClientID %>').value = "";
            var modelSku = document.getElementById('<%= m_txtModelSku.ClientID %>').value;
            var accessorySku = document.getElementById('<%= m_txtAccessorySku.ClientID %>').value;
            if (accessorySku == '' && modelSku == '') {
                ResetSkuControls();
            }
        }

        function ResetSkuControls() {
            document.getElementById('<%= m_txtModelSku.ClientID %>').disabled = false;
            document.getElementById('<%= m_txtAccessorySku.ClientID %>').disabled = false;
            document.getElementById('<%= m_lblSkuValidationError.ClientID %>').style.visibility = "hidden";
            document.getElementById('<%= m_lblSkuValidationError.ClientID %>').value = "";
        }

        $(document).ready(function () {
            if ("<%= ErrorMessage %>") {
                $('#dialog-deactivateModel').dialog({
                    modal: true,
                    closeOnEscape: true,
                    open: function (event, ui) { $(".ui-dialog-titlebar-close").hide(); $(".ui-widget-overlay").height($(document).height()+30); },
                    width: 500,
                    resizable: false,
                    dialogClass: 'modal-matrix',
                    buttons:
                        {
                            "<%= Resources.ModelMatrixManagement.LabelBtnOk %>": function () {
                        $(this).dialog("close");
                    }
                        }
                });
            }
        });
    </script>

    <uc:ScriptingHelper ID="ScriptingHelper1" runat="server" />
    <table width="100%">
        <tr>
            <td>
                <h1>
                    <asp:Literal ID="m_litHeader" runat="server" Text="<%$ Resources: HandsetManagement, LabelTiltleModelMaps %>"  />
                </h1>
            </td>
        </tr>
    </table>
    <!---------------------------------UC----------------------------------->
    <uc:DefaultHeader ID="DefaultHeader1" runat="server"   />
    <!---------------------------------T1----------------------------------->
    <div class="mastersearch">
        <table cellspacing="0" cellpadding="0">
            <tr>
                <td style="padding-right: 0px">
                    <img id="m_imgSearchCriteria" runat="server" src="../../../images/Collapse_13x13.jpg"
                        class="showstate" onclick="expandMasterSearch(this, 'm_pnlMasterSearchCriteria')"
                        alt="contract" />
                </td>
                <td width="100%" valign="middle">
                    <asp:Literal ID="m_litSearchUsersHeader" runat="server" Text="<%$ Resources: Default, LabelSearchCriteria %>"  />
                </td>
            </tr>
        </table>
    </div>
    <div id="m_pnlMasterSearchCriteria" style="background-color: #DBDCDE">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <table border="0" cellpadding="0" cellspacing="0" class="gvTable">
                    <tr valign="top">
                        <td style="width: 130px;" align="right">
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td align="right" nowrap="nowrap" style="width: 114px">
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td align="center" rowspan="1" valign="top">
                            &nbsp;
                        </td>
                        <td rowspan="1" valign="top">
                            &nbsp;
                        </td>
                    </tr>
                    <tr valign="top" class="gvTable">
                        <td>
                            <table>
                                <tr>
                                    <td colspan="2" align="right">
                                        <div id="DivOrganization" style="margin-right:0px;">
                                            <uc1:ClientCarrierDropDowns ID="ClientCarrierDropDowns1" 
                                            runat="server" DropDownWidth="219" LabelWidth="108" DefaultCarrierText="<%$ Resources: Default, HeaderListItemAll %>"
                                                OnClientChanged="ucClientCarrierDropDowns_ClientChanged"
                                                OnCarrierChanged="ucClientCarrierDropDowns_CarrierChanged"                                             
                                             />
                                        </div>
                                    </td>
                                    <td align="right" nowrap="nowrap" style="width: 114px">
                                        <asp:Literal ID="m_litMastModel" runat="server" 
                                            Text="<%$ Resources: ModelManagement, LabelMasterModelColon %>" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="m_txtMastModel" runat="server" 
                                            Width="165px"></asp:TextBox>
                                        <SmartAjaxToolkit:SmartAutoCompleteExtender ID="SmartAutoCompleteExtender1" runat="server"
                                            EnableCaching="false" MinimumPrefixLength="2" OnAutoCompleteCallback="SearchMasterModels"
                                            TargetControlID="m_txtMastModel" UpdateMode="Callback" />
                                    </td>
                                    <td align="right", nowrap="nowrap" style="width: 150px">
                                        <asp:Literal ID="m_litModelSku" runat="server" Text="<%$ Resources: ModelManagement, LabelModelSkuColon %>" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="m_txtModelSku" runat="server" Width="200px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px;">
                                        <asp:Literal ID="m_litMfgOrg0" runat="server" Text="<%$ Resources: OrganizationManagement, LabelProgramTypeColon %>" />
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlProgramTypes" runat="server" DataTextField="RefName" DataValueField="ID"
                                            Width="219px">
                                        </asp:DropDownList>
                                    </td>
                                    <td align="right" nowrap="nowrap" style="width: 114px">
                                        <asp:Literal ID="m_litCarrierModel" runat="server" 
                                            Text="<%$ Resources: ModelManagement, LabelClientModelColon %>" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="m_txtCarrierModel" runat="server" 
                                            Width="165px"></asp:TextBox>
                                        <SmartAjaxToolkit:SmartAutoCompleteExtender ID="SmartAutoCompleteExtender2" runat="server"
                                            OnAutoCompleteCallback="SearchCarrierModels" TargetControlID="m_txtCarrierModel"
                                            UpdateMode="Callback" EnableCaching="false" MinimumPrefixLength="2" />
                                    </td>
                                    <td align="right", nowrap="nowrap" style="width: 150px">
                                        <asp:Literal ID="m_litAccessorySku" runat="server" Text="<%$ Resources: ModelManagement, LabelAccessorySkuColon %>" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="m_txtAccessorySku" runat="server" Width="200px"></asp:TextBox>
                                        <asp:Label ID="m_lblSkuValidationError" Font-Bold="True" ForeColor="Red" runat="server" Visible="False" />
                                    </td>	
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Literal ID="m_litMfgOrg" runat="server" 
                                            Text="<%$ Resources: HandsetManagement,LabelManufacturerColon %>" />
                                    </td>
                                    <td align="left">
                                        <asp:DropDownList ID="m_ddlMfgOrg" runat="server" 
                                            Width="219px">
                                        </asp:DropDownList>
                                    </td>
                                    <td align="right" nowrap="nowrap" style="width: 114px">
                                        <asp:Literal ID="Literal3" runat="server" 
                                            Text="<%$ Resources: SubscriberManagement, LabelTechnologyTypeColon%>" />
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="m_ddlTechType" runat="server" Width="175">
                                        </asp:DropDownList>
                                    </td>
                                    <td align="right" nowrap="nowrap" style="width: 150px">
                                        <asp:Literal ID="m_litFFMethod" runat="server" 
                                            Text="<%$ Resources: FulfillmentManagement, LabelFulfillmentMethodColon %>" />
                                    </td>
                                    <td nowrap="nowrap" style="width: 300px">
                                        <asp:DropDownList ID="m_ddlFulfillmentMethods" runat="server" Width="213px"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px;">
                                        <asp:Literal ID="litSetActiveStatus" runat="server"  Text="<%$ Resources:Default, LabelActive %>"/>
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlActiveSearch" runat="server">
                                            <asp:ListItem Selected="True" Text="<%$ Resources: Default, ListItemAll %>" Value="0"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Default, LabelActive %>" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Default, LabelInactive %>" Value="2"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td align="right" nowrap="nowrap" style="width: 114px">
                                        &nbsp;
                                        <asp:Literal ID="m_litPageSize" runat="server" Text="<%$ Resources:HandsetManagement, LabelRecordsPerPageColon %>" />
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="m_ddlPageSize" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td align="center">
                            <%--<asp:Literal ID="Literal1" runat="server" Text="Rate&amp;nbsp;Plan&amp;nbsp;Feature" /><br />--%>
                            <%--<asp:ListBox ID="RatePlanDropDownList" runat="server" Height="137px" SelectionMode="Single" />--%>
                        </td>
                        <td align="center">
                            <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:HandsetManagement, LabelServicePlanStatus %>" /><br />
                            <asp:ListBox ID="RatePlanStatusList" runat="server" SelectionMode="Multiple" />
                        </td>
                    </tr>
                    <tr valign="top">
                        <td style="width: 130px" align="right">
                            &nbsp;
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                                ControlToValidate="m_ddlMfgOrg"></asp:RequiredFieldValidator>
                        </td>
                        <td align="right" nowrap="nowrap" style="width: 114px">
                            &nbsp;
                        </td>
                        <td nowrap>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr valign="top">
                        <td style="width: 130px" align="right">
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td style="width: 114px">
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <!--------------------------------Buttons---------------------------------->
    <div style="padding-left: 40%" id="divSearchButtons">
        <asp:Button ID="btnSearch" runat="server" Text="<%$ Resources: Default, ButtonSearch %>" CssClass="pagebutton" Font-Bold="False"
            OnClick="btnSearch_Click" OnClientClick="return btnSearch_Click();"  />
        <input id="btnClear" type="button" runat="server" value="<%$ Resources: Default, ButtonClear %>" class="pagebutton" />
    </div>
    <br />	
    <!---------------------------------Grid Pnl----------------------------------->
    <asp:Panel ID="m_pnlGrid" Visible="False" runat="server" >
        <!-------------------------------------------------------------------->
        <asp:Panel ID="m_pnlTopGridOperator" Visible="false" runat="server">
            <div id="ProcessButtonsDIV" class="">
                <uc:GridOperatorHelper ID="ctlTopGridOperator" runat="server" OnUpdateClicked="btnUpdate_Click"
                    OnRemoveClicked="btnUpdate_Click" />
            </div>
        </asp:Panel>
        <br />
        <asp:CustomValidator ID="Validator1" runat="server" ErrorMessage="" ValidationGroup="SearchValidation"
            Visible="false" />
        <asp:ValidationSummary ID="ValidationSummary" runat="server" BorderStyle="none" ValidationGroup="SearchValidation" />
        <br />
        <!---------------------------------T2----------------------------------->
        <asp:Panel ID="m_pnlSearchResults" Width="100%" runat="server">
            <h2>
                <asp:Literal ID="m_litSearchResults" runat="server" Text="<%$ Resources: Default, LabelSearchResults %>"  />
            </h2>
            <asp:Label ID="lblSuccess" runat="server" CssClass="successmessage" Text="<%$ Resources : Default,LabelLabel %>"
                ></asp:Label>
        </asp:Panel>
        <!----------------------------------HitsSearchGridView---------------------------------->
        <cc1:HitsSearchGridView ID="m_gvModelMap" runat="server" AutoGenerateColumns="False"
            Width="100%" AllowPaging="True" OnRowDataBound="m_gvModelMap_RowDataBound" OnPageIndexChanged="m_gvModelMap_PageIndexChanged"
            OnPageIndexChanging="m_gvModelMap_PageIndexChanging" OnMenuItemCommand="m_gvModelMap_OnMenuItemCommand"
            ShowMenu="True" ShowSelectField="True" ShowActivateMenu="False" ShowDeActivateMenu="False"
            ShowEmailMenu="False" ShowPrintMenu="True" ShowHotlineMenu="False" ShowDeHotlineMenu="False"
            CustomPagerID="HitsPager1" ClientFunctionPrint="window.print();" OnCustomPageIndexChanged="m_gvModelMap_PageIndexChanged"
            OnCustomPageIndexChanging="m_gvModelMap_PageIndexChanging" 
            ShowDeleteMenu="False" ShowDeSelectMenu="True" ShowExportMenu="True" ShowSelectMenu="True"
            HeaderStyle-Font-Size="XX-Small" AtlasScriptManagerID="" ClientFunctionActivateSelected=""
            ClientFunctionDeActivateSelected="" ClientFunctionDeHotline="" ClientFunctionDelete=""
            ClientFunctionEmailSelected="" ClientFunctionExportSelected="" ClientFunctionHotline=""
            ClientFunctionSetStatus="" CssClassCustomPaging="" CssClassMenu="" PropagateActionToChildID=""
            ShowExportCSV="True" ShowExportCSVWithSummary="False" ShowExportXML="True" ShowExportXMLWithSummary="False"
            ShowSetStatus="False">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litMMPDetails" Text="<%$ Resources: ModelManagement, LabelMapId %>" runat="server"  />
                        <br />
                        <uc:CustomSorter ID="m_csModelMapId" SortExpression="MODEL_MAP_ID" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <ItemStyle />
                    <ItemTemplate>
                        <asp:HyperLink ID="m_linkMMPDetails" runat="server" ToolTip="<%$ Resources: ModelManagement,HyperLinkGetModelMapDetails %>"
                             />
                        <asp:HiddenField ID="m_hfModelMapId" runat="server"></asp:HiddenField>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litActiveHeader" runat="server" Text="<%$ Resources: AdministrationManagement, LabelActiveStatus %>" />
                        <br />
                        <uc:CustomSorter ID="m_csActive" SortExpression="InactiveDate" runat="server" OnSortAscendingClicked="customSorter_SortClicked"
                            OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <ItemStyle Width="50px" />
                    <ItemTemplate>
                        <asp:Literal ID="m_litActive" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litOrganizationHeader" Text="<%$ Resources: OrganizationManagement, LabelClient %>" runat="server"  />
                        <br />
                        <uc:CustomSorter ID="m_csOrganization" SortExpression="ORGANIZATION_NAME" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <ItemStyle Width="180px" />
                    <ItemTemplate>
                        <asp:HyperLink ID="m_linkOrgName" ToolTip="<%$ Resources: OrganizationManagement, HyperLinkToolTipGetOrganizationDetails %>" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>                
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litMasterModelHeader" Text="<%$ Resources: ModelManagement, LabelMasterModel %>" runat="server"  />
                        <br />
                        <uc:CustomSorter ID="m_csMasterModel" SortExpression="MASTER_MODEL_NAME" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <ItemStyle Width="180px" />
                    <ItemTemplate>
                        <asp:HyperLink ID="m_linkMasterModel" runat="server"  />
                        <br />
                        <asp:Label ID="m_lblTechType" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                
                <asp:TemplateField >
                    <HeaderTemplate>
                        <asp:Literal ID="m_litGenericModelHeader" Text="<%$ Resources: ModelManagement, LabelGenericModel %>" runat="server"  />
                        <br />
                        <uc:CustomSorter ID="m_csGenericModel" SortExpression="GENERIC_MODEL_NAME" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <ItemStyle Width="180px" />
                    <ItemTemplate>
                        <asp:HyperLink ID="m_linkGenericModel" runat="server"  />                        
                    </ItemTemplate>
                </asp:TemplateField>
                                
                <asp:TemplateField  Visible="false">
                    <HeaderTemplate>
                        <asp:Literal ID="m_litOrganicCostHeader" Text="<%$ Resources : AdministrationManagement,LabelOrganicCost %>" runat="server"  />
                        <br />
                        <uc:CustomSorter ID="m_csOrganicCost" SortExpression="REPAIRED_COST" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <ItemStyle />
                    <ItemTemplate>
                        <asp:Literal ID="m_litOrganicCost" runat="server"  />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField Visible="false">
                    <HeaderTemplate>
                        <asp:Literal ID="m_litRefurbedCostHeader" Text="<%$ Resources: ServicePlanManagement, LabelRefurbedCost %>" runat="server" />
                        <br />
                        <uc:CustomSorter ID="m_csRefurbedCost" SortExpression="MFG_REFURBISHED_COST" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <HeaderStyle Wrap="true" />
                    <ItemStyle />
                    <ItemTemplate>
                        <asp:Literal ID="m_litRefurbedCost" runat="server"  />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField >
                    <HeaderTemplate>
                        <asp:Literal ID="m_litNewCostHeader" Text="<%$ Resources: ServicePlanManagement,LabelNewCost %>" runat="server"  />
                        <br />
                        <uc:CustomSorter ID="m_csNewCost" SortExpression="New_Cost" runat="server" OnSortAscendingClicked="customSorter_SortClicked"
                            OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <HeaderStyle Wrap="true" />
                    <ItemStyle  HorizontalAlign="Center"/>
                    <ItemTemplate>
                        <asp:Literal ID="m_litNewCost" runat="server"  />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litRetailPriceHeader" Text="<%$ Resources: ServicePlanManagement,LabelRetailPriceNew %>" runat="server" />
                        <br />
                        <uc:CustomSorter ID="m_csRetailPrice" SortExpression="RETAIL_PRICE_NEW" runat="server" OnSortAscendingClicked="customSorter_SortClicked"
                            OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <HeaderStyle Wrap="true" />
                    <ItemStyle   HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:Literal ID="m_litRetailPrice" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>                    
                <asp:TemplateField >
                    <HeaderTemplate>
                        <asp:Literal ID="m_litOrganizationModelsHeader" Text="<%$ Resources: OrganizationManagement, LabelClientModelNames %>" runat="server"
                             />
                        <br />
                        <uc:CustomSorter ID="m_csOrganizationModels" SortExpression="ORG_MODEL_NAMES" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <ItemStyle Width="170px" />
                    <ItemTemplate>
                        <asp:Literal ID="m_litOrganizationModels" runat="server"  />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litRefurbishedSKUHeader" Text="<%$ Resources : ClaimsManagement,LabelRefurbedSKU %>" runat="server"  />
                        <br />
                        <br />
                    </HeaderTemplate>
                    <ItemStyle Width="220px" />
                    <ItemTemplate>
                        <asp:Literal ID="m_litRefurbishedSKU" runat="server"  />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litNewSKUHeader" Text="<%$ Resources : ClaimsManagement,LabelNewSKU %>" runat="server"  />
                        <br />
                        <br />
                    </HeaderTemplate>
                    <ItemStyle VerticalAlign="Top" Width="220px"/>
                    <ItemTemplate>
                        <asp:Literal ID="m_litNewSKU" runat="server"  />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                <cc1:HitsPager ID="HitsPager1" runat="server" />
            </PagerTemplate>
            <RowStyle HorizontalAlign="Left" VerticalAlign="Top" Font-Overline="False" Font-Size="XX-Small"
                Font-Strikeout="False" Font-Underline="False" />
            <EditRowStyle HorizontalAlign="Left" VerticalAlign="Top" />
            <HeaderStyle Font-Size="XX-Small" Wrap="True" />
        </cc1:HitsSearchGridView>
        <br />
    </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_objModelMapDataSource" runat="server" TypeName="ModelMapDataSource" EnablePaging="True"
        SelectMethod="Select"
        SelectCountMethod="SelectCount" >
        <SelectParameters>
            <asp:SessionParameter DefaultValue="null" Name="objModelMapDataSearch" SessionField="ModelMapSearchCriteria_SessionKey"
                Type="Object" />
            <asp:ControlParameter ControlID="m_gvModelMap" DefaultValue="" Name="startRowIndex"
                PropertyName="PageIndex" Type="Int32" />
            <asp:Parameter DefaultValue="10" Name="maximumRows" Type="Int32" />
            <asp:SessionParameter Name="ModelMapSortExpression" SessionField="ModelMapSortExpression_SessionKey"
                Type="Object" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <!-------------------------------------------------------------------->
    <div id="dialog-deactivateModel" title="<%= Resources.ModelMapManagement.ModalTitleDeactivateModel %>" style="display: none;">
        <p>
            <%= Resources.ModelMapManagement.ModalTextDeactivateModel %>
        </p>
        <ul>
            <%= ErrorMessage %>
        </ul>
    </div>
</asp:Content>