<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.StateProvincesControl"
    CodeBehind="StateProvinces.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="ToolTipLabel" Src="ToolTipLabelControl.ascx" %>
<div class="section-header">
    <div class="title">
        <img src="Common/ico-configuration.png" alt="Configuration" />
        States / Provinces
    </div>
    <div class="options">
        <asp:Button ID="AddButton" runat="server" Text="Add new" CssClass="adminButtonBlue"
            OnClick="AddButton_Click" ToolTip="Add a new state/province" />
    </div>
</div>
<table>
    <tr>
        <td class="adminTitle">
            <nopCommerce:ToolTipLabel runat="server" ID="lblSelectCountry" Text="Select country:"
                ToolTip="Select a country to view it's states/provinces." ToolTipImage="~/Administration/Common/ico-help.gif" />
        </td>
        <td class="adminData">
            <asp:DropDownList ID="ddlCountry" runat="server" CssClass="adminInput" AutoPostBack="true"
                OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged" ToolTip="Select  a country to view it's states/provinces">
            </asp:DropDownList>
        </td>
    </tr>
</table>
<p>
</p>
<asp:GridView ID="gvStateProvinces" runat="server" AutoGenerateColumns="False" Width="100%">
    <Columns>
        <asp:BoundField DataField="StateProvinceID" HeaderText="StateProvinceID" Visible="False">
        </asp:BoundField>
        <asp:TemplateField HeaderText="Name" ItemStyle-Width="50%">
            <ItemTemplate>
                <a href="StateProvinceDetails.aspx?StateProvinceID=<%#Eval("StateProvinceID")%>"
                    title="Edit state/province">
                    <%#Server.HtmlEncode(Eval("Name").ToString())%>
                </a>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Abbreviation" HeaderText="Abbreviation" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="16%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
        <asp:BoundField DataField="DisplayOrder" HeaderText="Display order" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="16%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
        <asp:TemplateField HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="16%"
            ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <a href="StateProvinceDetails.aspx?StateProvinceID=<%#Eval("StateProvinceID")%>"
                    title="Edit state/province">Edit </a>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
