private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            kullanicigiris frm = new kullanicigiris();

            this.Hide();
            frm.Show();
        }
 private void button1_Click(object sender, EventArgs e)
 {
     baglan();
     try
     {
         if (textBox4.Text == textBox5.Text)
         {
             OleDbCommand cmd = new OleDbCommand("update kullaniciveri set sifre ='" + textBox4.Text + "'where eposta ='" + textBox2.Text + "'", blnt);
             cmd.ExecuteNonQuery();
             DialogResult drg = MessageBox.Show("Şifreniz değiştirildi şimdi giriş sayfasına yönlendirileceksiniz ", "BAŞARILI", MessageBoxButtons.OK);
             if (drg == DialogResult.OK)
             {
                 kullanicigiris frm = new kullanicigiris();
                 this.Hide();
                 frm.Show();
             }
         }
         else
         {
             MessageBox.Show("Şifreler Uyuşmuyor");
         }
     }
     catch (Exception hata)
     {
         MessageBox.Show(hata.Message);
     }
 }
Esempio n. 3
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            DialogResult a = MessageBox.Show("çıkış yapmak istediğine eminmisin?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (a == DialogResult.Yes)
            {
                kullanicigiris frm = new kullanicigiris();
                frm.Show();
                this.Hide();
            }
        }
        private void pictureBox6_Click(object sender, EventArgs e)
        {
            DialogResult drg = MessageBox.Show("Girişe dönmek istediğinize eminmisiniz?", "ÇIKIŞ", MessageBoxButtons.YesNo);

            if (drg == DialogResult.Yes)
            {
                kullanicigiris frm = new kullanicigiris();
                frm.Show();
                this.Hide();
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (label7.Visible == true && label6.Visible == true)
                {
                    textBox1.Focus();
                }
                else if (label6.Visible == true)
                {
                    textBox1.Focus();
                }
                else if (label7.Visible == true)
                {
                    textBox4.Focus();
                }
                else
                {
                    k_adi  = textBox1.Text;
                    sifre1 = textBox2.Text;
                    sifre2 = textBox3.Text;
                    eposta = textBox4.Text;
                    if (sayi == int.Parse(textBox5.Text))
                    {
                        if (sifre1 == sifre2 && sifre1.Length >= 8)
                        {
                            baglan();
                            string asdf = pictureBox7.ImageLocation;

                            DialogResult a = asdf == "user.png" ? MessageBox.Show("Resimsiz devam etmek istediğinize eminmisiniz?", "onay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) : DialogResult.OK;
                            for (int i = 0; i < 1; i++)
                            {
                                if (a == DialogResult.No)
                                {
                                    continue;
                                }
                                if (a == DialogResult.OK || a == DialogResult.Yes)
                                {
                                    pictureBox7.Image.Save("kullaniciresimleri/" + textBox1.Text.ToString() + ".jpg");
                                    using (OleDbCommand cmd = new OleDbCommand("INSERT INTO kullaniciveri(ad,sifre,eposta,resim) VALUES (@adi,@sifre,@eposta,@resim)", blnt))
                                    {
                                        cmd.Parameters.Add("@adi", OleDbType.VarChar).Value    = textBox1.Text;
                                        cmd.Parameters.Add("@sifre", OleDbType.VarChar).Value  = textBox2.Text;
                                        cmd.Parameters.Add("@eposta", OleDbType.VarChar).Value = textBox4.Text;
                                        cmd.Parameters.Add("@resim", OleDbType.VarChar).Value  = "kullaniciresimleri/" + k_adi + ".jpg ";
                                        cmd.ExecuteNonQuery();
                                        MessageBox.Show("Kayıt Başarılı Giriş Sayfasına Yönlendiriliyorsunuz...");
                                        kullanicigiris frm = new kullanicigiris();
                                        frm.Show();
                                        this.Hide();
                                    }
                                }
                            }
                        }
                        else if (!(sifre1 == sifre2) && sifre1.Length >= 8)
                        {
                            MessageBox.Show("Şifreler birbiriyle uyuşmuyor");
                        }

                        else
                        {
                            MessageBox.Show("şifrenizin uzunluğu uygun değil");
                        }
                    }
                }
            }
            catch (Exception hata)
            {
                MessageBox.Show(hata.Message);
            }
        }