Upload project.
This commit is contained in:
30
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/AdjustCost.cshtml
Normal file
30
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/AdjustCost.cshtml
Normal file
@@ -0,0 +1,30 @@
|
||||
@model ThAmCo.Stock.Models.ViewModel.AdjustCostViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Adjust Cost";
|
||||
}
|
||||
|
||||
<h1>Adjust Cost</h1>
|
||||
|
||||
<h4>Cost</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
@Html.LabelFor(m => m.Name) :
|
||||
@Html.DisplayFor(m => m.Name)
|
||||
<br />
|
||||
@Html.LabelFor(m => m.Description) :
|
||||
@Html.DisplayFor(m => m.Description)
|
||||
<form asp-action="AdjustCost">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Cost" class="control-label"></label>
|
||||
<input asp-for="Cost" class="form-control" />
|
||||
<span asp-validation-for="Cost" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Adjust" class="btn btn-primary" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
43
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Create.cshtml
Normal file
43
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Create.cshtml
Normal file
@@ -0,0 +1,43 @@
|
||||
@model ThAmCo.Stock.Data.ProductStock
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h1>Create</h1>
|
||||
|
||||
<h4>ProductStock</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ProductId" class="control-label"></label>
|
||||
<input asp-for="ProductId" class="form-control" />
|
||||
<span asp-validation-for="ProductId" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Stock" class="control-label"></label>
|
||||
<input asp-for="Stock" class="form-control" />
|
||||
<span asp-validation-for="Stock" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="PriceId" class="control-label"></label>
|
||||
<input asp-for="PriceId" class="form-control" />
|
||||
<span asp-validation-for="PriceId" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
39
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Delete.cshtml
Normal file
39
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Delete.cshtml
Normal file
@@ -0,0 +1,39 @@
|
||||
@model ThAmCo.Stock.Data.ProductStock
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h1>Delete</h1>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>ProductStock</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ProductId)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.ProductId)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Stock)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.Stock)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.PriceId)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.PriceId)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input type="submit" value="Delete" class="btn btn-danger" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</form>
|
||||
</div>
|
||||
36
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Details.cshtml
Normal file
36
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Details.cshtml
Normal file
@@ -0,0 +1,36 @@
|
||||
@model ThAmCo.Stock.Data.ProductStock
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h1>Details</h1>
|
||||
|
||||
<div>
|
||||
<h4>ProductStock</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ProductId)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.ProductId)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Stock)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.Stock)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.PriceId)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.PriceId)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
44
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Edit.cshtml
Normal file
44
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Edit.cshtml
Normal file
@@ -0,0 +1,44 @@
|
||||
@model ThAmCo.Stock.Data.ProductStock
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h1>Edit</h1>
|
||||
|
||||
<h4>ProductStock</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="ProductId" class="control-label"></label>
|
||||
<input asp-for="ProductId" class="form-control" />
|
||||
<span asp-validation-for="ProductId" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Stock" class="control-label"></label>
|
||||
<input asp-for="Stock" class="form-control" />
|
||||
<span asp-validation-for="Stock" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="PriceId" class="control-label"></label>
|
||||
<input asp-for="PriceId" class="form-control" />
|
||||
<span asp-validation-for="PriceId" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
47
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Index.cshtml
Normal file
47
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Index.cshtml
Normal file
@@ -0,0 +1,47 @@
|
||||
@model IEnumerable<ThAmCo.Stock.Models.Dto.ProductStockDto>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h1>Index</h1>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ProductStock.ProductId)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ProductStock.Stock)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ProductStock.PriceId)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ProductStock.ProductId)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ProductStock.Stock)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ProductStock.PriceId)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.ProductStock.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.ProductStock.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.ProductStock.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
54
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Low.cshtml
Normal file
54
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/Low.cshtml
Normal file
@@ -0,0 +1,54 @@
|
||||
@model IEnumerable<ThAmCo.Stock.Models.Dto.ProductStockDto>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Low Stock Products";
|
||||
}
|
||||
|
||||
<h1>Products with Low Stock</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirstOrDefault().ProductStock.ProductId)
|
||||
</th>
|
||||
<th>
|
||||
Sale Price
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirstOrDefault().ProductStock.Stock)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@{ int i = 1; }
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => i)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ProductStock.ProductId)
|
||||
</td>
|
||||
<td>
|
||||
£@Html.DisplayFor(modelItem => item.Price.ProductPrice)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ProductStock.Stock)
|
||||
</td>
|
||||
<td>
|
||||
<form asp-action="VendorProducts">
|
||||
<input type="hidden" asp-for="@item.ProductStock.ProductId" />
|
||||
<input type="submit" value="Order" class="btn btn-primary" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@Html.Display(i++.ToString())
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
31
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/OrderRequest.cshtml
Normal file
31
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/OrderRequest.cshtml
Normal file
@@ -0,0 +1,31 @@
|
||||
@model ThAmCo.Stock.Models.ViewModel.OrderRequestModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Order Request";
|
||||
}
|
||||
|
||||
<h1>OrderRequest</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
@Html.LabelFor(m => m.Name) :
|
||||
@Html.DisplayFor(m => m.Name)
|
||||
<br />
|
||||
@Html.LabelFor(m => m.Description) :
|
||||
@Html.DisplayFor(m => m.Description)
|
||||
<br />
|
||||
@Html.LabelFor(m => m.Supplier) :
|
||||
@Html.DisplayFor(m => m.Supplier)
|
||||
<form asp-action="OrderRequestSubmitted">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input type="hidden" asp-for="Supplier" />
|
||||
<div class="form-group">
|
||||
<label class="control-label">Quantity</label>
|
||||
<input type="number" name="quantity" class="form-control" min="1" value="1" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Request Order" class="btn btn-primary" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,32 @@
|
||||
@model ThAmCo.Stock.Models.ViewModel.OrderRequestReviewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Order Request Review";
|
||||
}
|
||||
|
||||
<h1>Review Order Request from: @(Model.Supplier)</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
@Html.LabelFor(m => m.Name) :
|
||||
@Html.DisplayFor(m => m.Name)
|
||||
<br />
|
||||
@Html.LabelFor(m => m.Description) :
|
||||
@Html.DisplayFor(m => m.Description)
|
||||
<br />
|
||||
@Html.LabelFor(m => m.Supplier) :
|
||||
@Html.DisplayFor(m => m.Supplier)
|
||||
<br />
|
||||
@Html.LabelFor(m => m.Quantity) :
|
||||
@Html.DisplayFor(m => m.Quantity)
|
||||
<br />
|
||||
@Html.LabelFor(m => m.Price) :
|
||||
£@Html.DisplayFor(m => m.Price)
|
||||
<form asp-action="OrderRequestApproved">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Approve Order" class="btn btn-primary" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
49
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/OrderRequests.cshtml
Normal file
49
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/OrderRequests.cshtml
Normal file
@@ -0,0 +1,49 @@
|
||||
@model IEnumerable<ThAmCo.Stock.Data.OrderRequest>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Order Requests (" + Model.Count() + ")";
|
||||
}
|
||||
|
||||
<h1>Order Requests</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirstOrDefault().ProductId)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirstOrDefault().SubmittedTime)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirstOrDefault().Quantity)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirstOrDefault().Price)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ProductId)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SubmittedTime)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Quantity)
|
||||
</td>
|
||||
<td>
|
||||
£@Html.DisplayFor(modelItem => item.Price)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="OrderRequestReview" asp-route-id="@item.Id">Review</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
61
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/VendorProducts.cshtml
Normal file
61
ThAmCo-Stock/ThAmCo.Stock/Views/Stock/VendorProducts.cshtml
Normal file
@@ -0,0 +1,61 @@
|
||||
@model ThAmCo.Stock.Models.ViewModel.VendorProductIndexModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Vendor Product Index";
|
||||
}
|
||||
|
||||
<h1>Index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Products.FirstOrDefault().Name)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Products.FirstOrDefault().Description)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Products.FirstOrDefault().Price)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Products.FirstOrDefault().BrandName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Products.FirstOrDefault().CategoryName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Products.FirstOrDefault().InStock)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.Products)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Price)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BrandName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CategoryName)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="OrderRequest" asp-route-id="@item.Id" asp-route-supplier="@Model.Vendor">Order</a>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user