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

<%@ Register Assembly="eSecuritel.HITS.UI.Components" Namespace="eSecuritel.HITS.UI.Components"
    TagPrefix="cc1" %>
<%@ Register Src="~/Controls/CustomSorter.ascx" TagName="CustomSorter" TagPrefix="uc" %>
<%@ Register Src="~/Controls/HITSCalendar.ascx" TagName="HITSCalendar" TagPrefix="uc" %>
<%@ Register Src="~/Controls/ScriptingHelper.ascx" TagName="ScriptingHelper" TagPrefix="uc" %>
<%@ Register Src="~/Controls/ClientCarrierDropDowns.ascx" TagName="ClientCarrierDropDowns"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="eContent" runat="Server">
 
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/script/eGridHelper.js" />
            <asp:ScriptReference Path="~/script/eSetFormcontrols.js" />
            <asp:ScriptReference Path="~/script/jquery-1.8.3.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
    <script type="text/javascript" language="javascript">

        function OptionChanged(Priority) {
            var priorityColumn;

            if (Priority == 1) {
                priorityColumn = document.getElementById("ctl00_eContent_PrimaryChanged");
            }
            else if (Priority == 2) {
                priorityColumn = document.getElementById("ctl00_eContent_SecondaryChanged");
            }
            else {
                priorityColumn = document.getElementById("ctl00_eContent_TertiaryChanged");
            }
            priorityColumn.value = "true";
        }

        function ActivateConfirmation(obj) {
            dropdown = document.getElementById("ctl00_eContent_StatusDropDownField1");
            if ((dropdown[dropdown.selectedIndex].value == "<%= Resources.Default.ListItemChangeActivate %>") | (dropdown[dropdown.selectedIndex].value == "<%= Resources.Default.ListItemActivate %>")) {
                if (confirm('<%= Resources.Default.ConfirmAreYouSureThatSureThatYouWantToActivateTheSelectedReplacements %>')) {
                    return true;
                }
                return false;
            }
            if (dropdown[dropdown.selectedIndex].value == "<%= Resources.Default.LabelDashSelectActionDash %>") {
                alert('<%= Resources.Default.AlertPleaseSelectAnActionToTake %>');
                return false;
            }
        }

        function IsTechType(techType) {
            return (typeof (techType) != 'undefined') &&
                (techType !== '');
        }

        function Check_ValidationInfoForBadSelection(validationInfo, ddlModelPrim, ddlModelSec, ddlModelTer) {

            var primTechType = ddlModelPrim.options[ddlModelPrim.selectedIndex].TechType;
            var secTechType = ddlModelSec.options[ddlModelSec.selectedIndex].TechType;
            var tertTechType = ddlModelTer.options[ddlModelTer.selectedIndex].TechType;

            if ((primTechType != '0') && (primTechType != '-1')) {

                if (validationInfo.CheckBox.checked &&
                IsTechType(primTechType) &&
                validationInfo.TechType != primTechType) {

                    validationInfo.PrimaryCell.style.backgroundColor = 'red';
                }
                else {
                    validationInfo.PrimaryCell.style.backgroundColor = '';
                }
            } else {
                validationInfo.PrimaryCell.style.backgroundColor = '';
            }

            if ((secTechType != '0') && (secTechType != '-1')) {

                if (validationInfo.CheckBox.checked &&
                IsTechType(secTechType) &&
                validationInfo.TechType != secTechType) {

                    validationInfo.SecondaryCell.style.backgroundColor = 'red';
                }
                else {
                    validationInfo.SecondaryCell.style.backgroundColor = '';
                }
            } else {
                validationInfo.SecondaryCell.style.backgroundColor = '';
            }

            if ((tertTechType != '0') && (tertTechType != '-1')) {

                if (validationInfo.CheckBox.checked &&
                IsTechType(tertTechType) &&
                validationInfo.TechType != tertTechType) {

                    validationInfo.TertiaryCell.style.backgroundColor = 'red';
                }
                else {
                    validationInfo.TertiaryCell.style.backgroundColor = '';
                }
            } else {
                validationInfo.TertiaryCell.style.backgroundColor = '';
            }
        }

        function ValidationInfo(checkbox, tblRow, techType,
            primCell, primCellOrigColor,
            secCell, secCellOrigColor,
            tertCell, tertCellOrigColor) {

            this.CheckBox = checkbox;
            this.Row = tblRow;
            this.TechType = techType;
            this.PrimaryCell = primCell;
            this.PrimaryCellOriginalBackgroundColor = primCellOrigColor;
            this.SecondaryCell = secCell;
            this.SecondaryCellOriginalBackgroundColor = secCellOrigColor;
            this.TertiaryCell = tertCell;
            this.TertiaryCellOriginalBackgroundColor = tertCellOrigColor;
        }

        var allCheckBoxIDs = [];
        var allValidationInfos = {};
        var allSelectedValidationInfos = {};

        function HandleCheckBoxClicked(checkbox) {
            try {
                var ddlModelPrim = $get('<%= PrimaryReplacementDropDown.ClientID %>');
                var ddlModelSec = $get('<%= SecondaryReplacementDropDown.ClientID %>');
                var ddlModelTer = $get('<%= TertiaryReplacementDropDown.ClientID %>');

                if (checkbox.checked) {
                    allSelectedValidationInfos[checkbox.id] = allValidationInfos[checkbox.id];
                    Check_ValidationInfoForBadSelection(allSelectedValidationInfos[checkbox.id], ddlModelPrim, ddlModelSec, ddlModelTer);
                }
                else {
                    if (typeof (allSelectedValidationInfos[checkbox.id]) != 'undefined') {
                        Check_ValidationInfoForBadSelection(allSelectedValidationInfos[checkbox.id], ddlModelPrim, ddlModelSec, ddlModelTer);
                        allSelectedValidationInfos[checkbox.id].PrimaryCell.style.backgroundColor = allSelectedValidationInfos[checkbox.id].PrimaryCellOriginalBackgroundColor;
                        allSelectedValidationInfos[checkbox.id].SecondaryCell.style.backgroundColor = allSelectedValidationInfos[checkbox.id].SecondaryCellOriginalBackgroundColor;
                        allSelectedValidationInfos[checkbox.id].TertiaryCell.style.backgroundColor = allSelectedValidationInfos[checkbox.id].TertiaryCellOriginalBackgroundColor;
                        delete allSelectedValidationInfos[checkbox.id];
                    }
                }
            }
            catch (e) {
                throw e;
            }
        }

        function CheckBoxClicked(sender, args) {
            HandleCheckBoxClicked(sender.target);
        }

        function SelectAllClicked() {
            for (var i = 0; i < allCheckBoxIDs.length; i++) {
                HandleCheckBoxClicked(allValidationInfos[allCheckBoxIDs[i]].CheckBox);
            }
        }

        function CheckSelectedRowsForInvalidMMR(primDDL, secDDL, tertDDL) {
            for (var v in allSelectedValidationInfos) {
                if (typeof (allSelectedValidationInfos[v]) == 'object') {
                    Check_ValidationInfoForBadSelection(allSelectedValidationInfos[v], primDDL, secDDL, tertDDL);
                }
            }
        }

        function DdlOnChange() {
            var ddlModelPrim = $get('<%= PrimaryReplacementDropDown.ClientID %>');
            var ddlModelSec = $get('<%= SecondaryReplacementDropDown.ClientID %>');
            var ddlModelTer = $get('<%= TertiaryReplacementDropDown.ClientID %>');

            CheckSelectedRowsForInvalidMMR(ddlModelPrim, ddlModelSec, ddlModelTer);
        }

        function GetTechType(modelID) {
            var toRet = '';

            for (var i = 0; i < allModels.length; i++) {

                if (allModels[i].HandsetModelID == modelID) {
                    toRet = allModels[i].TechType;
                    break;
                }
            }

            return toRet;
        }

        function InitGrid(modelsGridView) {
            var allRows = modelsGridView.rows;
            var allCellsForRow = null;
            var allInputs = null;
            var currentCheckBox = null;
            var currentTechType = null;
            var primaryCellIndex = -1;
            var secondaryCellIndex = -1;
            var tertiaryCellIndex = -1;

            for (var i = 0; i < allRows.length; i++) {
                if (allRows[i].className == 'thead') {
                    allCellsForRow = allRows[i].getElementsByTagName('th');

                    /******************************************************************
                    * If you add new columns to the main grid you may have to update
                    * the numbers below.  (I know this is ugly)
                    ******************************************************************/
                    for (var l = 0; l < allCellsForRow.length; l++) {

                        if (allCellsForRow[l].innerHTML.indexOf('<%= Resources.ModelManagement.LabelPrimaryModel %>') >= 0) {
                            primaryCellIndex = l + 1; // Update Here
                        }
                        else if (allCellsForRow[l].innerHTML.indexOf('<%= Resources.ModelManagement.LabelSecondaryModel %>') >= 0) {
                            secondaryCellIndex = l + 4; // Update Here
                        }
                        else if (allCellsForRow[l].innerHTML.indexOf('<%= Resources.ModelManagement.LabelTertiaryModel %>') >= 0) {
                            tertiaryCellIndex = l + 7;  // Update Here
                        }
                }

                continue;
            }

            allInputs = allRows[i].getElementsByTagName('input');
            allCellsForRow = allRows[i].getElementsByTagName('td');

                // I assume there will be only one checkbox per row
            for (var j = 0; j < allInputs.length; j++) {
                if (allInputs[j].type != 'checkbox') {
                    continue;
                }

                $clearHandlers(allInputs[j]);
                $addHandler(allInputs[j], 'click', CheckBoxClicked);

                currentCheckBox = allInputs[j];
                break;
            }

                // I assume there will be only one hidden field per row
            for (var k = 0; k < allInputs.length; k++) {
                if ((allInputs[k].type != 'hidden') ||
                    (allInputs[k].id.toLowerCase().indexOf('techtype') == -1)) {
                    continue;
                }

                currentTechType = allInputs[k].value;
                break;
            }

            allCheckBoxIDs.push(currentCheckBox.id);
            allValidationInfos[currentCheckBox.id] = new ValidationInfo(currentCheckBox, allRows[i], currentTechType, allCellsForRow[primaryCellIndex], allCellsForRow[primaryCellIndex].style.backgroundColor, allCellsForRow[secondaryCellIndex], allCellsForRow[secondaryCellIndex].style.backgroundColor, allCellsForRow[tertiaryCellIndex], allCellsForRow[tertiaryCellIndex].style.backgroundColor);
            HandleCheckBoxClicked(currentCheckBox);
        }
    }

    function Init() {
        var modelsGridView = $get('<%= ModelsCustomGridview.ClientID %>');

            if (modelsGridView === null) {
                return;
            }

            try {
                InitGrid(modelsGridView);
                DdlOnChange();
            }
            catch (e) {
                debugger;
                throw e;
            }
        }

        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_endRequest(function () {
            if ('<%= HITSRoleProvider.IsUserAssignedTask(HITSWebService.TaskType.UpdateModelMatrix) ? 1 : 0 %>' == '0') {
                $("#HelperCriteria :input").attr("disabled", true);
                $("#SelectActionForCheckedItems :input").attr("disabled", true);
            }
        });
            $(document).ready(function () {
                if ('<%= HITSRoleProvider.IsUserAssignedTask(HITSWebService.TaskType.UpdateModelMatrix) ? 1 : 0 %>' == '0') {
                $("#HelperCriteria :input").attr("disabled", true);
                $("#SelectActionForCheckedItems :input").attr("disabled", true);
            }
        });


    </script>
    <uc:ScriptingHelper ID="ScriptingHelper1" runat="server" />
    <table width="100%">
        <tr>
            <td>
                <h1>
                    <asp:Literal ID="m_litHeader" runat="server" Text="<%$ Resources : ModelManagement,LabelModelMatrixReplacements %>" />
                </h1>
            </td>
        </tr>
    </table>
    <div style="background-color: #DBDCDE" id="Line" runat="server" />
    <br />
    <br />
    <div class="mastersearch">
        <table cellspacing="0" cellpadding="0">
            <tr>
                <td style="padding-right: 0px">
                    <img id="Img2" runat="server" src="../../../images/Collapse_13x13.jpg" class="showstate"
                        onclick="expandMasterSearch(this, 'MasterSearchCriteria')" alt="contract" />
                </td>
                <td valign="middle" style="width: 100%">
                    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources : Default,LabelSearchCriteria %>" />
                </td>
            </tr>
        </table>
    </div>
    <div id="MasterSearchCriteria" style="background-color: #DBDCDE">
        <div style="background-color: #DBDCDE; width: 100%;">
            <table style="">
                <tr>
                    <td style="vertical-align: top">
                        <table style="padding: 0,0,0,0; margin: 0,0,0,0;">
                            <tr>
                                <td style="text-align: left; vertical-align: top" colspan="3">
                                    <div id="DivOrganization" class="" style="text-align: left; padding: 0px; margin: 0px; margin-left: -2px;">
                                        <uc1:ClientCarrierDropDowns ID="ucClientCarrierDropDowns" runat="server" DropDownWidth="214"
                                            LabelWidth="102" OnClientChanged="ucClientCarrierDropDowns_ClientChanged" OnCarrierChanged="ucClientCarrierDropDowns_CarrierChanged"
                                            OrientationOfDropDowns="Vertical" ShowValidator="false" ClientLabelText="<%$ Resources : OrganizationManagement,LabelClientColon %>"
                                            CarrierLabelText="<%$ Resources : OrganizationManagement,LabelCarrierColon %>"
                                            DefaultCarrierText="<%$ Resources : Default,HeaderListDropDownTextSelect %>"
                                            DefaultClientText="<%$ Resources : Default,HeaderListDropDownTextAll %>" />
                                    </div>
                                </td>
                            </tr>
                            <%--<tr>
                                <td style="text-align: right; vertical-align: top">
                                    <asp:Label ID="Label61" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                        Text="Client"></asp:Label>
                                </td>
                                <td style="text-align: left; padding-right: 0; margin-right: 0; padding-left: 0;
                                    margin-left: 0;">
                                    <asp:DropDownList ID="ClientDropDownList" runat="server" CssClass="defaultDropDownList"
                                        Width="214px" DataTextField="Text" DataValueField="ID" OnSelectedIndexChanged="ClientDropDownList_SelectedIndexChanged"
                                        AutoPostBack="True" AppendDataBoundItems="true" TabIndex="1">
                                    </asp:DropDownList>
                                </td>
                                <td style="text-align: left; padding-right: 0; margin-right: 0; padding-left: 0;
                                    margin-left: 0;">
                                    <asp:CustomValidator ID="CarrierCustomValidator1" runat="server" ErrorMessage="Carrier must be selected"
                                        ControlToValidate="ClientDropDownList" Text="*" SetFocusOnError="true" ValidationGroup="SearchValidation"></asp:CustomValidator>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right; vertical-align: top">
                                    <asp:Label ID="Label62" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                        Text="Carrier"></asp:Label>
                                </td>
                                <td style="text-align: left; padding-right: 0; margin-right: 0; padding-left: 0;
                                    margin-left: 0;">
                                    <asp:DropDownList ID="CarrierDropDownList" runat="server" CssClass="defaultDropDownList"
                                        Width="214px" DataTextField="Text" DataValueField="ID" OnSelectedIndexChanged="CarrierDropDownList_SelectedIndexChanged"
                                        AutoPostBack="True" AppendDataBoundItems="true" TabIndex="1">
                                    </asp:DropDownList>
                                </td>
                                <td style="text-align: left; padding-right: 0; margin-right: 0; padding-left: 0;
                                    margin-left: 0;">
                                    <asp:CustomValidator ID="CustomValidator2" runat="server" ErrorMessage="Carrier must be selected"
                                        ControlToValidate="CarrierDropDownList" Text="*" SetFocusOnError="true" ValidationGroup="SearchValidation"></asp:CustomValidator>
                                </td>
                            </tr>--%>
                            <tr>
                                <td style="text-align: right; vertical-align: top">
                                    <asp:Label ID="Label10" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                        Text="<%$ Resources : OrganizationManagement,LabelProgramTypeColon %>"></asp:Label>
                                </td>
                                <td style="text-align: left; padding-right: 0; margin-right: 0; padding-left: 0;
                                    margin-left: 0;">
                                    <asp:DropDownList ID="ProgramTypeDropDownList" runat="server" CssClass="defaultDropDownList"
                                        Width="214px" DataTextField="Text" DataValueField="ID" AppendDataBoundItems="true"
                                        TabIndex="2" AutoPostBack="true" OnSelectedIndexChanged="ProgramTypeDropDownList_SelectedIndexChanged"
                                        Enabled="False">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;">
                                    <asp:Label ID="Label2" runat="server" CssClass="defaultLabel" Text="<%$ Resources : ModelManagement,LabelClaimedModelColon %>"></asp:Label>
                                </td>
                                <td style="text-align: left; padding-right: 0; margin-right: 0; padding-left: 0;
                                    margin-left: 0;">
                                    <asp:TextBox ID="ClaimedTextBox" runat="server" Width="203px" CssClass="defaultTextBox"
                                        TabIndex="4" Height="24px"></asp:TextBox>
                                    <SmartAjaxToolkit:SmartAutoCompleteExtender ID="SmartAutoCompleteExtender1" runat="server"
                                        OnAutoCompleteCallback="SearchPrimaryModels" TargetControlID="ClaimedTextBox"
                                        UpdateMode="Callback" EnableCaching="false" MinimumPrefixLength="2" />
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;">
                                    <asp:Literal ID="Literal3" runat="server" Text="<%$Resources : SubscriberManagement,LabelTechnologyTypeColon %>" />
                                </td>
                                <td style="text-align: left; padding-right: 0; margin-right: 0; padding-left: 0;
                                    margin-left: 0;">
                                    <asp:DropDownList ID="m_ddlTechType" runat="server" Width="214px">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td style="vertical-align: top; padding: 0,0,0,0; margin: 0,0,0,0;">
                        <table style="padding: 0,0,0,0; margin: 0,0,0,0;">
                            <tr style="">
                                <td align="right" style="">
                                    <asp:Label ID="Label6" runat="server" CssClass="defaultLabel" Font-Bold="False" Text="<%$ Resources : AdministrationManagement,HeaderTextLoaderStatus %>"></asp:Label>
                                </td>
                                <td style="padding-right: 0; margin-right: 0; padding-left: 0; margin-left: 0;">
                                    <asp:UpdatePanel ID="UpdatePanel2" runat="server" ChildrenAsTriggers="true">
                                        <ContentTemplate>
                                            <asp:DropDownList ID="StatusDropDownList" runat="server" CssClass="defaultDropDownList"
                                                Width="210px" AutoPostBack="True" OnSelectedIndexChanged="StatusDropDownList_SelectedIndexChanged"
                                                TabIndex="2">
                                                <asp:ListItem Text="<%$ Resources : Default,ListItemAll %>"></asp:ListItem>
                                                <asp:ListItem Text="<%$ Resources : Default,ListItemOpen %>"></asp:ListItem>
                                                <asp:ListItem Text="<%$ Resources : Default,ListItemApproved %>"></asp:ListItem>
                                                <asp:ListItem Text="<%$ Resources : Default,ListItemActive %>"></asp:ListItem>
                                            </asp:DropDownList>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr style="">
                                <td align="right" style="">
                                    <asp:Label ID="Label3" runat="server" CssClass="defaultLabel" Text="<%$ Resources : ClaimsManagement,LabelPrimary %>"></asp:Label>
                                </td>
                                <td style="padding-right: 0; margin-right: 0; padding-left: 0; margin-left: 0;">
                                    <asp:DropDownList ID="PrimaryFilterDropDown" runat="server" CssClass="defaultDropDownList"
                                        Width="210px" TabIndex="5">
                                        <asp:ListItem Text="<%$ Resources : ModelManagement,ListItemSelectModel %>"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="">
                                    <asp:Label ID="Label4" runat="server" CssClass="defaultLabel" Text="<%$ Resources : Default,HeaderTextSecondary %>"></asp:Label>
                                </td>
                                <td style="padding-right: 0; margin-right: 0; padding-left: 0; margin-left: 0;">
                                    <asp:DropDownList ID="SecondaryFilterDropDown" runat="server" CssClass="defaultDropDownList"
                                        Width="210px" TabIndex="6">
                                        <asp:ListItem Text="<%$ Resources : ModelManagement,ListItemSelectModel %>"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="">
                                    <asp:Label ID="Label5" runat="server" CssClass="defaultLabel" Text="<%$ Resources : ClaimsManagement,LabelTertiary %>"></asp:Label>
                                </td>
                                <td style="padding-right: 0; margin-right: 0; padding-left: 0; margin-left: 0;">
                                    <asp:DropDownList ID="TertiaryFilterDropDown" runat="server" CssClass="defaultDropDownList"
                                        Width="210px" TabIndex="7">
                                        <asp:ListItem Text="<%$ Resources : ModelManagement,ListItemSelectModel %>"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td style="vertical-align: top; padding: 0,0,0,0; margin: 0,0,0,0;">
                        <table style="padding: 0,0,0,0; margin: 0,0,0,0;">
                            <tr>
                                <td style="vertical-align: top; padding-top:10px">
                                    <asp:Label ID="Label7" runat="server" CssClass="defaultLabel" Font-Bold="False" Text="<%$ Resources : Default,LabelEffectiveDate %>"></asp:Label>
                                </td>
                                <td style="padding-right: 0; margin-right: 0; padding-left: 0; margin-left: 0;">
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                        <Triggers>
                                            <asp:AsyncPostBackTrigger ControlID="StatusDropDownList" />
                                        </Triggers>
                                        <ContentTemplate>
                                            <asp:DropDownList ID="EffectiveDateDropDown" runat="server" CssClass="defaultDropDownList"
                                                Width="150px" TabIndex="3">
                                                <asp:ListItem Text="<%$ Resources : Default,LabelSelectDate %>"></asp:ListItem>
                                            </asp:DropDownList>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                                <td>
                                    <asp:CustomValidator ID="EffectiveDateCustomValidator1" runat="server" ErrorMessage="<%$ Resources : Default,LabelEffectiveDateMustBeSelected %>"
                                        ControlToValidate="EffectiveDateDropDown" Text="*" SetFocusOnError="true" ValidationGroup="SearchValidation"></asp:CustomValidator>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
        &nbsp;&nbsp;
    </div>
    <div style="width: 100%;">
        <asp:CustomValidator ID="SearchCustomValidator1" runat="server" ErrorMessage="" Visible="false"
            ValidationGroup="SearchValidation" /><br />
        <asp:ValidationSummary ID="SearchValidationSummary" runat="server" ValidationGroup="SearchValidation"
            BorderStyle="none" />
    </div>
    <table>
        <tr>
            <td style="width: 118px">
                <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="0">
                    <ProgressTemplate>
                        <asp:Label ID="Label20" runat="server" Text="<%$ Resources : Default,LabelPleaseWait %>"
                            ForeColor="red"></asp:Label>
                        &nbsp;
                    </ProgressTemplate>
                </asp:UpdateProgress>
            </td>
            <td style="padding-left: 10px; width: 177px">
                &nbsp;<asp:Button ID="SearchButton" runat="server" CssClass="defaultButton" Text="<%$ Resources : Default,ButtonSearch %>"
                    Enabled="false" ValidationGroup="SearchValidation" Width="71px" Height="22px"
                    OnClick="SearchButton_Click" TabIndex="8" />
                <asp:Button ID="ClearFilterButton" runat="server" CssClass="defaultButton" Text="<%$ Resources : Default,ButtonClear %>"
                    Width="71px" Height="22px" OnClick="ClearFilterButton_Click" CausesValidation="false" />
            </td>
        </tr>
    </table>
    <br />
    <div class="mastersearch">
        <table cellspacing="0" cellpadding="0">
            <tr>
                <td style="padding-right: 0px">
                    <img id="SearchCriteriaImage2" runat="server" src="../../../images/Collapse_13x13.jpg"
                        class="showstate" onclick="expandMasterSearch(this, 'HelperCriteria')" alt="contract" />
                </td>
                <td valign="middle" style="width: 100%">
                    <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources : Default,LabelChangeReplacementSettings %>" />
                </td>
            </tr>
        </table>
    </div>
    <div id="HelperCriteria" style="background-color: #DBDCDE; width: 100%">
        <table cellpadding="-1" cellspacing="-1" style="width: 100%">
            <tr>
                <td style="width: 405px; height: 110px" valign="top" class="borderRight">
                    <br />
                    <table>
                        <tr>
                            <td style="text-align: right">
                                <asp:Label ID="Label51" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                    Text="<%$ Resources : Default,LabelEffectiveDate %>"></asp:Label>
                            </td>
                            <td style="padding-top: 0">
                                <table style="padding: 0; margin: 0">
                                    <tr>
                                        <td style="padding: 0; margin: 0; vertical-align: top">
                                            <asp:TextBox ID="EffectiveDateTextBox" runat="server" CssClass="defaultTextBox" Width="180" 
                                                Visible="false"></asp:TextBox>&nbsp;
                                            <uc:HITSCalendar ID="calEffectiveDate" runat="server" ValidationGroup="ClaimedModelUpdate" />
                                        </td>
                                        <td style="padding: 0; margin: 0; text-align: left; vertical-align: top">
                                            <asp:RequiredFieldValidator ID="EffectiveDateRequiredFieldValidator" runat="server"
                                                ControlToValidate="EffectiveDateTextBox" ErrorMessage="<%$ Resources : Default,ErrorMessageValidFutureEffectiveDateRequiredDot %>"
                                                ValidationGroup="ClaimedModelUpdate" SetFocusOnError="True" Enabled="false">*</asp:RequiredFieldValidator>
                                            <asp:CustomValidator ID="EffectiveDateCustomValidator2" runat="server" ErrorMessage="<%$ Resources : Default,ErrorMessageValidFutureEffectiveDateRequiredWhenApprovingOpenReplacementPastDot %>"
                                                ControlToValidate="EffectiveDateTextBox" Text="*" SetFocusOnError="true" ValidationGroup="ClaimedModelUpdate"
                                                Visible="true"></asp:CustomValidator>
                                            <asp:CustomValidator ID="EffectiveDateCustomValidator3" runat="server" ErrorMessage="<%$ Resources : Default,ErrorMessageValidFutureEffectiveDateRequiredDot %>"
                                                ControlToValidate="EffectiveDateTextBox" Text="*" SetFocusOnError="true" ValidationGroup="ClaimedModelUpdate"
                                                Visible="true"></asp:CustomValidator>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right">
                                <asp:Label ID="Label56" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                    Text="<%$ Resources : ServicePlanManagement,LabelNewCost %>" Visible="False"></asp:Label>
                            </td>
                            <td style="">
                                <asp:TextBox ID="CostTextBox" runat="server" CssClass="defaultTextBox" Width="140px"
                                    Visible="False" Text="<%$ Resources : Default,ListItemDoNotChange %>"></asp:TextBox>&nbsp;
                                <asp:CustomValidator ID="CostCustomValidator" runat="server" ControlToValidate="CostTextBox"
                                    ErrorMessage="<%$ Resources : ServicePlanManagement,ErrorMessageNewCostValueInvalidDot %>"
                                    SetFocusOnError="True" ValidationGroup="ClaimedModelUpdate">*</asp:CustomValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right">
                                <asp:Label ID="Label9" runat="server" CssClass="defaultLabel" Font-Bold="False" Text="<%$ Resources : ServicePlanManagement,LabelNonNewCost %>"
                                    Visible="False"></asp:Label>
                            </td>
                            <td style="">
                                <asp:TextBox ID="RefurbCostInput" runat="server" CssClass="defaultTextBox" Text="<%$ Resources : Default,ListItemDoNotChange %>"
                                    Width="140px" Visible="False"></asp:TextBox>&nbsp;
                                <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="RefurbCostInput"
                                    ErrorMessage="<%$ Resources : ServicePlanManagement,ErrorMessageNonNewCostValueInvalidDot %>"
                                    SetFocusOnError="True" ValidationGroup="ClaimedModelUpdate">*</asp:CustomValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right">
                                <asp:Label ID="Label58" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                    Text="<%$ Resources : Default,HeaderTextDeductible %>" Visible="false"></asp:Label>
                            </td>
                            <td style="">
                                <asp:TextBox ID="DeductibleTextBox" runat="server" CssClass="defaultTextBox" Width="140px"
                                    Visible="false" Text="<%$ Resources : Default,ListItemDoNotChange %>"></asp:TextBox>&nbsp;
                                <asp:CustomValidator ID="DeductibleCustomValidator" runat="server" ControlToValidate="DeductibleTextBox"
                                    ErrorMessage="<%$ Resources : ServicePlanManagement,ErrorMessageDeductibleValueInvalid %>"
                                    SetFocusOnError="True" ValidationGroup="ClaimedModelUpdate" Visible="false">*</asp:CustomValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right">
                                <asp:Label ID="Label60" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                    Text="<%$ Resources : Default,LabelDNR %>"></asp:Label>
                            </td>
                            <td style="white-space: nowrap">
                                <asp:RadioButton ID="DNRYes" runat="server" CssClass="defaultRadio" Text="<%$ Resources : Default,RadioButtonYes %>"
                                    GroupName="DNR" />&nbsp;<asp:RadioButton ID="DNRNo" runat="server" CssClass="defaultRadio"
                                        Text="<%$ Resources : Default,RadioButtonNo %>" GroupName="DNR" />&nbsp;<asp:RadioButton
                                            ID="DNRDoNotChange" runat="server" Checked="True" CssClass="defaultRadio" Text="<%$ Resources : Default,RadioButtonDoNotChange %>"
                                            GroupName="DNR" />
                            </td>
                        </tr>
                    </table>
                </td>
                <td style="height: 110px; width: 233px; padding-left: 5px;" valign="top" class="borderRight">
                    <asp:UpdatePanel ID="UpdatePanel3" runat="server" ChildrenAsTriggers="true">
                        <ContentTemplate>
                            <br />
                            <asp:Label ID="Label55" runat="server" CssClass="defaultLabel" Text="<%$ Resources : ClaimsManagement,LabelPrimary %>"></asp:Label>
                            <br />
                            <asp:DropDownList ID="PrimaryReplacementDropDown" runat="server" CssClass="defaultDropDownList"
                                onchange="DdlOnChange();" Width="218px">
                                <asp:ListItem Text="<%$ Resources : Default,ListItemDashDoNotChangeDash %>"></asp:ListItem>
                            </asp:DropDownList>
                            <br />
                            <asp:Label ID="Label21" runat="server" CssClass="defaultLabel" Text="<%$ Resources : Default,LabelCondition %>" />
                            <br />
                            <table style="padding: 0; margin: 0; margin-left: -4px;">
                                <tr>
                                    <td style="height: 18px; text-align: center">
                                        <asp:Label ID="PrimOrgLabel" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                            Text="<%$ Resources : Default,LabelHandsetOnly %>" />
                                    </td>
                                    <td style="height: 18px; text-align: center">
                                        <asp:Label ID="PrimRefLabel" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                            Text="<%$ Resources : Default,LabelNonNewKit %>" />
                                    </td>
                                    <td style="height: 18px; text-align: center">
                                        <asp:Label ID="PrimNewLabel" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                            Text="<%$ Resources : Default,LabelNewKit %>" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="height: 18px; text-align: center; float:left; margin-left: -1px;">
                                        <asp:DropDownList ID="PrimaryOrg" runat="server">
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemSSlashC %>" Value="N/C" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemY %>" Value="Y"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemN %>" Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td style="height: 18px; text-align: center;">
                                        <asp:DropDownList ID="PrimaryRef" runat="server">
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemSSlashC %>" Value="N/C" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemY %>" Value="Y"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemN %>" Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td style="height: 18px; text-align: center;">
                                        <asp:DropDownList ID="PrimaryNew" runat="server">
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemSSlashC %>" Value="N/C" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemY %>" Value="Y"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemN %>" Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
                <td style="width: 230px; height: 110px; padding-left: 5px;" valign="top" class="borderRight">
                    <asp:UpdatePanel ID="UpdatePanel4" runat="server" ChildrenAsTriggers="true">
                        <ContentTemplate>
                            <br />
                            <asp:Label ID="Label57" runat="server" CssClass="defaultLabel" Text="<%$ Resources : Default,HeaderTextSecondary %>"></asp:Label>
                            <br />
                            <asp:DropDownList ID="SecondaryReplacementDropDown" runat="server" CssClass="defaultDropDownList"
                                onchange="DdlOnChange();" Width="218px">
                                <asp:ListItem Text="<%$ Resources : Default,ListItemDashDoNotChangeDash %>"></asp:ListItem>
                            </asp:DropDownList>
                            <br />
                            <asp:Label ID="Label18" runat="server" CssClass="defaultLabel" Text="<%$ Resources : Default,LabelCondition %>" />
                            <br />
                            <table style="padding: 0; margin: 0;margin-left: -4px; ">
                                <tr>
                                    <td style="height: 18px; text-align: center">
                                        <asp:Label ID="SecOrgLabel" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                            Text="<%$ Resources : Default,LabelHandsetOnly %>"></asp:Label>
                                    </td>
                                    <td style="height: 18px; text-align: center">
                                        <asp:Label ID="SecRefLabel" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                            Text="<%$ Resources : Default,LabelNonNewKit %>"></asp:Label>
                                    </td>
                                    <td style="height: 18px; text-align: center">
                                        <asp:Label ID="SecNewLabel" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                            Text="<%$ Resources : Default,LabelNewKit %>"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="height: 18px; text-align: center;  float:left; margin-left: -1px;">
                                        <asp:DropDownList ID="SecondaryOrg" runat="server">
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemSSlashC %>" Value="N/C" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemY %>" Value="Y"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemN %>" Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td style="height: 18px; text-align: center;">
                                        <asp:DropDownList ID="SecondaryRef" runat="server">
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemSSlashC %>" Value="N/C" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemY %>" Value="Y"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemN %>" Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td style="height: 18px; text-align: center">
                                        <asp:DropDownList ID="SecondaryNew" runat="server">
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemSSlashC %>" Value="N/C" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemY %>" Value="Y"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemN %>" Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
                <td style="height: 110px; padding-left: 5px;" valign="top">
                    <asp:UpdatePanel ID="UpdatePanel5" runat="server" ChildrenAsTriggers="true">
                        <ContentTemplate>
                            <br />
                            <asp:Label ID="Label59" runat="server" CssClass="defaultLabel" Text="<%$ Resources : ClaimsManagement,LabelTertiary %>"></asp:Label>
                            <br />
                            <asp:DropDownList ID="TertiaryReplacementDropDown" runat="server" CssClass="defaultDropDownList"
                                onchange="DdlOnChange();" Width="218px">
                                <asp:ListItem Text="<%$ Resources : Default,ListItemDashDoNotChangeDash %>"></asp:ListItem>
                            </asp:DropDownList>
                            <br />
                            <asp:Label ID="Label22" runat="server" CssClass="defaultLabel" Text="<%$ Resources : Default,LabelCondition %>" />
                            <br />
                            <table style="padding: 0; margin: 0; margin-left: -4px;">
                                <tr>
                                    <td style="height: 18px; text-align: center">
                                        <asp:Label ID="TertOrgLabel" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                            Text="<%$ Resources : Default,LabelHandsetOnly %>"></asp:Label>
                                    </td>
                                    <td style="height: 18px; text-align: center">
                                        <asp:Label ID="TertRefLabel" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                            Text="<%$ Resources : Default,LabelNonNewKit %>"></asp:Label>
                                    </td>
                                    <td style="height: 18px; text-align: center">
                                        <asp:Label ID="TertNewLabel" runat="server" CssClass="defaultLabel" Font-Bold="False"
                                            Text="<%$ Resources : Default,LabelNewKit %>"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="height: 18px; text-align: center;  float:left; margin-left: -1px;">
                                        <asp:DropDownList ID="TertiaryOrg" runat="server">
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemSSlashC %>" Value="N/C" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemY %>" Value="Y"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemN %>" Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td style="height: 18px; text-align: center">
                                        <asp:DropDownList ID="TertiaryRef" runat="server">
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemSSlashC %>" Value="N/C" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemY %>" Value="Y"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemN %>" Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td style="height: 18px; text-align: center">
                                        <asp:DropDownList ID="TertiaryNew" runat="server">
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemSSlashC %>" Value="N/C" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemY %>" Value="Y"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources : Default,ListItemN %>" Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
                <td style="width: auto; height: 110px" valign="top">
                </td>
            </tr>
            <tr>
                <td colspan="1" style="padding-left: 150px; padding-bottom: 10px; height: 17px; margin-left: 67px;" valign="top">
                    &nbsp;<asp:Button ID="ClearHelperButton" runat="server" CssClass="defaultButton" style=" margin-left: 67px;"
                        Text="<%$ Resources : Default,ButtonClear %>" ValidationGroup="ClaimedModelUpdate"
                        Width="81px" OnClick="ClearHelperButton_Click" CausesValidation="false" />
                </td>
            </tr>
        </table>
    </div>
    <div style="width: 100%;">
        <asp:CustomValidator ID="ClaimedModelUpdateValidator1" runat="server" ErrorMessage=""
            Visible="false" ValidationGroup="ClaimedModelUpdate" /><br />
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="ClaimedModelUpdate"
            BorderStyle="none" />
    </div>
    <br />
    <div id="SelectActionForCheckedItems">
        <asp:Label ID="ModelsForCarrierLabel" runat="server" CssClass="headerTextBox" Text="<%$ Resources : ModelManagement,LabelModelsCarrier %>"></asp:Label><br />
        <hr class="defaultHR" />
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        <table width="100%">
            <tr>
                <td style="width: 500px; white-space: nowrap">
                    <asp:Label ID="Label19" runat="server" Text="<%$ Resources : ModelManagement,LabelActionTakeSelectedModelsColon %>"></asp:Label>&nbsp;
                    <asp:DropDownList ID="StatusDropDownField1" runat="server" Visible='true' CssClass="defaultDropDownList">
                        <asp:ListItem Value="Change Replacement" Text="<%$ Resources : Default,LabelChangeReplacement %>"></asp:ListItem>
                        <asp:ListItem Value="Open" Text="<%$ Resources : Default,ListItemOpen %>"></asp:ListItem>
                        <asp:ListItem Value="Approve" Text="<%$ Resources : Default,ListItemApproved %>"></asp:ListItem>
                        <asp:ListItem Value="Activate" Text="<% $ Resources : Default,ListItemActivate %>"></asp:ListItem>
                        <asp:ListItem Value="Change and Approve" Text="<%$ Resources : Default,ListItemChangeApprove %>"></asp:ListItem>
                        <asp:ListItem Value="Change and Activate" Text="<%$ Resources : Default,ListItemChangeActivate %>"
                            Selected="True"></asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;
                    <asp:Button ID="ProcessSelectedButton" runat="server" Text="<%$ Resources : Default,GoButtonText %>"
                        OnClick="ProcessSelectedButton_Click" ValidationGroup="ClaimedModelUpdate" />
                </td>
                <td>
                    <asp:CheckBox ID="IncludeNoMatrixCheckBox" runat="server" CssClass="defaultCheckbox"
                        OnCheckedChanged="IncludeNoMatrixCheckBox_CheckedChanged" Text="<%$ Resources : ModelManagement,LabelIncludeModelsWithNoHistory %>"
                        AutoPostBack="True" ValidationGroup="SearchValidation" Visible="False" />
                </td>
                <td>
                </td>
            </tr>
        </table>
        <div style="width: 100%;">
            <asp:Label ID="SuccessMessagelabel" runat="server" Text="" ForeColor="Green" Visible="false"
                Font-Bold="true"></asp:Label>
        </div>
    </div>
    <br />
    <br />
    <div id="csMain">
    <cc1:HitsSearchGridView ID="ModelsCustomGridview" runat="server" AutoGenerateColumns="False"
        AllowPaging="False" CellPadding="5" OnRowDataBound="ModelsCustomGridview_RowDataBound"
        OnSorting="ModelsCustomGridview_Sorting" OnMenuItemCommand="ModelsGridview_OnMenuItemCommand"
        ShowMenu="True" ShowSelectField="True" ShowActivateMenu="False" ShowDeActivateMenu="False"
        ShowEmailMenu="False" ShowPrintMenu="True" ShowHotlineMenu="False" ShowDeHotlineMenu="False"
        CustomPagerID="HitsPager1" ClientFunctionPrint="window.print();" ShowDeSelectMenu="true"
        ShowExportMenu="True" ShowSelectMenu="True" Width="100%" AtlasScriptManagerID=""
        ClientFunctionActivateSelected="" ClientFunctionDeActivateSelected="" ClientFunctionDeHotline=""
        ClientFunctionDelete="" ClientFunctionEmailSelected="" ClientFunctionExportSelected=""
        ClientFunctionHotline="" ClientFunctionSetStatus="" CssClassCustomPaging="" CssClassMenu="gridmenu"
        PropagateActionToChildID="" ShowDeleteMenu="false" ShowExportCSV="True" ShowExportCSVWithSummary="False"
        ShowExportXML="True" ShowExportXMLWithSummary="False" ShowSetStatus="False">
        <Columns>
            <asp:BoundField DataField="ClaimedModelID"></asp:BoundField>
            <%--1--%>
            <asp:BoundField DataField="PrimaryModelID"></asp:BoundField>
            <%--2--%>
            <asp:BoundField DataField="SecondaryModelID"></asp:BoundField>
            <%--3--%>
            <asp:BoundField DataField="TertiaryModelID"></asp:BoundField>
            <%--4--%>
            <asp:BoundField DataField="PrimaryOrg"></asp:BoundField>
            <%--5--%>
            <asp:BoundField DataField="PrimaryRef"></asp:BoundField>
            <%--6--%>
            <asp:BoundField DataField="PrimaryNew"></asp:BoundField>
            <%--7--%>
            <asp:BoundField DataField="SecondaryOrg"></asp:BoundField>
            <%--8--%>
            <asp:BoundField DataField="SecondaryRef"></asp:BoundField>
            <%--9--%>
            <asp:BoundField DataField="SecondaryNew"></asp:BoundField>
            <%--10--%>
            <asp:BoundField DataField="TertiaryOrg"></asp:BoundField>
            <%--11--%>
            <asp:BoundField DataField="TertiaryRef"></asp:BoundField>
            <%--12--%>
            <asp:BoundField DataField="TertiaryNew"></asp:BoundField>
            <%--13--%>
            <asp:BoundField DataField="EffectiveDate"></asp:BoundField>
            <%--14--%>
            <asp:TemplateField ItemStyle-Width="50px">
                <ItemStyle HorizontalAlign="Center" Width="50px" />
                <HeaderStyle HorizontalAlign="Center" />
                <HeaderTemplate>
                    <asp:Literal ID="StatusLabel" Text="<%$ Resources : AdministrationManagement,HeaderTextLoaderStatus %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortStatus" SortExpression="Status" runat="server" OnSortAscendingClicked="customSorter_SortClicked"
                        OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="StatusField" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--15 StatusField--%>
            <asp:TemplateField ItemStyle-Width="205px">
                <ItemStyle HorizontalAlign="Left" Width="205px" />
                <HeaderStyle HorizontalAlign="Left" />
                <HeaderTemplate>
                    <asp:Literal ID="ClaimedModelNameLabel" Text="<%$ Resources : ClaimsManagement,ColumnHeaderClaimedModel %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortClaimedModel" SortExpression="ClaimedModelName" runat="server"
                        OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="ClaimedModelNameField" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--16 ClaimedModelNameField--%>
            <asp:TemplateField ItemStyle-Width="60px">
                <ItemStyle CssClass="borderRight" HorizontalAlign="Right" Width="60px" />
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Center" Wrap="true" />
                <HeaderTemplate>
                    <asp:Literal ID="ProgramTypeLabel" Text="<%$ Resources : OrganizationManagement,LabelProgramType %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortProgramType" SortExpression="PROGRAM_TYPE_NAME" runat="server"
                        OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblProgramType" runat="server" />
                    <asp:HiddenField ID="hidProgramType" runat="server" Value="0" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--17 lblProgramType--%>
            <asp:TemplateField ItemStyle-Width="60px">
                <ItemStyle CssClass="borderRight" HorizontalAlign="Right" Width="60px" />
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Center" Wrap="true" />
                <HeaderTemplate>
                    <asp:Literal ID="TechTypeLabel" Text="<%$ Resources : OrganizationManagement,HeaderTextTechnologyType %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortTechType" SortExpression="TECH_TYPE" runat="server" OnSortAscendingClicked="customSorter_SortClicked"
                        OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblTechType" runat="server" />
                    <asp:HiddenField ID="hidTechType" runat="server" Value="0" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--18 lblTechType--%>
            <asp:TemplateField ItemStyle-Width="60px">
                <ItemStyle CssClass="borderRight" HorizontalAlign="Right" Width="60px" />
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Center" />
                <HeaderTemplate>
                    <asp:Literal ID="CostLabel" Text="<%$ Resources : ServicePlanManagement,LabelNewCost %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortCost" SortExpression="Cost" runat="server" OnSortAscendingClicked="customSorter_SortClicked"
                        OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="CostField" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--19 CostField--%>
            <asp:TemplateField ItemStyle-Width="60px">
                <ItemStyle CssClass="borderRight" HorizontalAlign="Right" Width="60px" />
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Center" />
                <HeaderTemplate>
                    <asp:Literal ID="RetailPriceNewLabel" Text="<%$ Resources : ServicePlanManagement,LabelRetailPriceNew %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortRetailPrice" SortExpression="RetailPriceNew" runat="server"
                        OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="RetailPriceNewField" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--20 RetailPriceField--%>
            <asp:TemplateField ItemStyle-Width="60px">
                <ItemStyle CssClass="borderRight" HorizontalAlign="Right" Width="60px" />
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Center" />
                <HeaderTemplate>
                    <asp:Literal ID="RefurbCostLabel" Text="<%$ Resources : ServicePlanManagement,LabelNonNewCost %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortRefurbCost" SortExpression="Refurb_Cost" runat="server"
                        OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="RefurbCostInfo" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--21 RefurbCostInfo--%>
            <asp:TemplateField ItemStyle-Width="60px">
                <ItemStyle CssClass="borderRight" HorizontalAlign="Right" Width="60px" />
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Center" />
                <HeaderTemplate>
                    <asp:Literal ID="RetailPriceNonNewLabel" Text="<%$ Resources : ServicePlanManagement,LabelNonRetailPriceNew %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortRetailValue" SortExpression="RetailPriceNonNew" runat="server"
                        OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="RetailPriceNonNewField" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--22 RetailValueField--%>
            <asp:TemplateField ItemStyle-Width="60px" Visible="false">
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Center" />
                <ItemStyle CssClass="borderRight" HorizontalAlign="Right" Width="60px" />
                <HeaderTemplate>
                    <asp:Literal ID="DeductibleLabel" Text="<%$ Resources : Default,ChargeGridDeductible %>"
                        runat="server" Visible="false" />
                    <br />
                    <uc:CustomSorter ID="SortDeductible" SortExpression="Deductible" Visible="false"
                        runat="server" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DeductibleField" runat="server" Visible="false" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--23 DeductibleField--%>
            <asp:TemplateField ItemStyle-Width="195px">
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Left" />
                <ItemStyle CssClass="borderRight" HorizontalAlign="Left" Width="195px" />
                <HeaderTemplate>
                    <asp:Literal ID="PrimaryModelNameLabel" Text="<%$ Resources : ModelManagement,LabelPrimaryModel %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortPrimaryModelName" SortExpression="PrimaryModelName" runat="server"
                        OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="PrimaryModelNameField" runat="server" />
                    <br />
                    <asp:Label ID="lblPrimaryModelTechType" runat="server"></asp:Label>
                    <asp:HiddenField ID="hidPrimaryTechType" runat="server" Value="0" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--24 PrimaryModelNameField--%>
            <asp:TemplateField>
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Left" />
                <ItemStyle CssClass="borderRight" HorizontalAlign="Left" />
                <HeaderTemplate>
                    <table>
                        <tr>
                            <td align="center">
                                <table>
                                    <tr>
                                        <td colspan="3" align="center">
                                            <span>
                                                <asp:Literal ID="Literal_LabelPrimaryOption" runat="server" Text="<%$ Resources : Default,LabelPrimaryOption %>"></asp:Literal></span>
                                        </td>
                                    </tr>
                                    <tr>
                                       <td align="center">
                                        <asp:Literal ID="litPrimaryHandsetOnlyHeader" runat="server" Text="<%$ Resources : Default,LabelHandsetOnly %>"></asp:Literal>
                                        </td>
                                        <td align="center">
                                              <asp:Literal ID="litPrimaryNonNewKitHeader" runat="server" Text="<%$ Resources : Default,LabelNonNewKit %>"></asp:Literal>
                                           
                                        </td>
                                        <td align="center">
                                              <asp:Literal ID="litPrimaryNewKitHeader" runat="server" Text="<%$ Resources : Default,LabelNewKit %>"></asp:Literal>
                                              
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </HeaderTemplate>
                <ItemTemplate>
                    <table width="150px">
                        <tr>
                            <td align="center">
                                <asp:Label ID="lblPrimaryOrg" runat="server"></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label ID="lblPrimaryRef" runat="server"></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label ID="lblPrimaryNew" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
            <%-- 25 --%>
            <asp:TemplateField ItemStyle-Width="195px">
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Left" />
                <ItemStyle CssClass="borderRight" HorizontalAlign="Left" Width="195px" />
                <HeaderTemplate>
                    <asp:Literal ID="SecondaryModelNameLabel" Text="<%$ Resources : ModelManagement,LabelSecondaryModel %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortSecondaryModelName" SortExpression="SecondaryModelName"
                        runat="server" OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="SecondaryModelNameField" runat="server" />
                    <br />
                    <asp:Label ID="lblSecondaryModelTechType" runat="server"></asp:Label>
                    <asp:HiddenField ID="hidSecondaryTechType" runat="server" Value="0" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--26 lblSecondaryModelTechType--%>
            <asp:TemplateField>
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Left" />
                <ItemStyle CssClass="borderRight" HorizontalAlign="Left" />
                <HeaderTemplate>
                    <table>
                        <tr>
                            <td align="center">
                                <table>
                                    <tr>
                                        <td colspan="3" align="center">
                                            <span>
                                                <asp:Literal ID="Literal_LabelSecondaryOption" runat="server" Text="<%$ Resources : Default,LabelSecondaryOption %>"></asp:Literal></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center">
                                            <asp:Literal ID="litSecOrgHeader" runat="server" Text="<%$ Resources : Default,LabelHandsetOnly %>"></asp:Literal>
                                        </td>
                                        <td align="center">
                                              <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources : Default,LabelNonNewKit %>"></asp:Literal>
                                           
                                        </td>
                                        <td align="center">
                                              <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources : Default,LabelNewKit %>"></asp:Literal>
                                              
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </HeaderTemplate>
                <ItemTemplate>
                     <table width="150px">
                        <tr>
                            <td align="center">
                                <asp:Label ID="lblSecondaryOrg" runat="server"></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label ID="lblSecondaryRef" runat="server"></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label ID="lblSecondaryNew" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
            <%-- 27 --%>
            <asp:TemplateField ItemStyle-Width="">
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Left" />
                <ItemStyle CssClass="borderRight" HorizontalAlign="Left" Width="" />
                <HeaderTemplate>
                    <asp:Literal ID="TertiaryModelNameLabel" Text="<%$ Resources : ModelManagement,LabelTertiaryModel %>"
                        runat="server" />
                    <br />
                    <uc:CustomSorter ID="SortTertiaryModelName" SortExpression="TertiaryModelName" runat="server"
                        OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="TertiaryModelNameField" runat="server" />
                    <br />
                    <asp:Label ID="lblTertiaryModelTechType" runat="server"></asp:Label>
                    <asp:HiddenField ID="hidTertiaryTechType" runat="server" Value="0" />
                </ItemTemplate>
            </asp:TemplateField>
            <%--28 lblTertiaryModelTechType--%>
            <asp:TemplateField>
                <HeaderStyle CssClass="borderRight" HorizontalAlign="Left" />
                <ItemStyle CssClass="borderRight" HorizontalAlign="Left" />
                <HeaderTemplate>
                    <table>
                        <tr>
                            <td align="center">
                                <table>
                                    <tr>
                                        <td colspan="3" align="center">
                                            <span>
                                                <asp:Literal ID="Literal_LabelTertiaryOption" runat="server" Text="<%$ Resources : Default,LabelTertiaryOption %>"></asp:Literal></span>
                                        </td>
                                    </tr>
                                    <tr>
                                      <td align="center">
                                            <asp:Literal ID="litTertOrgHeader" runat="server" Text="<%$ Resources : Default,LabelHandsetOnly %>"></asp:Literal>
                                        </td>
                                        <td align="center">
                                              <asp:Literal ID="litTertNonNewKitHeader" runat="server" Text="<%$ Resources : Default,LabelNonNewKit %>"></asp:Literal>
                                           
                                        </td>
                                        <td align="center">
                                              <asp:Literal ID="litTertNewKitHeader" runat="server" Text="<%$ Resources : Default,LabelNewKit %>"></asp:Literal>
                                              
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </HeaderTemplate>
                <ItemTemplate>
                     <table width="150px">
                        <tr>
                            <td align="center">
                                <asp:Label ID="lblTertiaryOrg" runat="server"></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label ID="lblTertiaryRef" runat="server"></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label ID="lblTertiaryNew" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
            <%-- 29 --%>
            <asp:BoundField DataField="DNR"></asp:BoundField>
            <%-- 30 DNR --%>
        </Columns>
        <HeaderStyle Font-Size=".9em" Font-Bold="true" HorizontalAlign="Center" />
        <AlternatingRowStyle Font-Size=".9em" />
        <RowStyle Font-Size=".9em" />
    </cc1:HitsSearchGridView></div>
    <asp:HiddenField ID="PrimaryChanged" runat="server" Value="false" />
    <asp:HiddenField ID="SecondaryChanged" runat="server" Value="false" />
    <asp:HiddenField ID="TertiaryChanged" runat="server" Value="false" />
    <asp:CustomValidator ID="TechTypeValidator" runat="server" OnServerValidate="TechTypeValidator_ServerValidate"
        Display="None" ValidationGroup="ClaimedModelUpdate"></asp:CustomValidator>
</asp:Content>