Skip to content
Snippets Groups Projects
Commit ca463333 authored by Daniel Lorych's avatar Daniel Lorych :cookie:
Browse files

Add initial view for ConfiguratorResults

parent e6711c49
No related branches found
No related tags found
No related merge requests found
......@@ -24,11 +24,11 @@ namespace Helios.Controllers
return View();
}
public ActionResult SubmitSystem(ConfiguratorInput input)
public ActionResult ConfiguratorResult(ConfiguratorInput input)
{
_service.GetResults(input);
var model = _service.GetResults(input);
return View("Index");
return View(model);
}
}
......
using System;
using System.ComponentModel;
namespace Helios.Models
{
public class ConfiguratorResult
{
public double RoofArea { get; set; }
public double RoofAngle { get; set; }
[DisplayName("Panel Efficiency")]
public double PanelEfficiency { get; set; }
[DisplayName("Installation Cost")]
public double InstallationCost { get; set; }
[DisplayName("Power Generated in Summer")]
public double PowerGeneratedSummer { get; set; }
[DisplayName("Power Generated in Winter")]
public double PowerGeneratedWinter { get; set; }
[DisplayName("Meets Energy Requirement")]
public bool GeneratesRequiredPower { get; set; }
[DisplayName("Exceeds Max Power")]
public bool ExceedsMaximumPower { get; set; }
[DisplayName("Is Within Budget")]
public bool WithinBudget { get; set; }
public ConfiguratorResult()
......
@model IEnumerable<Helios.Models.ConfiguratorResult>
@{
ViewData["Title"] = "Configuration Results";
}
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.PanelEfficiency)
</th>
<th>
@Html.DisplayNameFor(model => model.InstallationCost)
</th>
<th>
@Html.DisplayNameFor(model => model.PowerGeneratedSummer)
</th>
<th>
@Html.DisplayNameFor(model => model.PowerGeneratedWinter)
</th>
<th>
@Html.DisplayNameFor(model => model.GeneratesRequiredPower)
</th>
<th>
@Html.DisplayNameFor(model => model.ExceedsMaximumPower)
</th>
<th>
@Html.DisplayNameFor(model => model.WithinBudget)
</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.PanelEfficiency)
</td>
<td>
@Html.DisplayFor(modelItem => item.InstallationCost)
</td>
<td>
@Html.DisplayFor(modelItem => item.PowerGeneratedSummer)
</td>
<td>
@Html.DisplayFor(modelItem => item.PowerGeneratedWinter)
</td>
<td>
@Html.DisplayFor(modelItem => item.GeneratesRequiredPower)
</td>
<td>
@Html.DisplayFor(modelItem => item.ExceedsMaximumPower)
</td>
<td>
@Html.DisplayFor(modelItem => item.WithinBudget)
</td>
</tr>
}
</table>
\ No newline at end of file
......@@ -4,7 +4,7 @@
ViewData["Title"] = "Configuration Page";
}
@using (Html.BeginForm(actionName: "SubmitSystem", controllerName: "Configurator", Model))
@using (Html.BeginForm(actionName: "ConfiguratorResult", controllerName: "Configurator", Model))
{
<div class="form-horizontal">
<h4>Configurator Input</h4>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment