@using ACG6MvcAdHcApi.Domain;
@model ACG6MvcAdHcApi.ViewModels.ProductViewModel
 
@section AdditionalJavaScript {
    @await Html.PartialAsync("_ValidationScriptsPartial")
}
 
<h2>Unbound Record</h2>
<div>
<form asp-controller="@Model.ViewControllerName" asp-action="@Model.ViewActionName" asp-route-returnUrl="@Model.ViewReturnUrl" method="post">
 
    <div>
        <fieldset>
            <legend></legend>
            <table>
                <tr>
                    <td class="editor-label"><label asp-for="Product.ProductName"></label>:</td>
                    <td><span style="color: red;">*</span></td>
                    <td class="editor-field"><input asp-for="Product.ProductName" /></td>
                    <td class="editor-field"><span asp-validation-for="Product.ProductName"></span></td>
                </tr>
                <tr>
                    <td class="editor-label"><label asp-for="Product.SupplierID"></label>:</td>
                    <td></td>
                    <td class="editor-field"><select asp-for="Product.SupplierID"><option value="">Select One</option></select></td>
                    <td class="editor-field"><span asp-validation-for="Product.SupplierID"></span></td>
                </tr>
                <tr>
                    <td class="editor-label"><label asp-for="Product.CategoryID"></label>:</td>
                    <td></td>
                    <td class="editor-field"><select asp-for="Product.CategoryID"><option value="">Select One</option></select></td>
                    <td class="editor-field"><span asp-validation-for="Product.CategoryID"></span></td>
                </tr>
                <tr>
                    <td class="editor-label"><label asp-for="Product.QuantityPerUnit"></label>:</td>
                    <td></td>
                    <td class="editor-field"><input asp-for="Product.QuantityPerUnit" /></td>
                    <td class="editor-field"><span asp-validation-for="Product.QuantityPerUnit"></span></td>
                </tr>
                <tr>
                    <td class="editor-label"><label asp-for="Product.UnitPrice"></label>:</td>
                    <td></td>
                    <td class="editor-field"><input asp-for="Product.UnitPrice" /></td>
                    <td class="editor-field"><span asp-validation-for="Product.UnitPrice"></span></td>
                </tr>
                <tr>
                    <td class="editor-label"><label asp-for="Product.UnitsInStockHidden"></label>:</td>
                    <td></td>
                    <td class="editor-field"><input asp-for="Product.UnitsInStockHidden" /></td>
                    <td class="editor-field"><span asp-validation-for="Product.UnitsInStockHidden"></span></td>
                </tr>
                <tr>
                    <td class="editor-label"><label asp-for="Product.UnitsOnOrderHidden"></label>:</td>
                    <td></td>
                    <td class="editor-field"><input asp-for="Product.UnitsOnOrderHidden" /></td>
                    <td class="editor-field"><span asp-validation-for="Product.UnitsOnOrderHidden"></span></td>
                </tr>
                <tr>
                    <td class="editor-label"><label asp-for="Product.ReorderLevelHidden"></label>:</td>
                    <td></td>
                    <td class="editor-field"><input asp-for="Product.ReorderLevelHidden" /></td>
                    <td class="editor-field"><span asp-validation-for="Product.ReorderLevelHidden"></span></td>
                </tr>
                <tr>
                    <td class="editor-label"><label asp-for="Product.Discontinued"></label>:</td>
                    <td><span style="color: red;">*</span></td>
                    <td class="editor-field"><input asp-for="Product.Discontinued" type="checkbox" /></td>
                    <td class="editor-field"><span asp-validation-for="Product.Discontinued"></span></td>
                </tr>
                <tr>
                    <td colspan="2"></td>
                    <td colspan="2">
                        <br />
                        <input type="submit" value="Submit" class="button-150" />
 
                        @if(Model.ViewReturnUrl != null)
                        {
                            <input type="button" value ="Cancel" onclick="window.location='@Model.ViewReturnUrl'; return false;" class="button-100" />
                        }
                        else
                        {
                            <input type="button" value="Cancel" onclick="window.location='@Url.Action("Index""Home")'; return false;" class="button-100" />
                        }
                    </td>
                </tr>
            </table>
        </fieldset>
    </div>
</form>
</div>