private void btnOde_Click(object sender, EventArgs e) { Kullanici kullanici = new Kullanici(); if (radioAidat.Checked == false && radioElektrik.Checked == false && radioSu.Checked == false && radioDogalgaz.Checked == false) { MessageBox.Show("Ödenecek borcu seçiniz.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else if (IBAN == null && AdSoyad == null) { MessageBox.Show("Ödeme yapabilecek kayıtlı hesap bulunmamaktadır.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { if (kullanici.KontrolEt(daireNo, parola)) { if (daireNo == 1) { if (radioAidat.Checked == true) { kullanici.aylikAidatOdemesi = true; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabında ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label2.Text = "Aidat Borcu : Ödendi."; } else if (radioElektrik.Checked == true) { kullanici.elektrik = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabında ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label3.Text = "Elektrik Faturası : Ödendi."; } else if (radioSu.Checked == true) { kullanici.su = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabında ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label4.Text = "Su Faturası : Ödendi."; } else if (radioDogalgaz.Checked == true) { kullanici.dogalgaz = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabında ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label5.Text = "Doğalgaz Faturası : Ödendi."; } } else if (daireNo == 2) { if (radioAidat.Checked == true) { kullanici.aylikAidatOdemesi = true; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabından ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label2.Text = "Aidat Borcu : Ödendi."; } else if (radioElektrik.Checked == true) { kullanici.elektrik = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabından ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label3.Text = "Elektrik Faturası : Ödendi."; } else if (radioSu.Checked == true) { kullanici.su = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabında ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label4.Text = "Su Faturası : Ödendi."; } else if (radioDogalgaz.Checked == true) { kullanici.dogalgaz = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabında ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label5.Text = "Doğalgaz Faturası : Ödendi."; } } else if (daireNo == 3) { if (radioAidat.Checked == true) { kullanici.aylikAidatOdemesi = true; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabından ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label2.Text = "Aidat Borcu : Ödendi."; } else if (radioElektrik.Checked == true) { kullanici.elektrik = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabından ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label3.Text = "Elektrik Faturası : Ödendi."; } else if (radioSu.Checked == true) { kullanici.su = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabında ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label4.Text = "Su Faturası : Ödendi."; } else if (radioDogalgaz.Checked == true) { kullanici.dogalgaz = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabında ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label5.Text = "Doğalgaz Faturası : Ödendi."; } } else if (daireNo == 4) { if (radioAidat.Checked == true) { kullanici.aylikAidatOdemesi = true; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabından ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label2.Text = "Aidat Borcu : Ödendi."; } else if (radioElektrik.Checked == true) { kullanici.elektrik = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabından ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label3.Text = "Elektrik Faturası : Ödendi."; } else if (radioSu.Checked == true) { kullanici.su = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabında ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label4.Text = "Su Faturası : Ödendi."; } else if (radioDogalgaz.Checked == true) { kullanici.dogalgaz = 0; MessageBox.Show("İşleminiz devam ediyor...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(AdSoyad + "\n\nTR" + IBAN + "\n\nHesabında ödeme yapılmıştır.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); label5.Text = "Doğalgaz Faturası : Ödendi."; } } } } }
private void btnBilgi_Click(object sender, EventArgs e) { Kullanici k1 = new Kullanici(); Kullanici k2 = new Kullanici(); Kullanici k3 = new Kullanici(); Kullanici k4 = new Kullanici(); k1.KontrolEt(1, "1234"); k2.KontrolEt(2, "1234"); k3.KontrolEt(3, "1234"); k4.KontrolEt(4, "1234"); if (Convert.ToInt32(textBox1.Text) == 1) { label2.Text = "Ad Soyad : \n-" + k1.AdSoyad; label5.Text = "Mülk Durumu :\n-" + k1.mulkDurumu; if (k1.aylikAidatOdemesi == true) { label6.Text = "Aidat Borcu :\n-Ödendi."; } else { label6.Text = "Aidat Borcu :\n-180 TL borcu var."; } } else if (Convert.ToInt32(textBox1.Text) == 2) { label2.Text = "Ad Soyad : \n-" + k2.AdSoyad; label5.Text = "Mülk Durumu :\n-" + k2.mulkDurumu; if (k2.aylikAidatOdemesi == true) { label6.Text = "Aidat Borcu :\n-Ödendi."; } else { label6.Text = "Aidat Borcu :\n-180 TL borcu var."; } } else if (Convert.ToInt32(textBox1.Text) == 3) { label2.Text = "Ad Soyad : \n-" + k3.AdSoyad; label5.Text = "Mülk Durumu :\n-" + k3.mulkDurumu; if (k3.aylikAidatOdemesi == true) { label6.Text = "Aidat Borcu :\n-Ödendi."; } else { label6.Text = "Aidat Borcu :\n-180 TL borcu var."; } } else if (Convert.ToInt32(textBox1.Text) == 4) { label2.Text = "Ad Soyad : \n-" + k4.AdSoyad; label5.Text = "Mülk Durumu :\n-" + k4.mulkDurumu; if (k4.aylikAidatOdemesi == true) { label6.Text = "Aidat Borcu :\n-Ödendi."; } else { label6.Text = "Aidat Borcu :\n-180 TL borcu var."; } } }