예제 #1
0
        private void btnGiris_Click(object sender, EventArgs e)
        {
            var isim  = textBox1.Text;
            var sifre = textBox2.Text;

            var t = HelperKullanici.SignIn(isim, sifre);

            if (t.Item2)
            {
                Hide();
                MessageBox.Show("Hosgeldiniz");
                Form2 form2 = new Form2(t.Item1);
                form2.Show();
            }
            else
            {
                MessageBox.Show("Böyle bir kullanici bulunamadi!");
            }
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var isim  = textBox1.Text;
            var sifre = textBox2.Text;
            var f     = HelperKullanici.SignIn(isim, sifre);

            if (f.Item2)
            {
                if (f.Item1.kullaniciTip == false)
                {
                    this.Hide();
                    MessageBox.Show("Admin Kullanıcı! Hoşgeldiniz!");
                    AdminForm a = new AdminForm();
                    a.Show();
                }
                else
                {
                    Kullanici kullanici = new Kullanici();
                    kullanici.adi          = f.Item1.adi;
                    kullanici.soyadi       = f.Item1.soyadi;
                    kullanici.tckimlikno   = f.Item1.tckimlikno;
                    kullanici.kullaniciTip = f.Item1.kullaniciTip;
                    kullanici.telefon      = f.Item1.telefon;
                    kullanici.adres        = f.Item1.adres;
                    kullanici.cinsiyet     = f.Item1.cinsiyet;
                    kullanici.KullaniciID  = f.Item1.KullaniciID;
                    kullanici.kullaniciAdi = f.Item1.kullaniciAdi;
                    MessageBox.Show($"Hoşgeldiniz Sayın {f.Item1.adi}");
                    KullaniciForm k = new KullaniciForm(kullanici);
                    k.Show();
                }
            }
            else
            {
                MessageBox.Show("Böyle bir kullanici bulunamadı!");
            }
        }