Example #1
0
        private void BtnKaydet_Click(object sender, EventArgs e)
        {
            TBLOGRENCI t = new TBLOGRENCI();

            t.AD    = TxtAd.Text;
            t.SOYAD = TxtSoyad.Text;
            db.TBLOGRENCI.Add(t);
            db.SaveChanges();
            MessageBox.Show("Öğrenci Eklendi");
        }
Example #2
0
        private void BtnKaydet_Click(object sender, EventArgs e)
        {
            TBLOGRENCI ogrenci = new TBLOGRENCI();

            ogrenci.AD    = TxtOgrenciad.Text;
            ogrenci.SOYAD = TxtOgrenciSoyad.Text;
            con.TBLOGRENCIs.Add(ogrenci);
            con.SaveChanges();
            MessageBox.Show("success");
        }