<%@ Page Title="Products" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="UnboundProducts.aspx.vb" Inherits="Northwind45.UnboundProducts" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <%: Scripts.Render("~/Scripts/jquery.validate.min.js"%>
    <%: Scripts.Render("~/Scripts/jquery.metadata.min.js"%>
    <%: Scripts.Render("~/Scripts/unbound-addrecord-script.js"%>
    <script type="text/javascript">
        $(function () {
            InitializeValidation();
        });
    </script>
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
        <div id="errorDialog" title="Error on item insertion!"></div>
 
        <h3 id="h3AddEditRecord" class="ui-widget-header"><asp:Label ID="LblTitle" Text="Add New Products" runat="server" /></h3>
        <table>
            <asp:Panel ID="PnlPrimaryKey" runat="server">
            <tr>
                <td>Product ID:</td>
                <td></td>
                <td colspan="2"><asp:TextBox ID="TxtProductID" runat="server" /></td>
            </tr>
            </asp:Panel>
            <tr>
                <td>Product Name:</td>
                <td>&nbsp;<span style="colorred;">*</span>&nbsp;</td>
                <td><asp:TextBox ID="TxtProductName" MaxLength="0" CssClass="{required:true, messages:{required:'Product Name is required!'}}" runat="server" /></td>
                <td></td>
            </tr>
            <tr>
                <td>Supplier ID:</td>
                <td></td>
                <td><asp:DropDownList ID="DdlSupplierID" CssClass="{number:true, messages:{number:'Supplier ID is an invalid number!'}}" runat="server"><asp:ListItem Value="">Select One</asp:ListItem></asp:DropDownList></td>
                <td></td>
            </tr>
            <tr>
                <td>Category ID:</td>
                <td></td>
                <td><asp:DropDownList ID="DdlCategoryID" CssClass="{number:true, messages:{number:'Category ID is an invalid number!'}}" runat="server"><asp:ListItem Value="">Select One</asp:ListItem></asp:DropDownList></td>
                <td></td>
            </tr>
            <tr>
                <td>Quantity Per Unit:</td>
                <td></td>
                <td colspan="2"><asp:TextBox ID="TxtQuantityPerUnit" MaxLength="0" runat="server" /></td>
            </tr>
            <tr>
                <td>Unit Price:</td>
                <td></td>
                <td><asp:TextBox ID="TxtUnitPrice" CssClass="{number:true, messages:{number:'Unit Price is an invalid number!'}}" runat="server" /></td>
                <td></td>
            </tr>
            <tr>
                <td>Units In Stock:</td>
                <td></td>
                <td><asp:TextBox ID="TxtUnitsInStock" CssClass="{number:true, messages:{number:'Units In Stock is an invalid number!'}}" runat="server" /></td>
                <td></td>
            </tr>
            <tr>
                <td>Units On Order:</td>
                <td></td>
                <td><asp:TextBox ID="TxtUnitsOnOrder" CssClass="{number:true, messages:{number:'Units On Order is an invalid number!'}}" runat="server" /></td>
                <td></td>
            </tr>
            <tr>
                <td>Reorder Level:</td>
                <td></td>
                <td><asp:TextBox ID="TxtReorderLevel" CssClass="{number:true, messages:{number:'Reorder Level is an invalid number!'}}" runat="server" /></td>
                <td></td>
            </tr>
            <tr>
                <td>Discontinued:</td>
                <td>&nbsp;<span style="colorred;">*</span>&nbsp;</td>
                <td colspan="2"><asp:CheckBox ID="CbxDiscontinued" runat="server" /></td>
            </tr>
            <tr>
                <td colspan="2"></td>
                <td colspan="2">
                    <asp:Button ID="BtnAddRecord" Text="Add Record" runat="server" OnClick="BtnAddRecord_Click" />
                    <asp:Button ID="BtnUpdateRecord" Text="Update Record" runat="server" Visible="false" OnClick="BtnUpdateRecord_Click" />
                    &nbsp;<input id="inpCancel" type="button" value="Cancel" onclick="window.location = 'GridViewProducts.aspx'return false;" />
                </td>
            </tr>
        </table> 
</asp:Content>