Example #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            Form ana = new Ana_Menü();

            ana.Show();
            this.Close();
        }
Example #2
0
        private void pictureBox3_Click(object sender, EventArgs e)
        {
            Form anamenu = new Ana_Menü();

            anamenu.Show();
            this.Close();
        }
Example #3
0
 private void pictureBox2_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "" && textBox2.Text == "")
     {
         MessageBox.Show("Lütfen Giriş Bilgilerini Doldurunuz");
     }
     else if (textBox1.Text == "")
     {
         MessageBox.Show("Lütfen Kullanıcı Adını Giriniz");
     }
     else if (textBox2.Text == "")
     {
         MessageBox.Show("Lütfen Şifreyi Giriniz");
     }
     else
     {
         baglanti.Open();
         SqlCommand    komut   = new SqlCommand("Select * From personel where kullanici_adi='" + textBox1.Text.ToString() + "'", baglanti);
         SqlDataReader okuyucu = komut.ExecuteReader();
         if (okuyucu.Read() == true)
         {
             if (textBox1.Text.ToString() == okuyucu["kullanici_adi"].ToString() && textBox2.Text.ToString() == okuyucu["sifre"].ToString())
             {
                 Form anamenu = new Ana_Menü();
                 anamenu.Show();
                 this.Hide();
             }
             else
             {
                 MessageBox.Show("Kullanıcı Adı veya Şifre Hatalıdır! Tekrar Deneyiniz ");
                 textBox1.Clear();
                 textBox2.Clear();
             }
         }
         else
         {
             MessageBox.Show("Kullanıcı Adı veya Şifre Hatalıdır! Tekrar Deneyiniz ");
             // Kullanıcı adı ve şifre hatalıysa textboxı temizler
             textBox1.Clear();
             textBox2.Clear();
         }
         baglanti.Close();
     }
 }
Example #4
0
 private void pictureBox2_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "" && textBox2.Text == "")
     {
         MessageBox.Show("Lütfen giriş bilgilerini doldurunuz");
     }
     else if (textBox1.Text == "")
     {
         MessageBox.Show("Lütfen kullanıcı adını boş bırakmayın");
     }
     else if (textBox2.Text == "")
     {
         MessageBox.Show("Lütfen şifreyi boş bırakmayın");
     }
     else
     {
         baglanti.Open();
         OleDbCommand    komut   = new OleDbCommand("Select * From kullanici_girisi where kullanici_adi='" + textBox1.Text.ToString() + "'", baglanti);
         OleDbDataReader okuyucu = komut.ExecuteReader();
         if (okuyucu.Read() == true)
         {
             if (textBox1.Text.ToString() == okuyucu["kullanici_adi"].ToString() && textBox2.Text.ToString() == okuyucu["sifre"].ToString())
             {
                 Ana_Menü anamenu = new Ana_Menü();
                 anamenu.Show();
                 this.Hide();
             }
             else
             {
                 MessageBox.Show("Kullanıcı adı veya şifre yanlıştır. Lütfen kontrol ediniz");
                 textBox1.Clear();
                 textBox2.Clear();
             }
         }
         else
         {
             MessageBox.Show("Kullanıcı adı veya şifre yanlıştır. Lütfen kontrol ediniz");
             textBox1.Clear();
             textBox2.Clear();
         }
         baglanti.Close();
     }
 }