Skip to content

Commit 3bbc44d

Browse files
Updated Module 10 lab after QA
1 parent c3fa043 commit 3bbc44d

File tree

6 files changed

+29
-13
lines changed

6 files changed

+29
-13
lines changed

Allfiles/Mod10/Labfiles/01_ShirtStore_begin/ShirtStoreWebsite/Models/Shirt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class Shirt
1616
public ShirtColor Color { get; set; }
1717
[Required]
1818
public float Price { get; set; }
19-
19+
[Required]
2020
public float Tax { get; set; }
2121

2222
public string GetFormattedTaxedPrice()

Allfiles/Mod10/Labfiles/01_ShirtStore_begin/ShirtStoreWebsite/Views/Shared/_NewShirtForm.cshtml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
<input asp-for="Price" class="form-control" />
2222
<span asp-validation-for="Price" class="text-danger"></span>
2323
</div>
24+
<div class="form-group">
25+
<label asp-for="Tax" class="control-label"></label>
26+
<input asp-for="Tax" class="form-control" />
27+
<span asp-validation-for="Tax" class="text-danger"></span>
28+
</div>
2429
<div class="form-group">
2530
<input type="submit" value="Add Shirt to Stock" class="btn btn-default" />
2631
</div>

Allfiles/Mod10/Labfiles/01_ShirtStore_end/ShirtStoreWebsite/Models/Shirt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class Shirt
1616
public ShirtColor Color { get; set; }
1717
[Required]
1818
public float Price { get; set; }
19-
19+
[Required]
2020
public float Tax { get; set; }
2121

2222
public string GetFormattedTaxedPrice()

Allfiles/Mod10/Labfiles/01_ShirtStore_end/ShirtStoreWebsite/Views/Shared/_NewShirtForm.cshtml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
<input asp-for="Price" class="form-control" />
2222
<span asp-validation-for="Price" class="text-danger"></span>
2323
</div>
24+
<div class="form-group">
25+
<label asp-for="Tax" class="control-label"></label>
26+
<input asp-for="Tax" class="form-control" />
27+
<span asp-validation-for="Tax" class="text-danger"></span>
28+
</div>
2429
<div class="form-group">
2530
<input type="submit" value="Add Shirt to Stock" class="btn btn-default" />
2631
</div>

Instructions/20486D_MOD10_LAB_MANUAL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,7 @@ The main tasks for this exercise are as follows:
684684
- Size: **M**
685685
- Color: **Yellow**
686686
- Price: **10**
687+
- Tax: **1.2**
687688

688689
4. In the **Output** tab, locate the following text:
689690
- **A Yellow shirt of size M with a price of $12.00 was added successfully.**
@@ -723,6 +724,7 @@ The main tasks for this exercise are as follows:
723724
- Size: **M**
724725
- Color: **Yellow**
725726
- Price: **10**
727+
- Tax: **1.2**
726728

727729
8. In **File Explorer**, navigate to **Allfiles\Mod10\Labfiles\01_ShirtStore_begin\ShirtStoreWesite**, and open the **shirt_store_logs-XXXXXXXX.txt** file.
728730
>**Note**: The log file does not contain another message because the action was successful and there are no errors.

Instructions/20486D_MOD10_LAK.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -756,23 +756,25 @@ Estimated Time: **60 minutes**
756756

757757
6. In **Microsoft Edge**, on the **Price** text box, type **10**.
758758

759-
7. In **Microsoft Edge**, click **Add Shirt to Stock**.
759+
7. In **Microsoft Edge**, on the **Tax** text box, type **1.2**.
760+
761+
8. In **Microsoft Edge**, click **Add Shirt to Stock**.
760762
>**Note**: The new shirt was added to the bottom of **Shirts in Stock** table.
761763

762-
8. In the **ShirtStore - Microsoft Visual Studio** window, on the **Output** tab, press **ctrl + F**, and then locate the following text:
764+
9. In the **ShirtStore - Microsoft Visual Studio** window, on the **Output** tab, press **ctrl + F**, and then locate the following text:
763765
```
764766
A Yellow shirt of size M with a price of $12.00 was added successfully.
765767
```
766-
9. In the **ShirtStore - Microsoft Visual Studio** window, on the **Output** tab, click **Clear All**.
768+
10. In the **ShirtStore - Microsoft Visual Studio** window, on the **Output** tab, click **Clear All**.
767769

768-
10. In **Microsoft Edge**, on the **Shirts in stock** table, click on the top **Delete** link.
770+
11. In **Microsoft Edge**, on the **Shirts in stock** table, click on the top **Delete** link.
769771

770-
11. In the **ShirtStore - Microsoft Visual Studio** window, in the **Output** tab, press **ctrl + F**, and then locate the following text:
772+
12. In the **ShirtStore - Microsoft Visual Studio** window, in the **Output** tab, press **ctrl + F**, and then locate the following text:
771773
```
772774
A shirt with id 1 was removed successfully.
773775
```
774776

775-
12. In **Microsoft Edge**, in the address bar, type **http://localhost:[port]/Shirt/Delete/-1**, and then press Enter.
777+
13. In **Microsoft Edge**, in the address bar, type **http://localhost:[port]/Shirt/Delete/-1**, and then press Enter.
776778
777779
>**Note**: The browser displays **DeveloperException** page.
778780

@@ -802,18 +804,20 @@ Estimated Time: **60 minutes**
802804

803805
10. In **Microsoft Edge**, on the **Price** text box, type **10**.
804806

805-
11. In **Microsoft Edge**, click **Add Shirt to Stock**.
807+
11. In **Microsoft Edge**, on the **Tax** text box, type **1.2**.
808+
809+
12. In **Microsoft Edge**, click **Add Shirt to Stock**.
806810
>**Note**: The new shirt was added to the bottom of **Shirts in Stock** table.
807811

808-
12. In **Microsoft Edge**, click **Close**.
812+
13. In **Microsoft Edge**, click **Close**.
809813

810-
13. In **File Explorer**, navigate to **Allfiles\Mod10\Labfiles\01_ShirtStore_begin\ShirtStoreWesite**, and then double-click **shirt_store_logs-XXXXXXXX.txt**.
814+
14. In **File Explorer**, navigate to **Allfiles\Mod10\Labfiles\01_ShirtStore_begin\ShirtStoreWesite**, and then double-click **shirt_store_logs-XXXXXXXX.txt**.
811815

812816
>**Note**: The log file does not contain another message because the action was successful and there are no errors.
813817

814-
14. In **shirt_store_logs-XXXXXXXX.txt** window, click **Close**.
818+
15. In **shirt_store_logs-XXXXXXXX.txt** window, click **Close**.
815819

816-
15. In the **ShirtStore - Microsoft Visual Studio** window, on the **FILE** menu, click **Exit**.
820+
16. In the **ShirtStore - Microsoft Visual Studio** window, on the **FILE** menu, click **Exit**.
817821

818822
>**Results**: At the end of this exercise, you will be able to add logging in different logging levels in different environments, displaying errors or information by writing into a log file or a console output in a desired format, and creating a mock substitute using a mocking framework.
819823

0 commit comments

Comments
 (0)