-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy path_05_ProductCRUD.html
More file actions
65 lines (62 loc) · 1.78 KB
/
_05_ProductCRUD.html
File metadata and controls
65 lines (62 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Northwind Products CRUD</title>
<link rel="stylesheet" href="_05_ProductCRUD.css">
<script defer type="module" src="_05_ProductCRUD.js"></script>
</head>
<body>
<h1>Northwind Products Management</h1>
<form id="productForm">
<input type="hidden" id="productId">
<div>
<label for="productName">Product Name:</label>
<input type="text" id="productName" required>
</div>
<div>
<label for="supplierId">Supplier:</label>
<select id="supplierId" required>
<option value="">Select Supplier</option>
</select>
</div>
<div>
<label for="categoryId">Category:</label>
<select id="categoryId" required>
<option value="">Select Category</option>
</select>
</div>
<div>
<label for="quantityPerUnit">Quantity Per Unit:</label>
<input type="number" min="0" step="1" id="quantityPerUnit">
</div>
<div>
<label for="unitPrice">Unit Price:</label>
<input type="number" step="0.01" min="0" id="unitPrice" required>
</div>
<div>
<label for="discontinued">Discontinued:</label>
<input type="checkbox" id="discontinued">
</div>
<button type="submit">Save Product</button>
<button type="button" id="cancelEdit" style="display:none;">Cancel</button>
</form>
<h2>Products List</h2>
<table id="productsTable">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Supplier</th>
<th>Category</th>
<th>Quantity/Unit</th>
<th>Unit Price</th>
<th>Discontinued</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="productsBody"></tbody>
</table>
</body>
</html>