protected void Page_Load(object sender, EventArgs e) { using (EntityBaglan database = new EntityBaglan()) { Tekrar1.DataSource = database.OgrenciBilgi.ToList(); Tekrar1.DataBind(); } if (Request.QueryString["ID"] != null) { int id = int.Parse(Request.QueryString["ID"]); using (EntityBaglan database = new EntityBaglan()) { var deger = database.OgrenciBilgi.Find(id); database.OgrenciBilgi.Remove(deger); database.SaveChanges(); Response.Redirect("Ogrenciler.aspx"); } } if (Request.QueryString["GID"] != null) { int gid = int.Parse(Request.QueryString["GID"]); using (EntityBaglan database = new EntityBaglan()) { var deger = database.OgrenciBilgi.Find(gid); txtOgrAdi.Text = deger.OgrAdi; txtOgrSoyAdi.Text = deger.OgrSoyadi; txtOgrNo.Text = Convert.ToString(deger.OgrNo); } } }
protected void Page_Load(object sender, EventArgs e) { using (EntityModel Database = new EntityModel()) { Tekrar1.DataSource = Database.Director.ToList(); Tekrar1.DataBind(); } if (!IsPostBack) { if (Request.QueryString["ID"] != null) { int id = int.Parse(Request.QueryString["ID"]); using (EntityModel database = new EntityModel()) { var deger = database.Director.Find(id); database.Director.Remove(deger); database.SaveChanges(); Response.Redirect("Yonetmen.aspx"); } } if (Request.QueryString["GID"] != null) { int gid = int.Parse(Request.QueryString["GID"]); using (EntityModel database = new EntityModel()) { var deger = database.Director.Find(gid); txtYonetmenAdi.Text = deger.YonetmenAdi; } } } }
protected void Page_Load(object sender, EventArgs e) { using (EntityModel Database = new EntityModel()) { Tekrar1.DataSource = Database.Movie.ToList(); Tekrar1.DataBind(); } if (!IsPostBack) { if (Request.QueryString["ID"] != null) { int id = int.Parse(Request.QueryString["ID"]); using (EntityModel database = new EntityModel()) { var deger = database.Movie.Find(id); database.Movie.Remove(deger); database.SaveChanges(); Response.Redirect("Filmler.aspx"); } } if (Request.QueryString["GID"] != null) { int gid = int.Parse(Request.QueryString["GID"]); using (EntityModel database = new EntityModel()) { var deger = database.Movie.Find(gid); txtFilmAdi.Text = deger.FilmAdi; txtFilmYili.Text = Convert.ToString(deger.FilmYili); txtFilmTuru.Text = deger.FilmTuru; //txtFilmYönetmen.Text = yonetmen.YonetmenAdi; //txtFilmAktor.Text = aktor.AktorAdi; } } } }
protected void Page_Load(object sender, EventArgs e) { using (EntityModel Database = new EntityModel()) { Tekrar1.DataSource = Database.Actor.ToList(); Tekrar1.DataBind(); } if (!IsPostBack) { if (Request.QueryString["ID"] != null) { int id = int.Parse(Request.QueryString["ID"]); using (EntityModel database = new EntityModel()) { var deger = database.Actor.Find(id); database.Actor.Remove(deger); database.SaveChanges(); Response.Redirect("Aktorler.aspx"); } } if (Request.QueryString["GID"] != null) { int gid = int.Parse(Request.QueryString["GID"]); using (EntityModel database = new EntityModel()) { var deger = database.Actor.Find(gid); txtAktorAdi.Text = deger.AktorAdi; txtAktorDogYili.Text = Convert.ToString(deger.AktorDogumYili); txtAktorRolu.Text = deger.AktorFilmRolu; } } } }
protected void Page_Load(object sender, EventArgs e) { using (EntityBaglan database = new EntityBaglan()) { Tekrar1.DataSource = database.Kurslar.ToList(); Tekrar1.DataBind(); } if (!IsPostBack) { if (Request.QueryString["ID"] != null) { int id = int.Parse(Request.QueryString["ID"]); using (EntityBaglan database = new EntityBaglan()) { var deger = database.Kurslar.Find(id); database.Kurslar.Remove(deger); database.SaveChanges(); Response.Redirect("Kurslar.aspx"); } } if (Request.QueryString["GID"] != null) { int gid = int.Parse(Request.QueryString["GID"]); using (EntityBaglan database = new EntityBaglan()) { var deger = database.Kurslar.Find(gid); txtkursAdi.Text = deger.kursAdi; txtkurssaati.Text = Convert.ToString(deger.kursSaati); txtkursucreti.Text = Convert.ToString(deger.KursUcret); } } } }