<%@ Page Title="" Language="C#" MasterPageFile="~/masterpages/eDashboard.master"
    AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="WebSite.site.Administrative.RatePlans.Search" %>

<%@ Register Src="~/Controls/ScriptingHelper.ascx" TagName="ScriptingHelper" TagPrefix="uc" %>
<%@ Register Src="~/Controls/DefaultHeader.ascx" TagName="DefaultHeader" TagPrefix="uc" %>
<%@ Register Src="~/Controls/CustomSorter.ascx" TagName="CustomSorter" TagPrefix="uc" %>
<%@ Register Assembly="eSecuritel.HITS.UI.Components" Namespace="eSecuritel.HITS.UI.Components" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="eContent" runat="Server">
    <script src="../../../script/eSetFormControls.js" type="text/javascript"></script>
    <script src="../../../script/eGridHelper.js" type="text/javascript"></script>
    <uc:ScriptingHelper ID="ScriptingHelper1" runat="server" />

    <h1>
        <asp:Literal ID="m_litHeader" runat="server" Text="<%$ Resources: Default, LabelHITSSubMenuServicePlan %>" />
    </h1>
    <uc:DefaultHeader ID="DefaultHeader1" runat="server" />

    <div id="m_pnlMasterSearchCriteria" style="background-color: #DBDCDE">
        <table border="0" cellpadding="0" cellspacing="0" class="gvTable">
            <tr>
                <td align="right" style="width:13%">
                    <asp:Label ID="Label2" runat="server" Text="<%$ Resources: OrganizationManagement, LabelOrganizationNameColon %>"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="ddl_ClientList" DataTextField="OrganizationName"
                        DataValueField="OrganizationId" Width="66%"/>
                </td>
                <td style="width: 60%"></td>
                <td></td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Literal ID="m_litPageSize" runat="server" Text="<%$ Resources: Default, LabelRecordsPerPageColon %>" />
                </td>
                <td>
                    <asp:DropDownList ID="m_ddlPageSize" runat="server">
                    </asp:DropDownList>
                </td>
                <td></td>
                <td></td>
            </tr>
        </table>
    </div>

    <div style="text-align: center">
        <asp:Button ID="m_btnSearch" runat="server" Text="<%$ Resources: Default, ButtonSearch %>" CssClass="pagebutton"
            Font-Bold="False" OnClick="m_btnSearch_Click" />
    </div>

       <asp:Panel ID="m_pnlSearchResults" runat="server" >   
        <h2>
            <asp:Literal ID="m_litSearchResultsHeader" runat="server" Text="<%$ Resources: Default, LabelSearchResults %>"/>
        </h2>
    </asp:Panel>


    <div class="gvTable" style="width:100%">
        <asp:Panel ID="m_grdAllComponents" Visible="False" runat="server">
            <cc1:HitsSearchGridView ID="grdAllComponents" runat="server" AutoGenerateColumns="False" AllowPaging="true" DataSourceID="m_objOrgDataSource"
                OnRowDataBound="grdAllComponents_RowDataBound" 
                ShowMenu="false" ShowHotlineMenu="False" ShowDeHotlineMenu="False" CustomPagerID="HitsPager1"
                ShowSelectField="false" ClientFunctionPrint="window.print();" AtlasScriptManagerID=""
                ClientFunctionActivateSelected="" ClientFunctionDeActivateSelected="" ClientFunctionDeHotline=""
                ClientFunctionDelete="" ClientFunctionEmailSelected="" ClientFunctionExportSelected=""
                ClientFunctionHotline="" CssClassCustomPaging="" CssClassMenu="" PropagateActionToChildID=""
                ShowActivateMenu="True" ShowDeActivateMenu="True" ShowDeleteMenu="True" ShowDeSelectMenu="false" 
                ShowEmailMenu="True" ShowExportCSV="True" ShowExportCSVWithSummary="False" ShowExportMenu="True"
                ShowExportXML="True" ShowExportXMLWithSummary="False" ShowPrintMenu="True" ShowSelectMenu="True"
                OnPageIndexChanging="grdAllComponents_PageIndexChanging" OnCustomPageIndexChanging="grdAllComponents_PageIndexChanging"
                ClientFunctionSetStatus="" ShowSetStatus="False" Width="100%">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <div>
                                <asp:Literal ID="m_litRatePlanCode" Text="<%$ Resources: ServicePlanManagement, LabelRatePlanCode %>" runat="server" />
                                <br />
                            </div>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <div>
                                    <asp:LinkButton runat="server" ID="lnkRatePlanCode"></asp:LinkButton>
                            </div>
                        </ItemTemplate>
                        <ItemStyle Width="20%" Wrap="true" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <div>
                                <asp:Literal ID="m_litRatePlanPrice"  Text="<%$ Resources: ServicePlanManagement, LabelServicePlanName %>" runat="server" />
                                <br />
                            </div>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <div>
                                <asp:Label ID="m_lblRatePlanName" runat="server"></asp:Label>
                            </div>
                        </ItemTemplate>
                        <ItemStyle  Wrap="true" />
                    </asp:TemplateField>
                    <asp:TemplateField Visible="False">
                        <HeaderTemplate>
                            <div >
                                <asp:Literal ID="m_litCompanyId" Text="<%$ Resources: OrganizationManagement, CompanyIDTableHeader %>" runat="server" />
                                <br />
                            </div>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <div>
                                <asp:Label ID="m_lblCompanyId" runat="server"></asp:Label>
                            </div>
                        </ItemTemplate>
                        <ItemStyle  Wrap="true" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <div  >
                                <asp:Literal ID="m_litPeriodType" Text="<%$ Resources: ServicePlanManagement, LabelServicePlanPeriod %>" runat="server" />
                                <br />
                            </div>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <div>
                                <asp:Label ID="m_lblPeriodType" runat="server"></asp:Label>
                            </div>
                        </ItemTemplate>
                        <ItemStyle Width="8%" Wrap="true" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <div >
                                <asp:Literal ID="m_litEndDate" Text="<%$ Resources: ServicePlanManagement, LabelEndDate %>" runat="server" />
                                <br />
                            </div>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <div>
                                <asp:Label ID="m_lblEndDate" runat="server"></asp:Label>
                            </div>
                        </ItemTemplate>
                        <ItemStyle Width="8%"  Wrap="true" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <div>
                                <asp:Literal ID="m_litLowerBound" Text="<%$ Resources: ServicePlanManagement, LabelLowerBound %>" runat="server" />
                                <br />
                            </div>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <div class="" >
                                <asp:Label ID="m_lblLowerBound" runat="server"></asp:Label>
                            </div>
                        </ItemTemplate>
                        <ItemStyle Width="8%" Wrap="true" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <div>
                                <asp:Literal ID="m_litUpperBound" Text="<%$ Resources: ServicePlanManagement, LabelUpperBound %>" runat="server" />
                                <br />
                            </div>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <div>
                                <asp:Label ID="m_lblUpperBound" runat="server"></asp:Label>
                            </div>
                        </ItemTemplate>
                        <ItemStyle Width="8%" Wrap="true" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <div>
                                <asp:Literal ID="m_litFeatures" Text="<%$ Resources: ServicePlanManagement, LabelFeatures %>" runat="server" />
                                <br />
                            </div>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <div>
                                <asp:Label ID="m_lblFeatures" runat="server"></asp:Label>
                            </div>
                        </ItemTemplate>
                        <ItemStyle Wrap="true" />
                    </asp:TemplateField>
                </Columns>
                <PagerTemplate>
                    <cc1:HitsPager ID="HitsPager1" runat="server" GoButtonText="<%$ Resources : Default, GoButtonText %>" />
                </PagerTemplate>
                <PagerSettings Mode="NumericFirstLast" />
                <RowStyle HorizontalAlign="Left" VerticalAlign="Top" />
                <EditRowStyle HorizontalAlign="Left" VerticalAlign="Top" />
            </cc1:HitsSearchGridView>
        </asp:Panel>
    </div>

        <asp:Label ID="m_lblNoResultsFound" Font-Bold="True" ForeColor="Red" runat="server"
        Visible="False" Text="<%$ Resources: OrganizationManagement, LabelNoResultsFound %>"/>

    <asp:ObjectDataSource ID="m_objOrgDataSource" runat="server" SelectMethod="Select" OnSelecting="m_objOrgDataSource_Selecting"
        SelectCountMethod="SelectCount" TypeName="RatePlansDataSource" EnablePaging="True">
        <SelectParameters>
            <asp:Parameter Name="companySearchCriteria" Type="Object" DefaultValue="null" />
            <asp:ControlParameter Name="startRowIndex" PropertyName="PageIndex" Type="Int32" DefaultValue="1" ControlID="grdAllComponents"  />
            <asp:Parameter Name="maximumRows" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

</asp:Content>

