public ActionResult Edit([Bind(Include = "KategoriId,KategoriAdi")] Kategori kategori) { if (ModelState.IsValid) { db.Entry(kategori).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kategori)); }
public ActionResult Edit([Bind(Include = "UyeId,KullaniciAdi,Email,Sifre,AdSoyad,YetkiId")] Uye uye) { if (ModelState.IsValid) { db.Entry(uye).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.YetkiId = new SelectList(db.Yetki, "YetkiId", "Yetki1", uye.YetkiId); return(View(uye)); }
public ActionResult Edit([Bind(Include = "YorumId,Icerik,UyeId,MakaleId,Tarih")] Yorum yorum) { if (ModelState.IsValid) { db.Entry(yorum).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.UyeId = new SelectList(db.Uyes, "UyeId", "KullaniciAdi", yorum.UyeId); return(View(yorum)); }
public ActionResult Edit([Bind(Include = "UyeID,KullaniciAdi,Email,Sifre,AdSoyad,Foto,YetkiID")] Uye uye) { if (ModelState.IsValid) { db.Entry(uye).State = EntityState.Modified; if (uye.Foto == null) { uye.Foto = "/Uploads/UyeFoto/user.png"; } db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.YetkiID = new SelectList(db.Yetkis, "YetkiID", "Yetki1", uye.YetkiID); return(View(uye)); }