Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string sif1, sif2;

            sif1 = kayitsifre1.Text;
            sif2 = kayifsifre2.Text;


            if (sif1 == sif2)
            {
                baglanti.Open();
                string a;
                a = "yetkisiz";
                OleDbCommand komut = new OleDbCommand("insert into uye (İsim,telno,tcno,sifre,email,uyelikTuru) values (@ismi,@telnosu,@tcnosu,@sifresi,@emaili,@uyelikturu)", baglanti);
                komut.Parameters.AddWithValue("@ismi", kayitisim.Text);
                komut.Parameters.AddWithValue("@telnosu", kayittelno.Text);
                komut.Parameters.AddWithValue("@tcnosu", kayittcno.Text);
                komut.Parameters.AddWithValue("@sifresi", kayitsifre1.Text);
                komut.Parameters.AddWithValue("@emaili", kayitmail.Text);
                komut.Parameters.AddWithValue("uyelikturu", a);
                komut.ExecuteNonQuery();
                baglanti.Close();
                MessageBox.Show("Kayıt başarı ile tamamlandı. Lütfen üyeliğinizi aktif etmek için kütüphane yöneticisi ile iletişime geçin!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
                kayit formkapa = new kayit();
                formkapa.Close();
                Form1 form = new Form1();
                form.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Şifreler Uyuşmuyor", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            kayit formkapa = new kayit();

            formkapa.Close();
            Form1 form = new Form1();

            form.Show();
            this.Hide();
        }