public UiEditHouse(string privateNumber, byte houseType) { InitializeComponent(); cmbHouseType.Items.Add(Core.House.Type.Daire); cmbHouseType.Items.Add(Core.House.Type.Bahçeli); cmbHouseType.Items.Add(Core.House.Type.Dubleks); cmbHouseType.Items.Add(Core.House.Type.Müstakil); foreach (string item in adresCities.ListCity(Application.StartupPath)) { cmbCities.Items.Add(item); } cmbHouseType.SelectedIndex = 2; cmbCities.SelectedIndex = 0; cmbDisc.SelectedIndex = 0; this.houseType = houseType; this.privateNumber = privateNumber; if (houseType == 0) { have.FindRent(privateNumber); lblSell.Text = "Depozitosu : "; numRoomCount.Value = have.FindRent(privateNumber).RoomCount; numFloor.Value = have.FindRent(privateNumber).FloorNumber; numSize.Value = (decimal)have.FindRent(privateNumber).HouseSize; dateTimePicker1.Value = have.FindRent(privateNumber).BuildDate; cmbHouseType.SelectedItem = have.FindRent(privateNumber).HouseType; cmbCities.SelectedItem = have.FindRent(privateNumber).Adress.City; cmbDisc.SelectedItem = have.FindRent(privateNumber).Adress.District; txtStreet.Text = have.FindRent(privateNumber).Adress.Street; numDoorNumber.Value = decimal.Parse(have.FindRent(privateNumber).Adress.DoorNumber); numSellorDeposit.Value = (decimal)have.FindRent(privateNumber).RentDeposit; numRentPrice.Value = (decimal)have.FindRent(privateNumber).RentPrice; } else if (houseType == 1) { lblRentPrice.Visible = false; numRentPrice.Visible = false; have.FindSale(privateNumber); numRoomCount.Value = have.FindSale(privateNumber).RoomCount; numFloor.Value = have.FindSale(privateNumber).FloorNumber; numSize.Value = (decimal)have.FindSale(privateNumber).HouseSize; dateTimePicker1.Value = have.FindSale(privateNumber).BuildDate; cmbHouseType.SelectedItem = have.FindSale(privateNumber).HouseType; cmbCities.SelectedItem = have.FindSale(privateNumber).Adress.City; cmbDisc.SelectedItem = have.FindSale(privateNumber).Adress.District; txtStreet.Text = have.FindSale(privateNumber).Adress.Street; numDoorNumber.Value = decimal.Parse(have.FindSale(privateNumber).Adress.DoorNumber); numSellorDeposit.Value = (decimal)have.FindSale(privateNumber).SalePrice; } }
private void UINewHouse_Load(object sender, EventArgs e) { cmbHouseType.Items.Add(Core.House.Type.Daire); cmbHouseType.Items.Add(Core.House.Type.Bahçeli); cmbHouseType.Items.Add(Core.House.Type.Dubleks); cmbHouseType.Items.Add(Core.House.Type.Müstakil); foreach (string item in adresCities.ListCity(Application.StartupPath)) { cmbCities.Items.Add(item); } cmbHouseType.SelectedIndex = 2; cmbCities.SelectedIndex = 0; cmbDisc.SelectedIndex = 0; rdSaleTrue.Checked = true; }
public UiFindHouse() { InitializeComponent(); cmbHouseType.Items.Add(Core.House.Type.Daire); cmbHouseType.Items.Add(Core.House.Type.Bahçeli); cmbHouseType.Items.Add(Core.House.Type.Dubleks); cmbHouseType.Items.Add(Core.House.Type.Müstakil); foreach (string item in adresCities.ListCity(Application.StartupPath)) { cmbCities.Items.Add(item); } cmbHouseType.SelectedIndex = 2; cmbCities.SelectedIndex = 0; cmbDisc.SelectedIndex = 0; rdSale.Checked = true; }