void UyeOl()
        {
            try
            {
                if (txtAd.Text == "" || txtCevap.Text == "" || txtSifre.Text == "" || cbGSoru.Text == "")
                {
                    MessageBox.Show("Kullanıcı Ad,Sifre,Gizli Soru,Cevap kısımları boş bırakılamaz", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }

                SqlCommand Uye = new SqlCommand("insert into tbl_KullaniciGiris (KullaniciAd,KullaniciSifre,KullaniciYetki,KullaniciGizliSoru,KullaniciCevap) values (@p1,@p2,@p3,@p4,@p5)", bag.Baglan());
                Uye.Parameters.AddWithValue("@p1", txtAd.Text);
                Uye.Parameters.AddWithValue("@p2", txtSifre.Text);
                Uye.Parameters.AddWithValue("@p3", "Kullanıcı");
                Uye.Parameters.AddWithValue("@p4", cbGSoru.Text);
                Uye.Parameters.AddWithValue("@p5", txtCevap.Text);
                MessageBox.Show("Başarılı bir şekilde üye oldunuz. Giriş yapabilirsiniz.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Uye.ExecuteNonQuery();
                bag.Baglan().Close();
                frm_GirisYap Giris = new frm_GirisYap();
                Giris.Show();
                Hide();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Hata,  " + ex.Source + "\n" + ex.Message + "lütfen yetkillere bildirin." + MessageBoxButtons.OK + MessageBoxIcon.Error);
            }

            finally
            {
                txtAd.Text    = "";
                txtCevap.Text = "";
                txtSifre.Text = "";
                cbGSoru.Text  = "";
            }
        }
Example #2
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            frm_GirisYap GY = new frm_GirisYap();

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