private void frmAracSorgulama_Load(object sender, EventArgs e) { List<cArac> list = new List<cArac>(); cArac a = new cArac(); //list = a.AraclariGetir(); //dgvAraclar.DataSource = dt; dgvAraclar.DataSource = a.AraclariGetir(); //dgvAraclar.Columns["Silindi"].Width = 0; }
private void cbYakitTuru_SelectedIndexChanged(object sender, EventArgs e) { if (cbYakitTuru.SelectedItem.ToString() == "Dizel" || cbYakitTuru.SelectedItem.ToString() == "Benzin" || cbYakitTuru.SelectedItem.ToString() == "Benzin/LPG") { cArac a = new cArac(); dgvAraclar.DataSource = a.AraclariGetirByYakitTipi(cbYakitTuru.SelectedItem.ToString()); } else { cArac a = new cArac(); dgvAraclar.DataSource = a.AraclariGetir(); } }
private void cbSanzimanTipi_SelectedIndexChanged(object sender, EventArgs e) { if (cbSanzimanTipi.SelectedItem.ToString() == "Manuel" || cbSanzimanTipi.SelectedItem.ToString() == "Otomatik") { cArac a = new cArac(); dgvAraclar.DataSource = a.AraclariGetirBySanzimanTipi(cbSanzimanTipi.SelectedItem.ToString()); } else { cArac a = new cArac(); dgvAraclar.DataSource = a.AraclariGetir(); } }
private void btnGetir_Click(object sender, EventArgs e) { cArac a = new cArac(); if (cbSanzimanTipi.SelectedItem.ToString() == "Hepsi" && cbYakitTuru.SelectedItem.ToString() == "Hepsi" && cbKiraDurumu.SelectedItem.ToString() == "Hepsi" && txtMarkayaGore.Text == null) { a.AraclariGetir(); } else { bool kiradurumu = true; if (cbKiraDurumu.SelectedItem.ToString() == "Uygun") { kiradurumu = true; } else if (cbKiraDurumu.SelectedItem.ToString() == "Uygun Değil") { kiradurumu = false; } dgvAraclar.DataSource = a.AraclariGetirByDetayli(cbSanzimanTipi.SelectedItem.ToString(), cbYakitTuru.SelectedItem.ToString(), kiradurumu,cbKiraDurumu.SelectedItem.ToString(),txtMarkayaGore.Text); } }
private void frmAracSorgulama_Load(object sender, EventArgs e) { this.Top = 0; this.Left = 0; List<cArac> list = new List<cArac>(); cArac a = new cArac(); txtMarkayaGore.Text = ""; cbKiraDurumu.SelectedIndex = 1; cbSanzimanTipi.SelectedIndex = 0; cbYakitTuru.SelectedIndex = 0; dgvAraclar.DataSource = a.AraclariGetir(); }