public void ekle() { if (maskedTextBox1.Text.Length != 11) { MessageBox.Show("hata!!! TC numarası giriş Formatınız Yanlıştır."); } else { try { OleDbCommand komut = new OleDbCommand("insert into musteri(tc,adi_soyadi,cinsiyet,telefon,dogum_tarihi,ehliyet_no,sifre,gizli_soru,yaniti) values('" + maskedTextBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox8.Text + "','" + comboBox1.Text + "','" + textBox9.Text + "')", baglanti); // // if (baglanti.State == ConnectionState.Closed) { baglanti.Open(); } komut.ExecuteNonQuery(); MessageBox.Show("Müşteri Olma İşleminiz Başarılı Anasayfaya Yönlendiriliyorsunuz "); baglanti.Close(); girisform frm = new girisform(); frm.Show(); this.Hide(); } catch (Exception hata) { MessageBox.Show(hata.Message); } } // }
private void button4_Click(object sender, EventArgs e) { girisform giris = new girisform(); giris.Show(); this.Hide(); }