Example #1
0
 private void button4_Click(object sender, EventArgs e)
 {
     try
     {
         bag.Open();
         OleDbCommand    komut = new OleDbCommand("SELECT * FROM ADMINLER WHERE ADMIN_AD ='" + textBox1.Text + "' AND ADMIN_SİFRE ='" + textBox2.Text + "'", bag);
         OleDbDataReader oku   = komut.ExecuteReader();
         if (oku.Read())
         {
             Admin_Panel adm = (Admin_Panel)Application.OpenForms["Admin_Panel"];
             adm.menuStrip1.Visible = true;
             adm.button1.Visible    = false;
             adm.button3.Visible    = false;
             adm.label4.Visible     = true;
             adm.button4.Visible    = true;
             adm.label4.Text        = "Hoşgeldiniz : " + oku["ADMIN_AD"];
             this.Close();
         }
         else
         {
             MessageBox.Show("Kullanıcı Adı veya Parola Hatalı!");
         }
         bag.Close();
     }
     catch (Exception hata)
     {
         MessageBox.Show("Hata : " + hata.Message);
     }
 }
Example #2
0
 private void button4_Click(object sender, EventArgs e)
 {
     try
     {
         bag.Open();
         komut.Connection  = bag;
         komut.CommandText = "SELECT * FROM KULLANICI where K_ad='" + textBox1.Text + "' AND Sifre='" + textBox2.Text + "'";
         OleDbDataReader dr = komut.ExecuteReader();
         if (dr.Read())
         {
             Admin_Panel adm = (Admin_Panel)Application.OpenForms["Admin_Panel"];
             adm.WindowState = FormWindowState.Minimized;
             BiletAl a = new BiletAl();
             a.Show();
             this.Close();
         }
         else
         {
             MessageBox.Show("Kullanıcı adı ya da şifre yanlış");
         }
         bag.Close();
     }
     catch (Exception hata)
     {
         MessageBox.Show("Bir Hata Meydana Geldi : \n" + hata.Message);
     }
 }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            DialogResult a = new DialogResult();

            a = MessageBox.Show(" Çıkmak İstediğinize Emin Misiniz ?", "Uyarı !", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (a == DialogResult.Yes)
            {
                Admin_Panel adm = (Admin_Panel)Application.OpenForms["Admin_Panel"];
                adm.WindowState = FormWindowState.Normal;
                this.Dispose();
            }
        }