213
This commit is contained in:
parent
7f086ae865
commit
22dec950e5
@ -19,9 +19,9 @@ public class PlacingAthlete
|
|||||||
public string RoomName { get; private set; } = string.Empty;
|
public string RoomName { get; private set; } = string.Empty;
|
||||||
[DisplayName("Дата заселения")]
|
[DisplayName("Дата заселения")]
|
||||||
public DateTime PlacingDate { get; private set; }
|
public DateTime PlacingDate { get; private set; }
|
||||||
[DisplayName("Корма")]
|
[DisplayName("Спортсмены")]
|
||||||
public string athlete => AthletePlacingAthlete != null ?
|
public string Athlete => AthletePlacingAthletes != null ?
|
||||||
string.Join(", ", AthletePlacingAthlete.Select(x => $"{x.AthleteName} {x.Count}")) : string.Empty;
|
string.Join(", ", AthletePlacingAthletes.Select(x => $"{x.AthleteName} {x.LengthOfStay}")) : string.Empty;
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public IEnumerable<AthletePlacingAthlete> AthletePlacingAthletes
|
public IEnumerable<AthletePlacingAthlete> AthletePlacingAthletes
|
||||||
|
@ -100,11 +100,11 @@ internal class PlacingAthleteRepository : IPlacingAthleteRepository
|
|||||||
|
|
||||||
|
|
||||||
using var connection = new NpgsqlConnection(_connectionString.ConnectionString);
|
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
|
FROM PlacingAthlete pa
|
||||||
INNER JOIN AthletePlacingAthlete apa ON apa.PlacingAthleteId = pa.Id
|
INNER JOIN AthletePlacingAthlete apa ON apa.PlacingAthleteId = pa.Id
|
||||||
LEFT JOIN Rooms r ON r.Id = pa.RoomId
|
LEFT JOIN Rooms r ON r.Id = pa.RoomId
|
||||||
{builder.Build()};";
|
{builder.Build()}";
|
||||||
//var placingAthletes = connection.Query<TempAthletePlacingAthlete>(querySelect);
|
//var placingAthletes = connection.Query<TempAthletePlacingAthlete>(querySelect);
|
||||||
var placingAthletesDict = new Dictionary<int, List<AthletePlacingAthlete>>();
|
var placingAthletesDict = new Dictionary<int, List<AthletePlacingAthlete>>();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user