@model PizzaRestaurantDrink.Models.CRU_StockItemMV
@{
ViewBag.Title = "Stock";
}
<!-- Breadcrumb Start -->
<div class="bread-crumb">
<div class="container">
<div class="matter">
<h2>Stock</h2>
<ul class="list-inline">
<li class="list-inline-item"><a href="@Url.Content("~/Home/Index")">HOME</a></li>
<li class="list-inline-item"><a href="@Url.Content("~/Stock/StockItem")">Stock Items</a></li>
</ul>
</div>
</div>
</div>
<!-- Breadcrumb End -->
<div class="contactus">
<div class="container">
<div class="row">
<!-- Title Content Start -->
<div class="col-sm-12 commontop text-center">
<h4>Stock Items</h4>
<div class="divider style-1 center">
<span class="hr-simple left"></span>
<i class="icofont icofont-ui-press hr-icon"></i>
<span class="hr-simple right"></span>
</div>
</div>
<!-- Title Content End -->
<div class="col-md-12 col-12">
<!-- user type form Start -->
@using (Html.BeginForm("StockItem", "Stock", FormMethod.Post, new { @enctype = "multipart/form-data", @class = "form-horizontal" }))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.HiddenFor(model => model.StockItemID)
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-12 col-sm-12 col-12">
@Html.DropDownList("StockItemCategoryID", null, "--Choose Item Category--", htmlAttributes: new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.StockItemCategoryID, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12 col-12">
@Html.EditorFor(model => model.StockItemTitle, new { htmlAttributes = new { @class = "form-control", @placeholder = "Enter Item Title" } })
@Html.ValidationMessageFor(model => model.StockItemTitle, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12 col-12">
@Html.EditorFor(model => model.ItemSize, new { htmlAttributes = new { @class = "form-control", @placeholder = "Item Size eg, large, small etc" } })
@Html.ValidationMessageFor(model => model.ItemSize, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12 col-12">
@Html.EditorFor(model => model.UnitPrice, new { htmlAttributes = new { @class = "form-control", @placeholder = "Enter Item Price" } })
@Html.ValidationMessageFor(model => model.UnitPrice, "", new { @class = "text-danger" })
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-12 col-sm-12 col-12">
@Html.DropDownList("OrderTypeID", null, "--Choose Item Type--", htmlAttributes: new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.OrderTypeID, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12 col-12">
@Html.DropDownList("VisibleStatusID", null, "--Choose Status--", htmlAttributes: new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.VisibleStatusID, "", new { @class = "text-danger" })
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-md-8 col-sm-8 col-8">
<label style="margin-left:20px;">Upload Item Picture</label>
<br />
<span class="btn btn-default btn-file">
@Html.TextBoxFor(model => model.PhotoPath, new { @class = "upload-pic form-control-file", @type = "file" })
</span>
</div>
</div>
<div class="form-group">
<div class="col-md-4 col-sm-4 col-4">
<div class="buttons">
@if (Model.StockItemID == 0)
{
<input class="btn btn-theme btn-md btn-wide" type="submit" value="Create" />
}
else
{
<input class="btn btn-theme btn-md btn-wide" type="submit" value="Update" />
}
</div>
</div>
</div>
</div>
</div>
</div>
}
<!-- user type form End -->
</div>
<div class="col-md-12 col-12">
<!-- List Start -->
<div class="table-responsive-md">
<table class="table table-bordered">
<thead>
<tr>
<td class="text-center">
Image
</td>
<td class="text-center">
Category
</td>
<td class="text-center">
Item Title
</td>
<td class="text-center">
Size
</td>
<td class="text-center">
Price
</td>
<td class="text-center">
Type
</td>
<td class="text-center">
Reg Date
</td>
<td class="text-center">
Created By
</td>
<td class="text-center">
Status
</td>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Lists)
{
<tr>
<td>
<a href="@Url.Content(item.ItemPhotoPath)">
<img class="mr-3" src="@Url.Content(item.ItemPhotoPath)" style="width:150px;height:250px;max-width: 100%; height: auto;" alt="Image">
</a>
</td>
<td>
@Html.DisplayFor(modelItem => item.StockItemCategory)
</td>
<td>
@Html.DisplayFor(modelItem => item.StockItemTitle)
</td>
<td>
@Html.DisplayFor(modelItem => item.ItemSize)
</td>
<td>
@Html.DisplayFor(modelItem => item.UnitPrice)
</td>
<td>
@Html.DisplayFor(modelItem => item.OrderType)
</td>
<td>
@Html.DisplayFor(modelItem => item.RegisterDate)
</td>
<td>
@Html.DisplayFor(modelItem => item.CreatedBy)
</td>
<td>
@Html.DisplayFor(modelItem => item.VisibleStatus)
</td>
<td>
@Html.ActionLink("Edit", "StockItem", new { id = item.StockItemID }, new { @class = "btn btn-theme btn-md btn-wide", @style="margin-bottom:5px;" })
@Html.ActionLink("Ingredients", "ItemIngredients", new { id = item.StockItemID }, new { @class = "btn btn-theme btn-md btn-wide" })
</td>
</tr>
}
</tbody>
</table>
</div>
<!-- List End -->
</div>
</div>
</div>
</div>
Comments
Post a Comment