Пример #1
0
        public void OgrenciBilgileriniGetir()
        {
            vtys6Entities db = new vtys6Entities();

            GridViewOgrenci.DataSource = db.tOgrencis.ToList();
            GridViewOgrenci.DataBind();
        }
Пример #2
0
 protected void ButtonOgrenciSorgula_Click(object sender, EventArgs e)
 {
     try
     {
         vtys6Entities db         = new vtys6Entities();
         int           ogrenciKey = int.Parse(TextBoxOgrenciID.Text.ToString());
         var           query      = from o in db.tOgrencis
                                    join b in db.tBolums on o.bolumID equals b.bolumID
                                    join f in db.tFakultes on b.fakulteID equals f.fakulteID
                                    where o.ogrenciID == ogrenciKey
                                    select new { o.ogrenciID, o.ad, o.soyad, b.bolumAd, f.fakulteAd };
         GridViewOgrenci.DataSource = query.ToList();
         GridViewOgrenci.DataBind();
     }
     catch (Exception)
     {
         errorLabel.Text = "Hata Oluştu";
     }
 }