private void btn_hesaplistele_Click(object sender, EventArgs e) { Hesap hesap = new Hesap(); hesap.Hesap_Load(sender, e); hesap.ShowDialog(); }
public void button1_Click(object sender, EventArgs e)// hesap bilgisi butonu { Baglanti t = new Baglanti(); if (txt_musterino.Text == "") { MessageBox.Show("Lütfen Hesap Bilgilerini Görmek İstediğiniz Müşteri Numarasını Giriniz"); } else { Hesap hesap = new Hesap(); if (musteriNoKontrol()) { if (hesapNoCek() != null) { hesap.txt_musterino.Text = txt_musterino.Text; hesap.txt_musterino.ReadOnly = true; if (hesapSayısıKontrol() == true) { hesap.txt_hesapno.ReadOnly = true; hesap.txt_iban.ReadOnly = true; hesap.txt_hesapno.Text = hesapNoCek(); hesap.txt_iban.Text = ibanNoCek(); hesap.btn_ekle.Visible = false; hesap.ShowDialog(); } else { hesap.txt_hesapno.ReadOnly = false; hesap.txt_iban.ReadOnly = false; hesap.txt_hesapno.Text = ""; hesap.txt_iban.Text = ""; hesap.btn_ekle.Visible = false; hesap.ShowDialog(); } } } } }
private void btn_git_Click(object sender, EventArgs e) { Baglanti t = new Baglanti(); Hesap hesap = new Hesap(); Form1 form1 = new Form1(); hesap.txt_musterino.Text = txt_musterino.Text; form1.txt_musterino.Text = txt_musterino.Text; if (txt_musterino.Text != "") { if (hesap.musteriNoKontrol()) { if (form1.hesapSayısıKontrol() == true) { form1.txt_musterino.Text = txt_musterino.Text; hesap.txt_hesapno.Text = form1.hesapNoCek(); hesap.txt_iban.Text = form1.ibanNoCek(); hesap.txt_musterino.ReadOnly = true; hesap.txt_hesapno.ReadOnly = true; hesap.txt_iban.ReadOnly = true; hesap.Hesap_Load(sender, e); hesap.ShowDialog(); } else { form1.txt_musterino.Text = txt_musterino.Text; hesap.txt_musterino.ReadOnly = true; hesap.txt_hesapno.Text = ""; hesap.txt_iban.Text = ""; hesap.Hesap_Load(sender, e); hesap.ShowDialog(); } } } else { MessageBox.Show("Lütfen Müşteri Numarası Giriniz"); } }
private void btn_ekle_Click(object sender, EventArgs e) { Baglanti t = new Baglanti(); t.getBaglanti(); if (txt_tcno.Text != "" && txt_ad.Text != "" && txt_soyad.Text != "" && txt_telno.Text != "" && txt_email.Text != "" && txt_adres.Text != "" && txt_sifre.Text != "") { NpgsqlCommand cmdekle = new NpgsqlCommand("insert into musteri(musteri_no,tcno,adi,soyadi,telno,email,adres,sifre) values ('" + txt_musterino.Text + "','" + txt_tcno.Text + "','" + txt_ad.Text + "','" + txt_soyad.Text + "','" + txt_telno.Text + "','" + txt_email.Text + "','" + txt_adres.Text + "','" + txt_sifre.Text + "')", t.getBaglanti()); cmdekle.ExecuteNonQuery(); Hesap hesap = new Hesap(); hesap.txt_musterino.Text = txt_musterino.Text; hesap.txt_hesapno.Text = hesap.hesapNoUret(); hesap.txt_iban.Text = hesap.ibanUret(); hesap.txt_iban.ReadOnly = true; hesap.txt_hesapno.ReadOnly = true; hesap.txt_musterino.ReadOnly = true; hesap.ShowDialog(); btn_yenimusteri.Visible = true; } else { MessageBox.Show("EKSİK BİLGİ GİRDİNİZ"); btn_yenimusteri.Visible = true; } txt_musterino.Text = ""; txt_tcno.Text = ""; txt_ad.Text = ""; txt_soyad.Text = ""; txt_telno.Text = ""; txt_email.Text = ""; txt_adres.Text = ""; txt_sifre.Text = ""; Form1_Load(sender, e); }
private void button1_Click(object sender, EventArgs e)// hesap bilgisi butonu { if (txt_musterino.Text == "") { MessageBox.Show("Lütfen Hesap Bilgilerini Görmek İstediğiniz Müşteri Numarasını Giriniz"); } else { Hesap hesap = new Hesap(); hesap.txt_musterino.Text = txt_musterino.Text; hesap.txt_musterino.ReadOnly = true; hesap.txt_hesapno.Text = hesapNoCek(); hesap.txt_iban.Text = ibanNoCek(); hesap.txt_hesapno.ReadOnly = true; hesap.txt_iban.ReadOnly = true; hesap.btn_ekle.Visible = false; NpgsqlCommand hbilgi = new NpgsqlCommand("Select * from hesap where musteri_no='" + txt_musterino.Text + "'", t.getBaglanti()); NpgsqlDataReader dr = hbilgi.ExecuteReader(); DataTable dt = new DataTable(); dt.Load(dr); hesap.ShowDialog(); hesap.dataGridView1.DataSource = dt; } }