Beispiel #1
0
        // Öğrenci Bilgileri Güncelle

        void OgrenciBilgiGuncelle()
        {
            Sifrele sifre = new Sifrele();

            ogrenci.ID    = Convert.ToInt32(txtogrID.Text);
            ogrenci.Sifre = sifre.SifreOlustur(txtSifre.Text);
            ogrenci.Resim = txtResim.Text;
            ogrenci.KisiBilgiGuncelle(0);
            MessageBox.Show("Öğrenci Bilgileri Güncellendi...", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Beispiel #2
0
        // Giriş

        private void btnGiris_Click(object sender, EventArgs e)
        {
            // Öğrenci Girişi Kontrolleri

            Sifrele sifre = new Sifrele();

            if (rdbOgrenci.Checked == true)
            {
                GirisServisi giris = new GirisServisi();
                if (giris.GirisYapOgrenci(txtKullaniciAdi.Text.ToLower(), sifre.SifreOlustur(txtSifre.Text)) != null)
                {
                    OgrenciScreen ogr = new OgrenciScreen();
                    ogr.kullanici = txtKullaniciAdi.Text.ToLower();
                    ogr.Show();
                }
                else
                {
                    MessageBox.Show("Hatalı Öğrenci Bilgisi...", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            // Öğretmen Girişi Kontrolleri
            else if (rdbOgretmen.Checked == true)
            {
                GirisServisi giris = new GirisServisi();
                if (giris.GirisYapOgretmen(txtKullaniciAdi.Text.ToLower(), sifre.SifreOlustur(txtSifre.Text)) != null)
                {
                    OgretmenScreen ogrt = new OgretmenScreen();
                    ogrt.kullanici = txtKullaniciAdi.Text.ToLower();
                    ogrt.Show();
                }
                else
                {
                    MessageBox.Show("Hatalı Öğretmen Bilgisi...", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else
            {
                MessageBox.Show("Giriş Türü Seçiniz.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #3
0
        // Öğrenci Kaydı

        void ogrenciKaydi()
        {
            Ogrenci ogr = new Ogrenci();

            ogr.Ad    = txtAd.Text;
            ogr.Soyad = txtSoyad.Text;
            ogr.TC    = mskTC.Text;
            if (Convert.ToInt16(cmbCinsiyet.SelectedIndex) == 0)
            {
                ogr.Cinsiyet = false;
            }
            else
            {
                ogr.Cinsiyet = true;
            }
            ogr.DogumTarihi = dtDogumTarihi.DateTime;
            ogr.KullanıcıID = txtKullaniciID.Text;
            ogr.Sifre       = sifre.SifreOlustur(txtSifre.Text);
            string formKontrol = FuncKontrol.formKontrol(txtAd.Text, txtSoyad.Text, mskTC.Text, txtKullaniciID.Text, txtSifre.Text, dtDogumTarihi.Text);

            if (formKontrol == "Başarılı")
            {
                if (ogr.KisiEkle() == false)
                {
                    ogr.KisiEkle();
                    MessageBox.Show("Yeni Öğrenci Kaydı Eklendi...", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Bu Kullanıcı Adi Veya TC Kimlik Kullanılmaktadır...", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else
            {
                MessageBox.Show(formKontrol, "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }