Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.30 KB | None | 0 0
  1. <div class="content">
  2.     <div class="col-md-12">
  3.         <h2>@ViewBag.Title</h2>
  4.         @Html.ActionLink("Create order", "Create", "Order", new { }, new { @class = "btn btn-success" })
  5.         @Html.ActionLink("Clear shopping cart", "Clear", "ShoppingCart", new { }, new { @class = "btn btn-danger" })
  6.         <div>
  7.             <hr />
  8.             @if (ViewBag.Error != null)
  9.             {
  10.                 <div class="panel panel-danger">
  11.                     <label>@ViewBag.Error</label>
  12.                 </div>
  13.             }
  14.             <table class="table margin-top-10">
  15.                 <thead>
  16.                     <tr>
  17.                         <th>@Html.DisplayNameFor(m => m.Products.FirstOrDefault().Name)</th>
  18.                         <th>@Html.DisplayNameFor(m => m.Products.FirstOrDefault().Amount)</th>
  19.                         <th>@Html.DisplayNameFor(m => m.Products.FirstOrDefault().Price)</th>
  20.                         <th>@Html.DisplayNameFor(m => m.Products.FirstOrDefault().AddedDate)</th>
  21.                         <th>@Html.DisplayNameFor(m => m.Products.FirstOrDefault().Category)</th>
  22.                         <th>Опції</th>
  23.                     </tr>
  24.                 </thead>
  25.                 <tbody>
  26.                     @foreach (var item in Model.Products)
  27.                     {
  28.                         <tr>
  29.                             <td>@item.Name</td>
  30.                             <td>@item.Amount</td>
  31.                             <td>@item.Price</td>
  32.                             <td>@item.AddedDate</td>
  33.                             <td>@item.Category</td>
  34.                             <td>
  35.                                 <a class="btn btn-default" title="More information" href="@Url.Action("Index", "Product", new { id = item.Id })">
  36.                                     <span class="glyphicon glyphicon-eye-open"></span>
  37.                                 </a>
  38.                                 <a class="btn btn-danger" title="Delete" href="@Url.Action("Delete", "ShoppingCart", new { id = item.ShopCartId })">
  39.                                     <span class="glyphicon glyphicon-remove"></span>
  40.                                 </a>
  41.                             </td>
  42.                         </tr>
  43.                     }
  44.                 </tbody>
  45.             </table>
  46.         </div>
  47.     </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement