@using Microsoft.eShopOnContainers.WebMVC.ViewModels @using Microsoft.eShopOnContainers.WebMVC.ViewModels.Customisation @model IEnumerable @{ ViewData["Title"] = "My Orders"; var headerList = new List
() { new Header() {Controller = "Catalog", Text = "Back to catalog"}, new Header() {Text = " / "}, new Header() {Controller = "OrderManagement", Text = "Orders Management"} }; var shippingInfo = ViewData["ShippingInfo"] as List; }
Order number
Date
Total
Status
@if (shippingInfo != null) {
Shipping date
Estimated arrival date
}
@if (Model != null && Model.Any()) { foreach (var item in Model) {
@Html.DisplayFor(modelItem => item.OrderNumber)
@item.Date.ToShortDateString()
$ @Html.DisplayFor(modelItem => item.Total)
@Html.DisplayFor(modelItem => item.Status)
@if (shippingInfo != null) {
@for (var i = 0; i < shippingInfo.Count(); i++) { var si = shippingInfo[i]; if (si.OrderNumber.Equals(item.OrderNumber)) { @si.ShippingTime.ToShortDateString() ; break; } }
@for (var i = 0; i < shippingInfo.Count(); i++) { var si = shippingInfo[i]; if (si.OrderNumber.Equals(item.OrderNumber)) { @si.ArrivalTime.ToShortDateString() ; break; } }
}
Detail
@if (item.Status.ToLower() == "submitted") { Cancel }
} }