Beispiel #1
0
        private void bunifuImageButton4_Click(object sender, EventArgs e)
        {
            menuSecim m = new menuSecim();

            m.Show();
            this.Hide();
        }
        private void girisButon_Click(object sender, EventArgs e)
        {
            bekleyiniz.Visible = true;
            MySqlConnection baglan = new MySqlConnection("server= db4free.net;user=celalssahinn;password=??????;database=celalsahin;old guids=true;");

            try
            {
                baglan.Open();


                if (baglan.State != ConnectionState.Closed)
                {
                    kullaniciAdi.Text = Regex.Replace(kullaniciAdi.Text, "'", "'");
                    parola.Text       = Regex.Replace(parola.Text, "'", "'");

                    String loginGirisKontrol = ("SELECT * FROM kullanicilar where kullaniciAdi='" + kullaniciAdi.text + "'AND sifre='" + parola.Text + "'");


                    MySqlCommand komut = new MySqlCommand(loginGirisKontrol, baglan);


                    MySqlDataReader rdr = komut.ExecuteReader();


                    if (rdr.Read())
                    {
                        menuSecim m = new menuSecim();

                        baglan.Close();
                        m.Show();
                        rdr.Close();


                        this.Hide();
                    }

                    else
                    {
                        bekleyiniz.Visible = false;
                        kullaniciAdi.text  = "";
                        parola.Text        = "";

                        MessageBox.Show("Böyle bir kullanıcı bulunmamaktadır");
                        rdr.Close();
                        baglan.Close();
                    }
                }
            }
            catch (Exception ex)
            {
                bekleyiniz.Visible = false;
                baglan.Close();
                MessageBox.Show("Veritabanı bağlantısı zaman aşımına uğradı tekrar GİRİŞ butonuna tıklayınız");
            }

            finally{
                baglan.Close();
            }
        }
Beispiel #3
0
        private void geriDon_Click(object sender, EventArgs e)
        {
            kelimeVeriTabani.turkceSorDogru  = 0;
            kelimeVeriTabani.turkceSorYanlis = 0;
            menuSecim ms = new menuSecim();

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