Exemple #1
0
        private void btnSil_Click(object sender, EventArgs e)
        {
            //İlişkili tablolarda silme işlemi yapılmaz. Kayıt aktif pasif olarak değiştirilir.
            EntityOgrenci entOgr = new EntityOgrenci();

            entOgr.Mezun = 0;
            BLLOgrenci.Guncelle(entOgr);
            MessageBox.Show("Öğrenci silinmedi, ancak durumu 'Mezun oldu' olarak güncellendi");
            Listele();
        }
Exemple #2
0
        private void btnOgrGuncelle_Click(object sender, EventArgs e)
        {
            EntityOgrenci ent = new EntityOgrenci();

            ent.Ad       = txtOgrAd.Text;
            ent.Soyad    = txtOgrSoyad.Text;
            ent.Fotograf = txtOgrFotograf.Text;
            ent.Kulupid  = Convert.ToInt16(comboOgrKulup.SelectedValue);
            ent.Id       = Convert.ToInt16(txtOgrId.Text);
            BLLOgrenci.Guncelle(ent);
            MessageBox.Show("Öğrenci Bilgileri Güncellendi");
            OgrenciListesi();
        }
Exemple #3
0
        private void btnGuncelle_Click(object sender, EventArgs e)
        {
            try
            {
                EntityOgrenci ent_guncelle = new EntityOgrenci();
                ent_guncelle.Ad           = txtAd.Text;
                ent_guncelle.Soyad        = txtSoyad.Text;
                ent_guncelle.Fotograf     = txtFotograf.Text;
                ent_guncelle.KulupID      = Convert.ToInt32(cmbKulup.SelectedValue);
                ent_guncelle.OgrencilerID = Convert.ToInt32(txtID.Text);
                BLLOgrenci.Guncelle(ent_guncelle);
            }
            catch (Exception)
            {
                MessageBox.Show("Lütfen seçtiğiniz değerlerin doğruluğundan emin olun");
            }

            MessageBox.Show("Öğrenci bilgileri güncellendi");
            Listele();
        }