public ActionResult DeleteConfirmed(int id) { YabanciDil yabanciDil = db.YabanciDil.Find(id); db.YabanciDil.Remove(yabanciDil); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,DilAdi,Seviyesi")] YabanciDil yabanciDil) { if (ModelState.IsValid) { db.Entry(yabanciDil).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(yabanciDil)); }
public ActionResult Create([Bind(Include = "ID,DilAdi,Seviyesi")] YabanciDil yabanciDil) { if (ModelState.IsValid) { db.YabanciDil.Add(yabanciDil); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(yabanciDil)); }
protected override void GuncelNesneOlustur() { currentEnttiy = new YabanciDil { Id = id, Kod = txtKod.Text, DilAdi = txtDilAdi.Text, Aciklama = txtAciklama.Text, Durum = tglDurum.IsOn }; ButonEnabledDurumu(); }
// GET: YabanciDils/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } YabanciDil yabanciDil = db.YabanciDil.Find(id); if (yabanciDil == null) { return(HttpNotFound()); } return(View(yabanciDil)); }