<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.RelatedProductsControl"
    CodeBehind="RelatedProducts.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" %>
<asp:UpdatePanel ID="upRelatedProducts" runat="server">
    <ContentTemplate>
        <nopCommerce:NopDataPagerGridView ID="gvRelatedProducts" runat="server" AutoGenerateColumns="false"
            Width="100%" OnPageIndexChanging="gvRelatedProducts_PageIndexChanging" AllowPaging="true">
            <Columns>
                <asp:TemplateField HeaderText="Product" ItemStyle-Width="60%">
                    <ItemTemplate>
                        <asp:CheckBox ID="cbProductInfo2" runat="server" Text='<%# Server.HtmlEncode(Eval("ProductInfo2").ToString()) %>'
                            Checked='<%# Eval("IsMapped") %>' ToolTip="Mark this product as a related product" />
                        <asp:HiddenField ID="hfProductID2" runat="server" Value='<%# Eval("ProductID2") %>' />
                        <asp:HiddenField ID="hfRelatedProductID" runat="server" Value='<%# Eval("RelatedProductID") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="View" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="20%"
                    ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <a href='ProductDetails.aspx?ProductID=<%# Eval("ProductID2") %>' title="View product details">
                            View</a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Display order" HeaderStyle-HorizontalAlign="Center"
                    ItemStyle-Width="20%" 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="pagerRelatedProducts" runat="server" PageSize="15" PagedControlID="gvRelatedProducts">
                <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="updateProgressRelatedProducts" runat="server" AssociatedUpdatePanelID="upRelatedProducts">
    <ProgressTemplate>
        <div class="progress">
            <asp:Image ID="imgUpdateProgress" runat="server" ImageUrl="~/images/UpdateProgress.gif" />
            Wait .....
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>
