source: PostgreSqlDotnetCore/Views/PetCares/Create.cshtml@ e90ba32

main
Last change on this file since e90ba32 was e9bb9d1, checked in by ElenaMoskova <elena.moskova99@…>, 3 months ago

Use of views

  1. Use of views in VetCenters.
  2. Ability to provide a response to a given response.
  • Property mode set to 100644
File size: 3.8 KB
Line 
1@model PostgreSqlDotnetCore.Models.Pet_CaresClass
2
3@{
4 ViewBag.Title = "Create";
5}
6
7<h2>Create a new one</h2>
8
9
10@using (Html.BeginForm())
11{
12 @Html.AntiForgeryToken()
13
14<div class="form-horizontal">
15 <h4>Pet_CaresClass</h4>
16 <hr />
17 @Html.ValidationSummary(true, "", new { @class = "text-danger" })
18 <div class="form-group">
19 @Html.LabelFor(model => model.title, htmlAttributes: new { @class = "control-label col-md-2" })
20 <div class="col-md-10">
21 @Html.EditorFor(model => model.title, new { htmlAttributes = new { @class = "form-control" } })
22 @Html.ValidationMessageFor(model => model.title, "", new { @class = "text-danger" })
23 </div>
24 </div>
25 <div class="form-group">
26 @Html.LabelFor(model => model.description, htmlAttributes: new { @class = "control-label col-md-2" })
27 <div class="col-md-10">
28 @Html.EditorFor(model => model.description, new { htmlAttributes = new { @class = "form-control" } })
29 @Html.ValidationMessageFor(model => model.description, "", new { @class = "text-danger" })
30 </div>
31 </div>
32 <div class="form-group">
33 @Html.LabelFor(model => model.dateending, htmlAttributes: new { @class = "control-label col-md-2" })
34 <div class="col-md-10">
35 @Html.EditorFor(model => model.dateending, new { htmlAttributes = new { @class = "form-control" } })
36 @Html.ValidationMessageFor(model => model.dateending, "", new { @class = "text-danger" })
37 </div>
38 </div>
39 <div class="form-group">
40 @Html.LabelFor(model => model.start_date, htmlAttributes: new { @class = "control-label col-md-2" })
41 <div class="col-md-10">
42 @Html.EditorFor(model => model.start_date, new { htmlAttributes = new { @class = "form-control" } })
43 @Html.ValidationMessageFor(model => model.start_date, "", new { @class = "text-danger" })
44 </div>
45 </div>
46
47
48 @* <div class="form-group">
49 @Html.LabelFor(model => model.vetcentersid, htmlAttributes: new { @class = "control-label col-md-2" })
50 <div class="col-md-10">
51 @Html.EditorFor(model => model.vetcentersid, new { htmlAttributes = new { @class = "form-control" } })
52 @Html.ValidationMessageFor(model => model.vetcentersid, "", new { @class = "text-danger" })
53 </div>
54 </div> *@
55 @*
56 <div class="form-group">
57 <label class="control-label col-md-2" for="vetcentersid">VetCenter:</label>
58 <div class="col-md-10 ">
59 <select class="form-control" id="vetcentersid" name="vetcentersid">
60 <option value="">Select VetCenter</option>
61 <option value="4">Vet Svet</option>
62 <option value="5">Veterinarian Ambulance - Dr.Tonit</option>
63 <option value="6">Vet In</option>
64 </select>
65 </div>
66 </div>
67 *@
68
69 <div class="form-group">
70 <label class="control-label col-md-2" for="vetcentersid">VetCenter:</label>
71 <div class="col-md-10">
72 @Html.DropDownList("vetcentersid", (SelectList)ViewBag.VetCenters, "Select VetCenter", new { @class = "form-control" })
73 </div>
74 </div>
75
76 <div class="form-group">
77 <label class="control-label col-md-2" for="pet_id">UserPet:</label>
78 <div class="col-md-10">
79 @Html.DropDownList("pet_id", (SelectList)ViewBag.Pets, "Select Pets", new { @class = "form-control" })
80 </div>
81 </div>
82
83
84 <div class="form-group">
85 <div class="col-md-offset-2 col-md-10">
86 <br />
87 <input type="submit" value="Create" class="btn btn-dark" />
88 </div>
89 </div>
90</div>
91}
92
93<div>
94 @Html.ActionLink("Back to List", "Index")
95</div>
Note: See TracBrowser for help on using the repository browser.