Newer
Older
CRUDTask / AspNetCore / Views / ProductCrud / GetProduct.cshtml
@Derek Comartin Derek Comartin on 29 Dec 2021 3 KB Init
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@model Catalog.CatalogProduct
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
    <title>CRUD</title>
  </head>
  <body style="padding-top: 50px;">

  <form method="post" action="@Url.Action("UpdateProduct", "ProductCrud", new { Model.Sku })">
      <div class="container">
          <form>
              <div class="mb-3">
                  <label class="form-label">SKU</label>
                  <div class="row">
                      <label class="form-label"><strong>@Model.Sku</strong></label>
                  </div>
              </div>
              <div class="mb-3">
                  <label class="form-label">Name</label>
                  <input type="text" class="form-control" name="Name" asp-for="Name"/>
              </div>
              <div class="mb-3">
                  <label class="form-label">Description</label>
                  <textarea class="form-control" name="Description" asp-for="Description"></textarea>
              </div>
              <div class="row mb-3">
                  <div class="col-sm">
                      <label class="form-label">Price</label>
                      <div class="input-group">
                          <span class="input-group-text">$</span>
                          <input type="text" class="form-control" aria-label="50"name="Price" asp-for="Price">
                          <span class="input-group-text">CAD</span>
                      </div>
                  </div>
                  <div class="col-sm">
                      <label class="form-label">Cost</label>
                      <div class="input-group">
                          <span class="input-group-text">$</span>
                          <input type="text" class="form-control" aria-label="50" name="Cost" asp-for="Cost">
                          <span class="input-group-text">CAD</span>
                      </div>
                  </div>
                  <div class="col-sm">
                      <label class="form-label">Quantity</label>
                      <input type="text" class="form-control" name="QuantityOnHand" asp-for="QuantityOnHand">
                  </div>
              </div>
              <div class="mb-3">
                  <label class="form-label">For Sale</label>
                  <div class="form-check form-switch">
                      <input class="form-check-input" type="checkbox" name="ForSale" asp-for="ForSale">
                  </div>
              </div>
              <div class="mb-3">
                  <label class="form-label">Free Shippping</label>
                  <div class="form-check form-switch">
                      <input class="form-check-input" type="checkbox" name="FreeShipping" asp-for="FreeShipping">
                  </div>
              </div>

              <button type="submit" class="btn btn-primary">Save</button>
          </form>
      </div>
  </form>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>
  </body>
</html>