示例#1
0
        private void btnGiris_Click(object sender, EventArgs e)
        {
            kullanici.kullaniciAd    = txtKullaniciAd.Text;
            kullanici.kullaniciSifre = txtKullaniciSifre.Text;
            kullanici.kullaniciNick  = txtKullaniciAd.Text;
            int       sonuc = kullanici.girisKontrol();
            DataTable dt    = new DataTable();

            dt = kullanici.sartliKullaniciNickGetir();
            //MessageBox.Show(sonuc.ToString());
            if (sonuc == 1)
            {
                csFormArasiVeriler.kullaniciAdi = txtKullaniciAd.Text;
                csFormArasiVeriler.kullaniciId  = Convert.ToInt32(dt.Rows[0][0]);
                csFormArasiVeriler.erisimIzni   = 1;

                frmYonetim yonetimFormu = new frmYonetim();
                yonetimFormu.Show();
                this.Hide();
            }
            else if (sonuc == 2)
            {
                csFormArasiVeriler.kullaniciAdi = txtKullaniciAd.Text;
                csFormArasiVeriler.kullaniciId  = Convert.ToInt32(dt.Rows[0][0]);

                frmMuhasebe muhasebe = new frmMuhasebe();
                muhasebe.Show();
                this.Hide();
                csFormArasiVeriler.erisimIzni = 1;
            }
            else if (sonuc == 3)
            {
                csFormArasiVeriler.kullaniciAdi = txtKullaniciAd.Text;
                csFormArasiVeriler.kullaniciId  = Convert.ToInt32(dt.Rows[0][0]);
                frmStandart st = new frmStandart();
                st.Show();
                csFormArasiVeriler.erisimIzni = 0;
                this.Hide();
            }
            else if (sonuc == 4)
            {
                csFormArasiVeriler.kullaniciAdi = txtKullaniciAd.Text;
                csFormArasiVeriler.kullaniciId  = Convert.ToInt32(dt.Rows[0][0]);
                frmAraForm a = new frmAraForm();
                a.Show();
                csFormArasiVeriler.erisimIzni = 0;
                this.Hide();
            }
            else if (sonuc == 5)
            {
                MetroMessageBox.Show(this, "Uyarı !", "Bu kullanıcı silinmiş ", MessageBoxButtons.OK, MessageBoxIcon.None);
            }
            else
            {
                MetroMessageBox.Show(this, "Hata !", "Yanlış kullanıcı adı veya şifre", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void tlMuhasebe_Click(object sender, EventArgs e)
        {
            frmMuhasebe m = new frmMuhasebe();

            m.Show();
        }