PIbd-21 Permyakov R. G. Lab4 #4
@ -25,6 +25,8 @@ namespace RealEstateTransactions.Entities
|
||||
[DisplayName("Стоимость от агенства")]
|
||||
public float Desired_price { get; private set; }
|
||||
|
||||
public string GetStr { get => $"{Agency_ID.ToString()} {Area.ToString()}"; }
|
||||
|
||||
public static Apartment CreateApartment(int id, AgencyType agencyId, FormFactorType formFactorId, float area,
|
||||
float pricePerSM, float basePrice, float desiredPrice)
|
||||
{
|
||||
|
@ -80,6 +80,7 @@ namespace RealEstateTransactions.Forms
|
||||
{
|
||||
dataGridView.DataSource = _repository.ReadApartments();
|
||||
dataGridView.Columns["Id"].Visible = false;
|
||||
dataGridView.Columns["GetStr"].Visible = false;
|
||||
}
|
||||
|
||||
private bool TryGetIdentifierFormSelectedRow(out int id)
|
||||
|
@ -13,7 +13,7 @@ namespace RealEstateTransactions.Forms
|
||||
InitializeComponent();
|
||||
_container = container ?? throw new ArgumentNullException(nameof(container));
|
||||
comboBoxApartmentId.DataSource = repository.ReadApartments();
|
||||
comboBoxApartmentId.DisplayMember = "Id";
|
||||
comboBoxApartmentId.DisplayMember = "GetStr";
|
||||
comboBoxApartmentId.ValueMember = "Id";
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace RealEstateTransactions.Reports
|
||||
{
|
||||
return _dealRepository
|
||||
.ReadDeals(dateFrom: dateTime.Date, dateTo: dateTime.Date.AddDays(1))
|
||||
.Select(x => (x.Apartment_ID.ToString(), (double)x.Deal_price))
|
||||
.Select(x => (x.BuyerName, (double)x.Deal_price))
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user