15 | @Html.DisplayFor(x => member.Name) 16 |
17 |@ViewBag.UserID
8 | 9 |Use this area to provide additional information.
10 | -------------------------------------------------------------------------------- /MVC/Solutions/MVC_1/MVC_1/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |@Html.DisplayFor(x => x.Description)
-------------------------------------------------------------------------------- /MVC/Solutions/MVC_1/MVC_1/Views/Products/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable6 | @Html.DisplayNameFor(model => model.Name) 7 | | 8 |9 | @Html.DisplayNameFor(model => model.Price) 10 | | 11 |12 | @Html.DisplayNameFor(model => model.Category.Name) 13 | | 14 |15 | | 16 | |
---|---|---|---|---|
22 | @Html.DisplayFor(modelItem => item.Name) 23 | | 24 |25 | @Html.DisplayFor(modelItem => item.Price) 26 | | 27 |28 | @Html.DisplayFor(modelItem => item.Category.Name) 29 | | 30 |31 | @Html.ActionLink("View Details", "Detail", new { id = item.Id }) 32 | | 33 |34 | @Html.ActionLink("Delete", "Delete", new { id = item.Id }) 35 | | 36 |
47 | @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) | 48 | @Html.ActionLink("Back to List", "Index") 49 |
50 | -------------------------------------------------------------------------------- /Project Skroutz/Skroutz/Skroutz/Views/AttributeValues/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model Skroutz.Models.AttributeValue 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |40 | @Html.ActionLink("Edit", "Edit", new { productId = Model.ProductId, atrributeKeyId = Model.AttributeKeyId }) | 41 | @Html.ActionLink("Back to List", "Index") 42 |
43 | -------------------------------------------------------------------------------- /Project Skroutz/Skroutz/Skroutz/Views/AttributeValues/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable10 | @Html.ActionLink("Create New", "Create") 11 |
12 |15 | @Html.DisplayNameFor(model => model.ProductId) 16 | | 17 |18 | @Html.DisplayNameFor(model => model.AttributeKeyId) 19 | | 20 |21 | @Html.DisplayNameFor(model => model.Value) 22 | | 23 |24 | |
---|---|---|---|
29 | @Html.DisplayFor(modelItem => item.Product.Name) 30 | | 31 |32 | @Html.DisplayFor(modelItem => item.AttributeKey.Name) 33 | | 34 |35 | @Html.DisplayFor(modelItem => item.Value) 36 | | 37 |38 | @Html.ActionLink("Edit", "Edit", new { productId = item.ProductId, attributeKeyId = item.AttributeKeyId }) | 39 | @Html.ActionLink("Details", "Details", new { productId = item.ProductId, attributeKeyId = item.AttributeKeyId }) | 40 | @Html.ActionLink("Delete", "Delete", new { productId = item.ProductId, attributeKeyId = item.AttributeKeyId }) 41 | | 42 |
29 | @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) | 30 | @Html.ActionLink("Back to List", "Index") 31 |
32 | -------------------------------------------------------------------------------- /Project Skroutz/Skroutz/Skroutz/Views/Categories/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable10 | @Html.ActionLink("Create New", "Create") 11 |
12 |15 | @Html.DisplayNameFor(model => model.Name) 16 | | 17 |18 | @Html.DisplayNameFor(model => model.ParentId) 19 | | 20 |21 | |
---|---|---|
26 | @Html.DisplayFor(modelItem => item.Name) 27 | | 28 |29 | @Html.DisplayFor(modelItem => item.Parent.Name) 30 | | 31 |32 | @Html.ActionLink("Edit", "Edit", new { id=item.Id }) | 33 | @Html.ActionLink("Details", "Details", new { id=item.Id }) | 34 | @Html.ActionLink("Delete", "Delete", new { id=item.Id }) 35 | | 36 |
40 | @Html.ActionLink("Edit", "Edit", new { productId = Model.ProductId, storeId = Model.StoreId }) | 41 | @Html.ActionLink("Back to List", "Index") 42 |
43 | -------------------------------------------------------------------------------- /Project Skroutz/Skroutz/Skroutz/Views/Inventories/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable10 | @Html.ActionLink("Create New", "Create") 11 |
12 |15 | @Html.DisplayNameFor(model => model.ProductId) 16 | | 17 |18 | @Html.DisplayNameFor(model => model.StoreId) 19 | | 20 |21 | @Html.DisplayNameFor(model => model.Price) 22 | | 23 |24 | |
---|---|---|---|
29 | @Html.DisplayFor(modelItem => item.Product.Name) 30 | | 31 |32 | @Html.DisplayFor(modelItem => item.Store.Name) 33 | | 34 |35 | @Html.DisplayFor(modelItem => item.Price) 36 | | 37 |38 | @Html.ActionLink("Edit", "Edit", new { productId = item.ProductId, storeId = item.StoreId }) | 39 | @Html.ActionLink("Details", "Details", new { productId = item.ProductId, storeId = item.StoreId }) | 40 | @Html.ActionLink("Delete", "Delete", new { productId = item.ProductId, storeId = item.StoreId }) 41 | | 42 |
10 | @Html.ActionLink("Create New", "Create") 11 |
12 |15 | @Html.DisplayNameFor(model => model.Name) 16 | | 17 |18 | @Html.DisplayNameFor(model => model.Category) 19 | | 20 |21 | |
---|---|---|
26 | @Html.DisplayFor(modelItem => item.Name) 27 | | 28 |29 | @Html.DisplayFor(modelItem => item.Category.Name) 30 | | 31 |32 | @Html.ActionLink("Edit", "Edit", new { id=item.Id }) | 33 | @Html.ActionLink("Details", "Details", new { id=item.Id }) | 34 | @Html.ActionLink("Delete", "Delete", new { id=item.Id }) 35 | | 36 |
48 | @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) | 49 | @Html.ActionLink("Back to List", "Index") 50 |
51 | -------------------------------------------------------------------------------- /Project Skroutz/Skroutz/Skroutz/Views/Stores/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable10 | @Html.ActionLink("Create New", "Create") 11 |
12 |15 | @Html.DisplayNameFor(model => model.Name) 16 | | 17 |18 | @Html.DisplayNameFor(model => model.Web) 19 | | 20 |21 | @Html.DisplayNameFor(model => model.Headquarters) 22 | | 23 |24 | @Html.DisplayNameFor(model => model.Phone) 25 | | 26 |27 | |
---|---|---|---|---|
32 | @Html.DisplayFor(modelItem => item.Name) 33 | | 34 |35 | @Html.DisplayFor(modelItem => item.Web) 36 | | 37 |38 | @Html.DisplayFor(modelItem => item.Headquarters) 39 | | 40 |41 | @Html.DisplayFor(modelItem => item.Phone) 42 | | 43 |44 | @Html.ActionLink("Edit", "Edit", new { id=item.Id }) | 45 | @Html.ActionLink("Details", "Details", new { id=item.Id }) | 46 | @Html.ActionLink("Delete", "Delete", new { id=item.Id }) 47 | | 48 |
7 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, 8 | sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 9 | Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris 10 | nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in 11 | reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla 12 | pariatur. Excepteur sint occaecat cupidatat non proident, sunt in 13 | culpa qui officia deserunt mollit anim id est laborum. 14 |
-------------------------------------------------------------------------------- /__Demos/RazorDemo/Content2.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Shared/_Layout2.cshtml"; 3 | } 4 | 5 | @section header { 6 |25 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, 26 | sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 27 | Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris 28 | nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in 29 | reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla 30 | pariatur. Excepteur sint occaecat cupidatat non proident, sunt in 31 | culpa qui officia deserunt mollit anim id est laborum. 32 |
-------------------------------------------------------------------------------- /__Demos/RazorDemo/Content3.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Shared/_Layout3.cshtml"; 3 | 4 | PageData["Title"] = "Passing Data"; 5 | PageData["ShowList"] = true; 6 | 7 | if (IsPost) 8 | { 9 | if (Request.Form["list"] == "off") 10 | { 11 | PageData["ShowList"] = false; 12 | } 13 | } 14 | 15 | } 16 | 17 | @section header { 18 |25 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, 26 | sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 27 | Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris 28 | nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in 29 | reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla 30 | pariatur. Excepteur sint occaecat cupidatat non proident, sunt in 31 | culpa qui officia deserunt mollit anim id est laborum. 32 |
33 | 34 | @if (PageData["ShowList"] == true) 35 | { 36 | 40 | } 41 | else 42 | { 43 | 47 | } -------------------------------------------------------------------------------- /__Demos/RazorDemo/Employees.cshtml: -------------------------------------------------------------------------------- 1 | @using Model; 2 | @{ 3 | Layout = "~/Shared/_Database.cshtml"; 4 | Page.Title = "Employees"; 5 | 6 | var db = new Model(); 7 | WebGrid grid; 8 | 9 | if (@UrlData.Count == 1 && @UrlData[0].IsInt()) 10 | { 11 | int id = @UrlData[0].AsInt(); 12 | var employees = db.Employees.Where(x => x.EmployeeID == id); 13 | grid = new WebGrid(employees); 14 | } 15 | else 16 | { 17 | var employees = db.Employees; 18 | grid = new WebGrid(employees); 19 | } 20 | //var employees = db.Employees; 21 | //var grid = new WebGrid(employees); 22 | } 23 |This is the content of the main page.
12 | 13 | @RenderPage("~/Shared/_Footer.cshtml") 14 | 15 | 16 | -------------------------------------------------------------------------------- /__Demos/RazorDemo/Shared/_Database.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |