예제 #1
0
        private void button5_Click_1(object sender, EventArgs e)
        {
            frmAnaEkran f65 = new frmAnaEkran();

            f65.Show();
            this.Hide();
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmAnaEkran f9 = new frmAnaEkran();

            f9.Show();
            this.Hide();
        }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            /*   otopark_dbEntities dc = new otopark_dbEntities();
             *
             * /* if (kullanicitext.Text = "" && parolatext.Text = "")
             *  {
             *      MessageBox.Show("Boş alan bırakmayınız!");
             *  }*/

            /* if (kullanicitext.Text != string.Empty && parolatext.Text != string.Empty)
             * {
             *   var kullanici = dc.tbl_kullanici.FirstOrDefault(a => a.kullanici_adi.Equals(kullanicitext.Text));
             *   if (kullanici != null)
             *   {
             *       if (kullanici.kullanici_adi.Equals(kullanicitext.Text) && kullanici.kullanici_parola.Equals(parolatext.Text))
             *           MessageBox.Show("Giriş başarılı!");
             *       FrmAnaEkran FrmAnaEkran = new FrmAnaEkran();
             *          FrmAnaEkran.Show();
             *   }
             *   //this.Hide();
             *   else
             *           MessageBox.Show("Hatalı giriş! Lütfen kontrol ediniz."); //sadece şifre hatalı ise uyarı veriyor!
             *
             *
             * }
             * else
             *   MessageBox.Show("Boş alan bırakmayınız.");*/

            /*  if (kullanicitext.Text != String.Empty)
             * {
             *    if (kullanicitext.Text == "admin" && parolatext.Text=="admin")
             *    {
             *        MessageBox.Show("Giriş başarılı!");
             *        frmAnaEkran anaekran = new frmAnaEkran();
             *        anaekran.Show();
             *        this.Hide();
             *
             *
             *    }
             *    else
             *        MessageBox.Show("Giriş başarısız.");
             * }
             * else
             *    MessageBox.Show("Boş alan bırakmayınız!");*/


            Kullanici k = db.TBLKullanici.Where(x => x.KullaniciAdi == kullanicitext.Text && x.Sifre == parolatext.Text).SingleOrDefault();

            if (k == null)
            {
                MessageBox.Show("Kullanıcı Bulunamadı.", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else if (k != null)
            {
                frmAnaEkran fm = new frmAnaEkran();
                fm.Show();
                this.Hide();
            }
        }