diff --git a/WebGoat.NET/Views/Product/AddOrEdit.cshtml b/WebGoat.NET/Views/Product/AddOrEdit.cshtml index 37ffb30..4a631c7 100644 --- a/WebGoat.NET/Views/Product/AddOrEdit.cshtml +++ b/WebGoat.NET/Views/Product/AddOrEdit.cshtml @@ -16,26 +16,19 @@ @if (!Model.AddsNew) { - #pragma warning disable CS8602 // False positive, cannot happen in template usage Html.HiddenFor(m => m.Product.ProductId); Html.HiddenFor(m => m.Product.SupplierId); - #pragma warning restore CS8602
- @{ #pragma warning disable CS8602 } @Html.LabelFor(m => m.Product.ProductId) - @{ #pragma warning restore CS8602 } @Model.Product?.ProductId
}- @{ #pragma warning disable CS8602 } @Html.LabelFor(m => m.Product.ProductName) @Html.TextBoxFor(m => m.Product.ProductName, new { @value = Model.Product?.ProductName }) @Html.ValidationMessageFor(m => m.Product.ProductName) - @{ #pragma warning restore CS8602 }
- @{ #pragma warning disable CS8602 } @Html.LabelFor(m => m.Product.Category) - @{ #pragma warning restore CS8602 }
- @{ #pragma warning disable CS8602 }@Html.LabelFor(m => m.Product.QuantityPerUnit) @Html.TextBoxFor(m => m.Product.QuantityPerUnit, new { @value = Model.Product?.QuantityPerUnit }) @@ -75,11 +66,9 @@ @Html.TextBoxFor(m => m.Product.ReorderLevel, new { @value = Model.Product?.ReorderLevel }) @Html.ValidationMessageFor(m => m.Product.ReorderLevel)
- @{ #pragma warning restore CS8602 } @if (Model.AddsNew) {- @{ #pragma warning disable CS8602 } @Html.LabelFor(m => m.Product.Supplier) @if(Model.Suppliers != null) { @@ -93,14 +82,11 @@ } @Html.ValidationMessageFor(m => m.Product.Supplier) - @{ #pragma warning restore CS8602 }
}- @{ #pragma warning disable CS8602 } @Html.CheckBoxFor(m => m.Product.Discontinued, new { @checked = Model.Product?.Discontinued ?? false }) @Html.LabelFor(m => m.Product.Discontinued) - @{ #pragma warning restore CS8602 }