@page @using LinqToDB @using Microsoft.AspNetCore.Http @using Microsoft.AspNetCore.Http.Extensions @using Microsoft.AspNetCore.Mvc.TagHelpers @using trainav.web.Utils @using trainav.web.database @model IndexModel @{ ViewData["Title"] = "Home"; }
Here are your planned trips.
Origin | Via | Destination | Comments | Actions |
---|---|---|---|---|
@legs.First().DepStation.Delimit(35)
@DateTime.Parse(legs.First().DepTime).ToString("ddd dd.MM.yyyy, HH:mm") |
@((from index in from leg in legs where leg.TrainType == "placeholder" select legs.IndexOf(leg) select legs[index - 1].ArrStation.Delimit(35)).ToList().DefaultIfEmpty("-").Aggregate((s1, s2) => $"{s1}, {s2}")) |
@legs.Last().ArrStation.Delimit(35)
@DateTime.Parse(legs.Last().ArrTime).ToString("ddd dd.MM.yyyy, HH:mm") |
@Html.Raw(legs.Where(leg => !string.IsNullOrWhiteSpace(leg.Comment)).Select(p => p.Comment.Replace(", ", " ")).DefaultIfEmpty("").Aggregate((s1, s2) => $"{s1} {s2}")) |
View Delete |