Beispiel #1
0
        private void YoneticiGiris_FormClosed(object sender, FormClosedEventArgs e) // form kapanırken çalışıcak olay
        {
            YoneticiGiris y = new YoneticiGiris();

            y.Close();
            Form1 f1 = new Form1();

            f1.Show();
        }
 private void ygirisBtn_Click(object sender, EventArgs e) // yönetici girişi
 {
     baglantı();
     komut             = new MySqlCommand();
     komut.Connection  = bag;
     komut.CommandText = "select * from yonetici where E_posta='" + yoneticipostaTxt.Text + "'AND Sifre='" + yoneticisifreTxt.Text + "'";
     dr = komut.ExecuteReader();
     if (dr.Read())
     {
         this.Hide();
         YoneticiGiris admin = new YoneticiGiris();
         admin.Show();
     }
     else
     {
         DialogResult secim = MessageBox.Show("Hatalı Kullanıcı Adı veya Şifre Girdiniz", "Bilgilendirme Penceresi", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         if (secim == DialogResult.OK)
         {
             this.Show();
         }
     }
     bag.Close();
 }