private void button1_Click(object sender, EventArgs e) { if (txtSifre.Text == txtsifretekrar.Text) { bool ibanolustumakarar = true; bool hesapolusturmakarar = true; Random rastgele = new Random(); string ibanolustur = "TR " + rastgele.Next(10, 90) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(10, 99); int sonuc = BLL.IBAN_ARA(ibanolustur); while (ibanolustumakarar) { if (sonuc >= 1) { ibanolustur = "TR " + rastgele.Next(10, 90) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(10, 99); } else { ibanolustumakarar = false; } } string hesapno = rastgele.Next(100000, 999999).ToString() + rastgele.Next(10000, 99999).ToString(); int sonuc2 = BLL.HESAP_ARA(hesapno); while (hesapolusturmakarar) { if (sonuc2 >= 1) { hesapno = "TR " + rastgele.Next(10, 90) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(1000, 9999) + " " + rastgele.Next(10, 99); } else { hesapolusturmakarar = false; } } int ekle = BLL.Musteri_Ekle(txtTC.Text.Trim(), txtIsim.Text, txtSoyisim.Text, txttelefon.Text.Trim(), txtmail.Text, txtadres.Text, txtSifre.Text, 500, hesapno, ibanolustur); if (ekle > 0) { MessageBox.Show("Eklendi"); } else { MessageBox.Show("Hata."); } } else { MessageBox.Show("Şifreler Uyuşmuyor"); } }
private void button2_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txt_HesapTutar.Text)) { MessageBox.Show("TUTAR GİRİN"); return; } double kalan = ((bakiye) - int.Parse(txt_HesapTutar.Text)); if (kalan < 0) { MessageBox.Show("Limit Uygun Değil.."); } else { if (txt_HesapNo.Text.Trim().Length == 11) { int sonuc = BLL.HESAP_ARA(txt_HesapNo.Text.Trim()); if (sonuc > 0) { int yatirmasonuc = BLL.HESAP_YATIR(txt_HesapNo.Text, int.Parse(txt_HesapTutar.Text)); if (yatirmasonuc == -1) { MessageBox.Show("HATA"); } else { MessageBox.Show("YATIRILDI..."); int result = BLL.Para_Cekim(TC, kalan); ANASAYFA ANA = new ANASAYFA(); ANA.TC = TC; ANA.Show(); this.Hide(); } } else { MessageBox.Show("HESAP TANIMSIZ.."); } } else { MessageBox.Show("HESAP GEÇERSİZ"); } } }