public KrediKarti(Yolcu y) { this.yolcu = y; }
private void btnOdemeIslemi_Click(object sender, EventArgs e) { decimal tempSonuc = 0; int deger = Convert.ToInt32(cmbTekYolcu.Text); for (int i = 1; i <= deger; i++) { Control c1 = grpYolcu.Controls["pnlTekYolcu" + i]; Yolcu y = new Yolcu(); y.TC = c1.Controls["txtTc" + i].Text; y.Ad = c1.Controls["txtAd" + i].Text; y.Soyad = c1.Controls["txtSoyad" + i].Text; var Kayit = yolcuveri.KayitliYolcular.Where(x => x.TC == y.TC).FirstOrDefault(); if (Kayit != null) { y.Puan = yolcuveri.YolcuPuani(y); y.Ad = Kayit.Ad; y.Soyad = Kayit.Soyad; } else { yolcuveri.KayitliYolcular.Add(y); } y1 = y; RadioButton rd1 = c1.Controls["rdTam" + i] as RadioButton; RadioButton rd2 = c1.Controls["rdOgrenci" + i] as RadioButton; if (rd1.Checked) { Tam t = new Tam(y); tempSonuc = BiletHesapla(t, i); } else if (rd2.Checked) { Ogrenci o = new Ogrenci(y); tempSonuc = BiletHesapla(o, i); } else { Ogretmen o = new Ogretmen(y); tempSonuc = BiletHesapla(o, i); } grpOdeme.Enabled = true; lblTutar.Text = sonuc.ToString("C2"); grpSeyahat.Enabled = grpYolcu.Enabled = false; } }
public Nakit(Yolcu y) { this.yolcu = y; }
public decimal YolcuPuani(Yolcu y) { var TCsi = KayitliYolcular.Where(x => x.TC == y.TC).FirstOrDefault(); snPuan = TCsi.Puan; return snPuan; }
public Puan(Yolcu y) { yolcu = y; }
public Ogretmen(Yolcu y) { yolcu = y; TarifeAdi = "Öğretmen Bilet"; }
public Ogrenci(Yolcu y) { yolcu = y; TarifeAdi = "Öğrenci Bilet"; }
public Tam(Yolcu y) { yolcu = y; TarifeAdi = "Tam Bilet"; }