﻿@model Cash_Flow_Projection.Models.Dashboard

@{
    ViewData["Title"] = "Home Page";
}

<table class="table table-striped">
    @foreach (var entry in Model.Entries.OrderBy(_ => _.Date))
    {
        <tr>
            <td>@Html.DisplayFor(_ => entry.Date)</td>
            <td>@Html.DisplayFor(_ => entry.Description)</td>
            <td>@Html.DisplayFor(_ => entry.Amount)</td>
            <td>@Cash_Flow_Projection.Models.Balance.BalanceAsOf(Model.Entries, entry.Date)</td>
            <td>
                @using (Html.BeginForm("Delete", "Home", new { id = entry.id }, FormMethod.Post))
                {
                    @Html.AntiForgeryToken()
                    <button type="submit">Delete</button>
                }
            </td>
        </tr>

    }
</table>
﻿@model Cash_Flow_Projection.Models.Dashboard

@{
    ViewData["Title"] = "Home Page";
}

@using (Html.BeginForm("Balance", "Home", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    <input type="text" id="balance" placeholder="Set Balance" />
    <button type="submit">Set</button>
}

<table class="table table-striped">
    @foreach (var entry in Model.Entries.OrderBy(_ => _.Date))
    {
        <tr>
            <td>@Html.DisplayFor(_ => entry.Date)</td>
            <td>@Html.DisplayFor(_ => entry.Description)</td>
            <td>@Html.DisplayFor(_ => entry.Amount)</td>
            <td>@Cash_Flow_Projection.Models.Balance.BalanceAsOf(Model.Entries, entry.Date)</td>
            <td>
                @using (Html.BeginForm("Delete", "Home", new { id = entry.id }, FormMethod.Post))
                {
                    @Html.AntiForgeryToken()
                    <button type="submit">Delete</button>
                }
            </td>
        </tr>
    }
</table>
Add form for setting balance in one step
Add form for setting balance in one step

Fixes #7
