﻿@model PizzaApp.WebApp.User

@{
    ViewData["Title"] = "User Details";
}

<h2>User Details</h2>

<div>

    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.Id)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.Id)
        </dd>
        <dt>
            @Html.DisplayNameFor(model => model.FirstName)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.FirstName)
        </dd>
        <dt>
            @Html.DisplayNameFor(model => model.LastName)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.LastName)
        </dd>
        <dt>
            @Html.DisplayNameFor(model => model.DefaultLocation)
        </dt>
        <dd>
            @switch (Model.DefaultLocation)
            {
                case 1:
                    @:(1)Reston
                    break;
                case 2:
                    @:(2)Herndon
                    break;
                case 3:
                    @:S(3)terling
                    break;
            }
        </dd>
        <dt>
            @Html.DisplayNameFor(model => model.LatestLocation)
        </dt>
        <dd>
            @switch (Model.LatestLocation)
            {
                case 1:
                    @:(1)Reston
                    break;
                case 2:
                    @:(2)Herndon
                    break;
                case 3:
                    @:(3)Sterling
                    break;
            }
        </dd>
        <dt>
            @Html.DisplayNameFor(model => model.LatestOrderId)
        </dt>
        <dd>
            @Html.ActionLink(Model.LatestOrderId.ToString(), "Details", "Order", new { id = Model.LatestOrderId })
        </dd>
    </dl>
</div>
<div>
    @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
    <a asp-action="Index">Back to List</a>
</div>
