Пример #1
0
 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));
 }
Пример #2
0
 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));
 }
Пример #3
0
 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));
 }
Пример #4
0
 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));
 }