1
0
mirror of https://github.com/rudollee/LearningMVC.git synced 2025-06-07 16:06:21 +00:00
2017-04-08 02:18:38 +09:00

75 lines
1.8 KiB
Plaintext

@model SportsStore.Domain.Entities.ShippingDetails
@{
ViewBag.Title = "SportStore Checkout";
}
<h2>Checkout</h2>
<p>Please enter your details, and we'll ship your goods right away!</p>
@using (Html.BeginForm())
{
@Html.ValidationSummary()
<h3>Ship to</h3>
<div class="form-group">
<label>Name:</label>
@Html.TextBoxFor(x => x.Name, new { @class = "form-control" } )
</div>
<h3>Address</h3>
foreach (var property in ViewData.ModelMetadata.Properties)
{
if (property.PropertyName != "Name" && property.PropertyName != "GiftWrap")
{
<div class="form-group">
<label>@(property.DisplayName ?? property.PropertyName)</label>
@Html.TextBox(property.PropertyName, null, new { @class = "form-control" })
</div>
}
}
@*<div class="form-group">
<label>Line 1:</label>
@Html.TextBoxFor(x => x.Line1, new { @class = "form-control" })
</div>
<div class="form-group">
<label>Line 2:</label>
@Html.TextBoxFor(x => x.Line2, new { @class = "form-control" })
</div>
<div class="form-group">
<label>Line 3:</label>
@Html.TextBoxFor(x => x.Line3, new { @class = "form-control" })
</div>
<div class="form-group">
<label>City:</label>
@Html.TextBoxFor(x => x.City, new { @class = "form-control" })
</div>
<div class="form-group">
<label>State:</label>
@Html.TextBoxFor(x => x.State, new { @class = "form-control" })
</div>
<div class="form-group">
<label>Zip:</label>
@Html.TextBoxFor(x => x.Zip, new { @class = "form-control" })
</div>
<div class="form-group">
<label>Country:</label>
@Html.TextBoxFor(x => x.Country, new { @class = "form-control" })
</div>*@
<h3>Options</h3>
<div class="checkbox">
<label>
@Html.EditorFor(x => x.GiftWrap)
Gift wrap these items
</label>
</div>
<div class="text-center">
<input class="btn btn-primary" type="submit" value="Complete order" />
</div>
}