Skip to content

Commit 7276d5e

Browse files
committed
updated controllers
1 parent 7be409c commit 7276d5e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/SamSmithNZ.Web/Controllers/MandMCounterController.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public async Task<IActionResult> Index(string volumeUnit = null,
2525
float? mandMResult = null,
2626
float? peanutMandMResult = null,
2727
float? skittlesResult = null,
28-
float? JellyBeansResult = null)
28+
float? jellyBeansResult = null)
2929
{
3030
//Get the dropdown values
3131
List<string> unitsForVolume = await _ServiceApiClient.GetUnitsForVolume();
@@ -75,7 +75,7 @@ public async Task<IActionResult> Index(string volumeUnit = null,
7575
}
7676
if (mandMResult != null)
7777
{
78-
model.JellyBeans = (float)JellyBeansResult;
78+
model.JellyBeans = (float)jellyBeansResult;
7979
}
8080
//Select the target active tab
8181
model.ActiveTab = "0";
@@ -97,14 +97,14 @@ public async Task<IActionResult> RunVolumeCalculation(string VolumeUnit, string
9797
float mandMResult = 0f;
9898
float peanutMandMResult = 0f;
9999
float skittlesResult = 0f;
100-
float JellyBeansResult = 0f;
100+
float jellyBeansResult = 0f;
101101
float quantity;
102102
if (float.TryParse(txtQuantity, out quantity) == true)
103103
{
104104
mandMResult = await _ServiceApiClient.GetMandMDataForUnit(VolumeUnit, quantity);
105105
peanutMandMResult = await _ServiceApiClient.GetPeanutMandMDataForUnit(VolumeUnit, quantity);
106106
skittlesResult = await _ServiceApiClient.GetSkittlesDataForUnit(VolumeUnit, quantity);
107-
JellyBeansResult = await _ServiceApiClient.GetJellyBeansDataForUnit(VolumeUnit, quantity);
107+
jellyBeansResult = await _ServiceApiClient.GetJellyBeansDataForUnit(VolumeUnit, quantity);
108108
}
109109

110110
return RedirectToAction("Index", new
@@ -123,7 +123,7 @@ public async Task<IActionResult> RunRectangleCalculation(string ContainerUnit, s
123123
float mandMResult = 0f;
124124
float peanutMandMResult = 0f;
125125
float skittlesResult = 0f;
126-
float JellyBeansResult = 0f;
126+
float jellyBeansResult = 0f;
127127
float height;
128128
float width;
129129
float length;
@@ -134,7 +134,7 @@ public async Task<IActionResult> RunRectangleCalculation(string ContainerUnit, s
134134
mandMResult = await _ServiceApiClient.GetMandMDataForRectangle(ContainerUnit, height, width, length);
135135
peanutMandMResult = await _ServiceApiClient.GetPeanutMandMDataForRectangle(ContainerUnit, height, width, length);
136136
skittlesResult = await _ServiceApiClient.GetSkittlesDataForRectangle(ContainerUnit, height, width, length);
137-
JellyBeansResult = await _ServiceApiClient.GetJellyBeansDataForRectangle(ContainerUnit, height, width, length);
137+
jellyBeansResult = await _ServiceApiClient.GetJellyBeansDataForRectangle(ContainerUnit, height, width, length);
138138
}
139139

140140
return RedirectToAction("Index", new
@@ -155,7 +155,7 @@ public async Task<IActionResult> RunCylinderCalculation(string ContainerUnit, st
155155
float mandMResult = 0f;
156156
float peanutMandMResult = 0f;
157157
float skittlesResult = 0f;
158-
float JellyBeansResult = 0f;
158+
float jellyBeansResult = 0f;
159159
float height;
160160
float radius;
161161
if (float.TryParse(txtHeight, out height) == true &&
@@ -164,7 +164,7 @@ public async Task<IActionResult> RunCylinderCalculation(string ContainerUnit, st
164164
mandMResult = await _ServiceApiClient.GetMandMDataForCylinder(ContainerUnit, height, radius);
165165
peanutMandMResult = await _ServiceApiClient.GetPeanutMandMDataForCylinder(ContainerUnit, height, radius);
166166
skittlesResult = await _ServiceApiClient.GetSkittlesDataForCylinder(ContainerUnit, height, radius);
167-
JellyBeansResult = await _ServiceApiClient.GetJellyBeansDataForCylinder(ContainerUnit, height, radius);
167+
jellyBeansResult = await _ServiceApiClient.GetJellyBeansDataForCylinder(ContainerUnit, height, radius);
168168
}
169169

170170
return RedirectToAction("Index", new

src/SamSmithNZ.Web/Views/Home/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<a class="b-link-fade b-animate-go" href="@Url.Action("Index", "MandMCounter")">
3939
<img width="350" height="200" src="~/Images/NewHomePage/mandms.jpeg" alt="">
4040
</a>
41-
<p>A few years ago in an office competition, I poorly guessed the number of M&M's in a jar. This project uses math to try to work around this. Also supports Skittles and Peanut M&M's <a href="@Url.Action("Index", "MandMCounter")">View M&M Counter &raquo;</a></p>
41+
<p>A few years ago in an office competition, I poorly guessed the number of M&M's in a jar. This project uses math to try to work around this. Also supports Skittles, Jelly Beans, and Peanut M&M's <a href="@Url.Action("Index", "MandMCounter")">View M&M Counter &raquo;</a></p>
4242
</div>
4343
</div>
4444

0 commit comments

Comments
 (0)