main
Last change
on this file since 705d6f5 was 705d6f5, checked in by ardit <ardit@…>, 2 days ago |
Commiting all files of project - 20250224
|
-
Property mode
set to
100644
|
File size:
2.4 KB
|
Line | |
---|
1 | @model IEnumerable<db_tsh.Models.Covers>
|
---|
2 | @{
|
---|
3 | ViewData["Title"] = "Create Cover";
|
---|
4 | }
|
---|
5 |
|
---|
6 | <h2>@ViewData["Title"]</h2>
|
---|
7 |
|
---|
8 | <form method="post">
|
---|
9 | <div class="form-group">
|
---|
10 | <label for="cov_amount">Cover Amount</label>
|
---|
11 | <input type="text" class="form-control" id="cov_amount" name="cov_amount" required />
|
---|
12 | </div>
|
---|
13 |
|
---|
14 | <div class="form-group">
|
---|
15 | <label for="cov_type">Cover Type</label>
|
---|
16 | <input type="text" class="form-control" id="cov_type" name="cov_type" required />
|
---|
17 | </div>
|
---|
18 |
|
---|
19 | <div class="form-group">
|
---|
20 | <label for="package_code">Package</label>
|
---|
21 | <select id="package_code" name="package_code" class="form-control" required>
|
---|
22 | <option value="">Select Package</option>
|
---|
23 | @foreach (var package in (List<SelectListItem>)ViewData["Packages"])
|
---|
24 | {
|
---|
25 | <option value="@package.Value">@package.Text</option>
|
---|
26 | }
|
---|
27 | </select>
|
---|
28 | </div>
|
---|
29 |
|
---|
30 | <button type="submit" class="btn btn-primary">Create Cover</button>
|
---|
31 | </form>
|
---|
32 |
|
---|
33 | <hr />
|
---|
34 |
|
---|
35 | <h3>Existing Covers</h3>
|
---|
36 |
|
---|
37 | <table class="table">
|
---|
38 | <thead>
|
---|
39 | <tr>
|
---|
40 | <th>Cover Amount</th>
|
---|
41 | <th>Package</th>
|
---|
42 | <th>Cover Type</th>
|
---|
43 | <th>Actions</th>
|
---|
44 | </tr>
|
---|
45 | </thead>
|
---|
46 | <tbody>
|
---|
47 | @if (Model.Any())
|
---|
48 | {
|
---|
49 | @foreach (var cover in Model)
|
---|
50 | {
|
---|
51 | <tr>
|
---|
52 | <!-- Form for editing the existing cover -->
|
---|
53 | <form asp-action="Covers" method="post">
|
---|
54 | <td>
|
---|
55 | <input type="number" class="form-control" name="cov_amount" value="@cover.cov_amount" required />
|
---|
56 | </td>
|
---|
57 | <td>
|
---|
58 | <input type="text" class="form-control" name="package_code" value="@cover.PackageName" required readonly />
|
---|
59 | </td>
|
---|
60 | <td>
|
---|
61 | <input type="text" class="form-control" name="cov_type" value="@cover.cov_type" required />
|
---|
62 | </td>
|
---|
63 | <td>
|
---|
64 | <input type="hidden" name="cov_id" value="@cover.cov_id" />
|
---|
65 | <button type="submit" class="btn btn-success">Edit</button>
|
---|
66 | </td>
|
---|
67 | </form>
|
---|
68 | </tr>
|
---|
69 | }
|
---|
70 | }
|
---|
71 | else
|
---|
72 | {
|
---|
73 | <tr>
|
---|
74 | <td colspan="4">No covers available.</td>
|
---|
75 | </tr>
|
---|
76 | }
|
---|
77 | </tbody>
|
---|
78 | </table>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.