This commit is contained in:
Azim06 2024-12-25 12:43:16 +04:00
parent 7f086ae865
commit 22dec950e5
2 changed files with 8 additions and 8 deletions

View File

@ -19,9 +19,9 @@ public class PlacingAthlete
public string RoomName { get; private set; } = string.Empty;
[DisplayName("Дата заселения")]
public DateTime PlacingDate { get; private set; }
[DisplayName("Корма")]
public string athlete => AthletePlacingAthlete != null ?
string.Join(", ", AthletePlacingAthlete.Select(x => $"{x.AthleteName} {x.Count}")) : string.Empty;
[DisplayName("Спортсмены")]
public string Athlete => AthletePlacingAthletes != null ?
string.Join(", ", AthletePlacingAthletes.Select(x => $"{x.AthleteName} {x.LengthOfStay}")) : string.Empty;
[Browsable(false)]
public IEnumerable<AthletePlacingAthlete> AthletePlacingAthletes

View File

@ -100,11 +100,11 @@ internal class PlacingAthleteRepository : IPlacingAthleteRepository
using var connection = new NpgsqlConnection(_connectionString.ConnectionString);
var querySelect = @"SELECT pa.*, apa.*, r.Name AS RoomName
var querySelect = $@"SELECT pa.*, apa.*, r.Name AS RoomName
FROM PlacingAthlete pa
INNER JOIN AthletePlacingAthlete apa ON apa.PlacingAthleteId = pa.Id
LEFT JOIN Rooms r ON r.Id = pa.RoomId
{builder.Build()};";
{builder.Build()}";
//var placingAthletes = connection.Query<TempAthletePlacingAthlete>(querySelect);
var placingAthletesDict = new Dictionary<int, List<AthletePlacingAthlete>>();