<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.ProductVariantTierPricesControl"
    CodeBehind="ProductVariantTierPrices.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="NumericTextBox" Src="NumericTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="DecimalTextBox" Src="DecimalTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="ToolTipLabel" Src="ToolTipLabelControl.ascx" %>
<br />
Tier prices are applied only to product variant price (and not applied to product
attributes).
<br />
<br />
<asp:GridView ID="gvTierPrices" runat="server" AutoGenerateColumns="false" DataKeyNames="TierPriceID"
    OnRowDeleting="gvTierPrices_RowDeleting" OnRowDataBound="gvTierPrices_RowDataBound"
    OnRowCommand="gvTierPrices_RowCommand" Width="100%">
    <Columns>
        <asp:TemplateField HeaderText="Quantity" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="30%"
            ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <nopCommerce:NumericTextBox runat="server" CssClass="adminInput" ID="txtQuantity"
                    Value='<%# Eval("Quantity") %>' RequiredErrorMessage="Quantity is required" RangeErrorMessage="The value must be from 0 to 99999"
                    ValidationGroup="TierPrice" MinimumValue="1" MaximumValue="99999" Width="50px">
                </nopCommerce:NumericTextBox>
                and above.
                <asp:HiddenField ID="hfTierPriceID" runat="server" Value='<%# Eval("TierPriceID") %>' />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Price" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="30%"
            ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <nopCommerce:DecimalTextBox runat="server" CssClass="adminInput" ID="txtPrice" Value='<%# Eval("Price") %>'
                    RequiredErrorMessage="Price is required" MinimumValue="0" MaximumValue="999999"
                    RangeErrorMessage="The value must be from 0 to 999999" ValidationGroup="TierPrice"
                    Width="100px">
                </nopCommerce:DecimalTextBox>
                [<%=CurrencyManager.PrimaryStoreCurrency.CurrencyCode%>]
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Update" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="15%"
            ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Button ID="btnUpdate" runat="server" CssClass="adminButton" Text="Update" ValidationGroup="TierPrice"
                    CommandName="UpdateTierPrice" ToolTip="Update tier price" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Delete" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="15%"
            ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Button ID="btnDeleteProductVariantAttribute" runat="server" CssClass="adminButton"
                    Text="Delete" CausesValidation="false" CommandName="Delete" ToolTip="Delete tier price" />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<p>
    <strong>Add tier price </strong>
</p>
<table class="adminContent">
    <tr>
        <td class="adminTitle">
            <nopCommerce:ToolTipLabel runat="server" ID="lblNewQuantity" Text="Quantity:" ToolTip="Enter quantity of product variant"
                ToolTipImage="~/Administration/Common/ico-help.gif" />
        </td>
        <td class="adminData">
            <nopCommerce:NumericTextBox runat="server" CssClass="adminInput" ID="txtNewQuantity"
                RequiredErrorMessage="Quantity is required" RangeErrorMessage="The value must be from 0 to 99999"
                ValidationGroup="NewTierPrice" MinimumValue="1" MaximumValue="99999" Value="2"
                Width="50px">
            </nopCommerce:NumericTextBox>
            and above.
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            <nopCommerce:ToolTipLabel runat="server" ID="lblNewPrice" Text="Price:" ToolTip="Price per item."
                ToolTipImage="~/Administration/Common/ico-help.gif" />
        </td>
        <td class="adminData">
            <nopCommerce:DecimalTextBox runat="server" CssClass="adminInput" ID="txtNewPrice"
                Value="0" RequiredErrorMessage="Price is required" MinimumValue="0" MaximumValue="999999"
                RangeErrorMessage="The value must be from 0 to 999999" ValidationGroup="NewTierPrice"
                Width="50px">
            </nopCommerce:DecimalTextBox>
            [<%=CurrencyManager.PrimaryStoreCurrency.CurrencyCode%>]
        </td>
    </tr>
    <tr>
        <td colspan="2" align="left">
            <asp:Button runat="server" ID="btnNewTierPrice" CssClass="adminButton" Text="Add tier price"
                ValidationGroup="NewTierPrice" OnClick="btnNewTierPrice_Click" ToolTip="Add tier price" />
        </td>
    </tr>
</table>
