void OgrenciListesi() { List <EntityClassOgrenci> OgrenciListele = LogicClassOgrenci.LISTELE(); dataGridView1.DataSource = OgrenciListele; this.Text = "Öğrenci Listesi"; }
private void BTNKAYDET_Click(object sender, EventArgs e) { EntityClassOgrenci ent = new EntityClassOgrenci(); ent.AD = TXTAD.Text; ent.SOYAD = TXTSOYAD.Text; ent.FOTOGRAF = TXTFOTO.Text; ent.KULUPID = Convert.ToInt16(comboBox1.SelectedValue); LogicClassOgrenci.EKLE(ent); MessageBox.Show("YENİ ÖĞRENCİ EKLENDİ!"); OgrenciListesi(); }
private void BTNGUNCELLE_Click(object sender, EventArgs e) { EntityClassOgrenci ent = new EntityClassOgrenci(); ent.ID = Convert.ToInt16(TXTID.Text); ent.AD = TXTAD.Text; ent.SOYAD = TXTSOYAD.Text; ent.FOTOGRAF = TXTFOTO.Text; ent.KULUPID = Convert.ToInt16(comboBox1.SelectedValue); LogicClassOgrenci.GUNCELLE(ent); MessageBox.Show("KAYIT GÜNCELLENDİ!"); OgrenciListesi(); }