コード例 #1
0
ファイル: FormGiriş.cs プロジェクト: berkeox/HotelApp
 private void btnGiriş_Click(object sender, EventArgs e)
 {
     if (dB.MüşteriOturumu(txtKullanıcıAdı.Text, txtŞifre.Text) == true) //Giriş yapmaya çalışan kişi müşteri ise
     {
         if (dB.OturumVer(txtKullanıcıAdı.Text, txtŞifre.Text) == false) //Böyle bir kullanıcı yoksa
         {
             MessageBox.Show("Kullanıcı Bulunamadı", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         this.Hide();
         FormMüşteri formMüşteri = new FormMüşteri();
         formMüşteri.ShowDialog();
         this.Close();
     }
     else
     {
         if (dB.OturumVer(txtKullanıcıAdı.Text, txtŞifre.Text) == false) //Böyle bir kullanıcı yoksa
         {
             MessageBox.Show("Kullanıcı Bulunamadı", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         this.Hide();
         FormYönetici formYönetici = new FormYönetici();
         formYönetici.ShowDialog();
         this.Close();
     }
 }
コード例 #2
0
        private void BtnGeri_Click(object sender, EventArgs e) //ilk sayfaya geri dön
        {
            this.Hide();
            FormMüşteri formMüşteri = new FormMüşteri();

            formMüşteri.ilkAçılış = false;
            formMüşteri.ShowDialog();
            this.Close();
        }