Fuel Log Match
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Fuel Logs";
|
||||
var grid = new WebGrid(Model.Logs, rowsPerPage: 45);
|
||||
var grid = new WebGrid(Model.FuelLogs, rowsPerPage: 45);
|
||||
var parameters = new {Model.Year, Model.Month};
|
||||
}
|
||||
@section Styles {
|
||||
@@ -43,23 +43,21 @@
|
||||
grid.Columns(
|
||||
grid.Column("Date", format: item => item.Date.ToString("d")),
|
||||
grid.Column("DriverFullName", "Driver Name"),
|
||||
grid.Column("TagNumber"),
|
||||
grid.Column("TagNumber", "Tag Number"),
|
||||
grid.Column("Odometer"),
|
||||
grid.Column("MPG"),
|
||||
grid.Column("GasPurchased", "Gas Purchased", @<text>@String.Format("{0:0.000}", item.GasPurchased)</text>),
|
||||
grid.Column("TotalPrice", "Total Price", @<text>@String.Format("{0:C}", item.TotalPrice)</text>),
|
||||
grid.Column("Log", "Matched Log", @<text>
|
||||
@(item.Log != null
|
||||
? Html.ActionLink("View Log", "Details", "Log", new {id = item.Log.LogId}, new {@class = "btn btn-mini", target="_blank"})
|
||||
@(item.LogId != null
|
||||
? Html.ActionLink("View Match", "Match", new {id = item.FuelLogId}, new {@class = "btn btn-mini", target="_blank"})
|
||||
: Html.ActionLink("Match", "Match", new {id = item.FuelLogId}, new {@class = "btn btn-warning btn-mini", target="_blank"}))
|
||||
</text>),
|
||||
grid.Column("Total Results: " + Model.Logs.Count(), canSort:false, format:
|
||||
@<div class='btn-group'> @Html.ActionLink("Details", "Details", new { id = item.FuelLogId }, new { @class = "btn btn-mini" }) </div>)),
|
||||
</text>)),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed"},
|
||||
numericLinksCount: 20
|
||||
)
|
||||
</div>
|
||||
@if (!Model.Logs.Any())
|
||||
@if (!Model.FuelLogs.Any())
|
||||
{
|
||||
<div>
|
||||
No results.
|
||||
|
||||
Reference in New Issue
Block a user