PIbd-21 Permyakov R. G. Lab4 #4

Closed
Roman wants to merge 3 commits from Lab4 into Lab3
4 changed files with 5 additions and 2 deletions
Showing only changes of commit 6852324245 - Show all commits

View File

@ -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)
{

View File

@ -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)

View File

@ -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";
}

View File

@ -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();
}
}