+
ProductCategory
+
+
+ -
+ @Html.DisplayNameFor(model => model.Category)
+
+
+ -
+ @Html.DisplayFor(model => model.Category)
+
+
+
+
+ @using (Html.BeginForm()) {
+ @Html.AntiForgeryToken()
+
+
+ |
+ @Html.ActionLink("Back to List", "Index")
+
+ }
+
diff --git a/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Edit.cshtml b/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Edit.cshtml
new file mode 100644
index 0000000..df5f2ca
--- /dev/null
+++ b/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Edit.cshtml
@@ -0,0 +1,42 @@
+@model MyShop.Core.Models.ProductCategory
+
+@{
+ ViewBag.Title = "Edit";
+}
+
+
+
+@{
+ ViewBag.Title = "Index";
+}
+
+Index
+
+
+ @Html.ActionLink("Create New", "Create")
+
+
+
+
+ @Html.DisplayNameFor(model => model.Category)
+ |
+ |
+
+
+@foreach (var item in Model) {
+
+
+ @Html.DisplayFor(modelItem => item.Category)
+ |
+
+ @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
+ @Html.ActionLink("Delete", "Delete", new { id=item.Id })
+ |
+
+}
+
+
diff --git a/MyShop/MyShop.WebUI/Views/ProductManager/Create.cshtml b/MyShop/MyShop.WebUI/Views/ProductManager/Create.cshtml
new file mode 100644
index 0000000..63914ab
--- /dev/null
+++ b/MyShop/MyShop.WebUI/Views/ProductManager/Create.cshtml
@@ -0,0 +1,71 @@
+@model MyShop.Core.ViewModels.ProductManagerViewModel
+
+@{
+ ViewBag.Title = "Create";
+}
+
+Create
+
+
+@using (Html.BeginForm())
+{
+ @Html.AntiForgeryToken()
+
+
+}
+
+
+ @Html.ActionLink("Back to List", "Index")
+
+
+@section Scripts {
+ @Scripts.Render("~/bundles/jqueryval")
+}
diff --git a/MyShop/MyShop.WebUI/Views/ProductManager/Delete.cshtml b/MyShop/MyShop.WebUI/Views/ProductManager/Delete.cshtml
new file mode 100644
index 0000000..a39ab88
--- /dev/null
+++ b/MyShop/MyShop.WebUI/Views/ProductManager/Delete.cshtml
@@ -0,0 +1,64 @@
+@model MyShop.Core.Models.Product
+
+@{
+ ViewBag.Title = "Delete";
+}
+
+Delete
+
+Are you sure you want to delete this?
+
+
Product
+
+
+ -
+ @Html.DisplayNameFor(model => model.Name)
+
+
+ -
+ @Html.DisplayFor(model => model.Name)
+
+
+ -
+ @Html.DisplayNameFor(model => model.Description)
+
+
+ -
+ @Html.DisplayFor(model => model.Description)
+
+
+ -
+ @Html.DisplayNameFor(model => model.Price)
+
+
+ -
+ @Html.DisplayFor(model => model.Price)
+
+
+ -
+ @Html.DisplayNameFor(model => model.Category)
+
+
+ -
+ @Html.DisplayFor(model => model.Category)
+
+
+ -
+ @Html.DisplayNameFor(model => model.Image)
+
+
+ -
+ @Html.DisplayFor(model => model.Image)
+
+
+
+
+ @using (Html.BeginForm()) {
+ @Html.AntiForgeryToken()
+
+
+ |
+ @Html.ActionLink("Back to List", "Index")
+
+ }
+
diff --git a/MyShop/MyShop.WebUI/Views/ProductManager/Edit.cshtml b/MyShop/MyShop.WebUI/Views/ProductManager/Edit.cshtml
new file mode 100644
index 0000000..bc85f4f
--- /dev/null
+++ b/MyShop/MyShop.WebUI/Views/ProductManager/Edit.cshtml
@@ -0,0 +1,73 @@
+@model MyShop.Core.ViewModels.ProductManagerViewModel
+
+@{
+ ViewBag.Title = "Edit";
+}
+
+Edit
+
+
+@using (Html.BeginForm())
+{
+ @Html.AntiForgeryToken()
+
+
+}
+
+
+ @Html.ActionLink("Back to List", "Index")
+
+
+@section Scripts {
+ @Scripts.Render("~/bundles/jqueryval")
+}
diff --git a/MyShop/MyShop.WebUI/Views/ProductManager/Index.cshtml b/MyShop/MyShop.WebUI/Views/ProductManager/Index.cshtml
new file mode 100644
index 0000000..e8d46e8
--- /dev/null
+++ b/MyShop/MyShop.WebUI/Views/ProductManager/Index.cshtml
@@ -0,0 +1,56 @@
+@model IEnumerable
+
+@{
+ ViewBag.Title = "Index";
+}
+
+Index
+
+
+ @Html.ActionLink("Create New", "Create")
+
+
+
+
+ @Html.DisplayNameFor(model => model.Name)
+ |
+
+ @Html.DisplayNameFor(model => model.Description)
+ |
+
+ @Html.DisplayNameFor(model => model.Price)
+ |
+
+ @Html.DisplayNameFor(model => model.Category)
+ |
+
+ @Html.DisplayNameFor(model => model.Image)
+ |
+ |
+
+
+@foreach (var item in Model) {
+
+
+ @Html.DisplayFor(modelItem => item.Name)
+ |
+
+ @Html.DisplayFor(modelItem => item.Description)
+ |
+
+ @Html.DisplayFor(modelItem => item.Price)
+ |
+
+ @Html.DisplayFor(modelItem => item.Category)
+ |
+
+ @Html.DisplayFor(modelItem => item.Image)
+ |
+
+ @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
+ @Html.ActionLink("Delete", "Delete", new { id=item.Id })
+ |
+
+}
+
+
diff --git a/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml b/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml
index ae31cd1..3660c31 100644
--- a/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml
+++ b/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml
@@ -22,8 +22,8 @@
- @Html.ActionLink("Home", "Index", "Home")
- - @Html.ActionLink("About", "About", "Home")
- - @Html.ActionLink("Contact", "Contact", "Home")
+ - @Html.ActionLink("Product Admin", "Index", "ProductManager")
+ - @Html.ActionLink("Category Admin", "Index", "ProductCategoryManager")
@Html.Partial("_LoginPartial")