1 | @model PostgreSqlDotnetCore.Models.ProductsClass
|
---|
2 |
|
---|
3 | @{
|
---|
4 | ViewBag.Title = "Create";
|
---|
5 | }
|
---|
6 |
|
---|
7 | <h2>Create</h2>
|
---|
8 |
|
---|
9 |
|
---|
10 | @using (Html.BeginForm())
|
---|
11 | {
|
---|
12 | @Html.AntiForgeryToken()
|
---|
13 |
|
---|
14 | <div class="form-horizontal">
|
---|
15 | <h4>New product item</h4>
|
---|
16 | <hr />
|
---|
17 | @Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
---|
18 |
|
---|
19 | <div class="form-group">
|
---|
20 | @Html.LabelFor(model => model.name, htmlAttributes: new { @class = "control-label col-md-2" })
|
---|
21 | <div class="col-md-10">
|
---|
22 | @Html.EditorFor(model => model.name, new { htmlAttributes = new { @class = "form-control" } })
|
---|
23 | @Html.ValidationMessageFor(model => model.name, "", new { @class = "text-danger" })
|
---|
24 | </div>
|
---|
25 | </div>
|
---|
26 |
|
---|
27 | <div class="form-group">
|
---|
28 | @Html.LabelFor(model => model.description, htmlAttributes: new { @class = "control-label col-md-2" })
|
---|
29 | <div class="col-md-10">
|
---|
30 | @Html.EditorFor(model => model.description, new { htmlAttributes = new { @class = "form-control" } })
|
---|
31 | @Html.ValidationMessageFor(model => model.description, "", new { @class = "text-danger" })
|
---|
32 | </div>
|
---|
33 | </div>
|
---|
34 |
|
---|
35 | <div class="form-group">
|
---|
36 | @Html.LabelFor(model => model.price, htmlAttributes: new { @class = "control-label col-md-2" })
|
---|
37 | <div class="col-md-10">
|
---|
38 | @Html.EditorFor(model => model.price, new { htmlAttributes = new { @class = "form-control" } })
|
---|
39 | <span class="input-group-addon">euro</span>
|
---|
40 | @Html.ValidationMessageFor(model => model.price, "", new { @class = "text-danger" })
|
---|
41 | </div>
|
---|
42 | </div>
|
---|
43 | <div class="form-group">
|
---|
44 | @Html.CheckBoxFor(model => model.isactive, htmlAttributes: new { @class = "control-label col-md-2" })
|
---|
45 | <div class="col-md-10">
|
---|
46 | @Html.EditorFor(model => model.isactive, new { htmlAttributes = new { @class = "form-control" } })
|
---|
47 | @Html.ValidationMessageFor(model => model.isactive, "", new { @class = "text-danger" })
|
---|
48 | </div>
|
---|
49 | </div>
|
---|
50 |
|
---|
51 | <div class="form-group">
|
---|
52 | @Html.LabelFor(model => model.available_quantity, htmlAttributes: new { @class = "control-label col-md-2" })
|
---|
53 | <div class="col-md-10">
|
---|
54 | @Html.EditorFor(model => model.available_quantity, new { htmlAttributes = new { @class = "form-control" } })
|
---|
55 | <span class="input-group-addon">euro</span>
|
---|
56 | @Html.ValidationMessageFor(model => model.available_quantity, "", new { @class = "text-danger" })
|
---|
57 | </div>
|
---|
58 | </div>
|
---|
59 |
|
---|
60 | @*<div class="form-group">
|
---|
61 | @Html.LabelFor(model => model.category, htmlAttributes: new { @class = "control-label col-md-2" })
|
---|
62 | <div class="col-md-10">
|
---|
63 | @Html.EditorFor(model => model.category, new { htmlAttributes = new { @class = "form-control" } })
|
---|
64 | @Html.ValidationMessageFor(model => model.category, "", new { @class = "text-danger" })
|
---|
65 | </div>
|
---|
66 | </div>*@
|
---|
67 |
|
---|
68 | <div class="form-group">
|
---|
69 | <label for="category">Category:</label>
|
---|
70 | <select class="form-control" id="category" name="category">
|
---|
71 | <option value="">Select category</option>
|
---|
72 | <option value="1">Dietary supplements</option>
|
---|
73 | <option value="2">Hygiene and cosmetics</option>
|
---|
74 | <option value="3">Food</option>
|
---|
75 | </select>
|
---|
76 | </div>
|
---|
77 |
|
---|
78 | <div class="form-group">
|
---|
79 | <div class="col-md-offset-2 col-md-10">
|
---|
80 | <br />
|
---|
81 | <input type="submit" value="Create" class="btn btn-dark" />
|
---|
82 | </div>
|
---|
83 | </div>
|
---|
84 | </div>
|
---|
85 | }
|
---|
86 |
|
---|
87 | <div>
|
---|
88 | @Html.ActionLink("Back to List", "Index")
|
---|
89 | </div>
|
---|