|
16 | 16 | <legend>Product information</legend>
|
17 | 17 | @if (!Model.AddsNew)
|
18 | 18 | {
|
19 |
| - #pragma warning disable CS8602 // False positive, cannot happen in template usage |
20 | 19 | Html.HiddenFor(m => m.Product.ProductId);
|
21 | 20 | Html.HiddenFor(m => m.Product.SupplierId);
|
22 |
| - #pragma warning restore CS8602 |
23 | 21 | <p>
|
24 |
| - @{ #pragma warning disable CS8602 } <!-- False positive, cannot happen in template usage --> |
25 | 22 | @Html.LabelFor(m => m.Product.ProductId)
|
26 |
| - @{ #pragma warning restore CS8602 } |
27 | 23 | <span class="textEntry">@Model.Product?.ProductId</span>
|
28 | 24 | </p>
|
29 | 25 | }
|
30 | 26 | <p>
|
31 |
| - @{ #pragma warning disable CS8602 } <!-- False positive, cannot happen in template usage --> |
32 | 27 | @Html.LabelFor(m => m.Product.ProductName)
|
33 | 28 | @Html.TextBoxFor(m => m.Product.ProductName, new { @value = Model.Product?.ProductName })
|
34 | 29 | @Html.ValidationMessageFor(m => m.Product.ProductName)
|
35 |
| - @{ #pragma warning restore CS8602 } |
36 | 30 | </p>
|
37 | 31 | <p>
|
38 |
| - @{ #pragma warning disable CS8602 } <!-- False positive, cannot happen in template usage --> |
39 | 32 | @Html.LabelFor(m => m.Product.Category)
|
40 | 33 | <select asp-for="Product.CategoryId">
|
41 | 34 | @foreach (var category in Model.ProductCategories)
|
|
47 | 40 | </option>
|
48 | 41 | }
|
49 | 42 | </select>
|
50 |
| - @{ #pragma warning restore CS8602 } |
51 | 43 | </p>
|
52 |
| - @{ #pragma warning disable CS8602 } <!-- False positive, cannot happen in template usage --> |
53 | 44 | <p>
|
54 | 45 | @Html.LabelFor(m => m.Product.QuantityPerUnit)
|
55 | 46 | @Html.TextBoxFor(m => m.Product.QuantityPerUnit, new { @value = Model.Product?.QuantityPerUnit })
|
|
75 | 66 | @Html.TextBoxFor(m => m.Product.ReorderLevel, new { @value = Model.Product?.ReorderLevel })
|
76 | 67 | @Html.ValidationMessageFor(m => m.Product.ReorderLevel)
|
77 | 68 | </p>
|
78 |
| - @{ #pragma warning restore CS8602 } |
79 | 69 | @if (Model.AddsNew)
|
80 | 70 | {
|
81 | 71 | <p>
|
82 |
| - @{ #pragma warning disable CS8602 } <!-- False positive, cannot happen in template usage --> |
83 | 72 | @Html.LabelFor(m => m.Product.Supplier)
|
84 | 73 | @if(Model.Suppliers != null)
|
85 | 74 | {
|
|
93 | 82 | </select>
|
94 | 83 | }
|
95 | 84 | @Html.ValidationMessageFor(m => m.Product.Supplier)
|
96 |
| - @{ #pragma warning restore CS8602 } |
97 | 85 | </p>
|
98 | 86 | }
|
99 | 87 | <p>
|
100 |
| - @{ #pragma warning disable CS8602 } <!-- False positive, cannot happen in template usage --> |
101 | 88 | @Html.CheckBoxFor(m => m.Product.Discontinued, new { @checked = Model.Product?.Discontinued ?? false })
|
102 | 89 | @Html.LabelFor(m => m.Product.Discontinued)
|
103 |
| - @{ #pragma warning restore CS8602 } |
104 | 90 | </p>
|
105 | 91 | </fieldset>
|
106 | 92 | <p class="submitButton">
|
|
0 commit comments