<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.ManufacturerProductsControl"
    CodeBehind="ManufacturerProducts.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="NumericTextBox" Src="NumericTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="SimpleTextBox" Src="SimpleTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="ToolTipLabel" Src="ToolTipLabelControl.ascx" %>
<table class="adminContent">
    <tr>
        <td width="100%">
            <asp:UpdatePanel ID="upProductManufacturerMappings" runat="server">
                <ContentTemplate>
                    <nopCommerce:NopDataPagerGridView ID="gvProductManufacturerMappings" runat="server"
                        AutoGenerateColumns="false" Width="100%" OnPageIndexChanging="gvProductManufacturerMappings_PageIndexChanging"
                        AllowPaging="true">
                        <Columns>
                            <asp:TemplateField HeaderText="Product" ItemStyle-Width="60%">
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbProductInfo" runat="server" Text='<%#Server.HtmlEncode(Eval("ProductInfo").ToString()) %>'
                                        Checked='<%# Eval("IsMapped") %>' ToolTip="Add this product to the manufacturer" />
                                    <asp:HiddenField ID="hfProductID" runat="server" Value='<%# Eval("ProductID") %>' />
                                    <asp:HiddenField ID="hfProductManufacturerID" runat="server" Value='<%# Eval("ProductManufacturerID") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="View" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="13%"
                                ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <a href='ProductDetails.aspx?ProductID=<%# Eval("ProductID") %>' title="View product details">
                                        View</a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Featured Product" HeaderStyle-HorizontalAlign="Center"
                                ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbFeatured" runat="server" Checked='<%# Eval("IsFeatured") %>'
                                        ToolTip="Make this a featured product for the manufacturer" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Display order" HeaderStyle-HorizontalAlign="Center"
                                ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <nopCommerce:NumericTextBox runat="server" CssClass="adminInput" Width="50px" ID="txtDisplayOrder"
                                        Value='<%# Eval("DisplayOrder") %>' RequiredErrorMessage="Display order is required"
                                        RangeErrorMessage="The value must be from -99999 to 99999" MinimumValue="-99999"
                                        MaximumValue="99999"></nopCommerce:NumericTextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </nopCommerce:NopDataPagerGridView>
                    <div class="pager">
                        <asp:DataPager ID="pagerProductManufacturerMappings" runat="server" PageSize="15"
                            PagedControlID="gvProductManufacturerMappings">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonCssClass="command" FirstPageText="«" PreviousPageText="‹"
                                    RenderDisabledButtonsAsLabels="true" ShowFirstPageButton="true" ShowPreviousPageButton="true"
                                    ShowLastPageButton="false" ShowNextPageButton="false" />
                                <asp:NumericPagerField ButtonCount="7" NumericButtonCssClass="command" CurrentPageLabelCssClass="current"
                                    NextPreviousButtonCssClass="command" />
                                <asp:NextPreviousPagerField ButtonCssClass="command" LastPageText="»" NextPageText="›"
                                    RenderDisabledButtonsAsLabels="true" ShowFirstPageButton="false" ShowPreviousPageButton="false"
                                    ShowLastPageButton="true" ShowNextPageButton="true" />
                            </Fields>
                        </asp:DataPager>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:UpdateProgress ID="updateProgressManufacturerProductMappings" runat="server"
                AssociatedUpdatePanelID="upProductManufacturerMappings">
                <ProgressTemplate>
                    <div class="progress">
                        <asp:Image ID="imgUpdateProgress" runat="server" ImageUrl="~/images/UpdateProgress.gif" />
                        Wait .....
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
        </td>
    </tr>
</table>
