public ActionResult Edit([Bind(Include = "ID,KullaniciAd,Sifre")] tblAdmin tblAdmin)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblAdmin).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tblAdmin));
 }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "CalisanID,Ad,Soyad,Telefon,Departman,Yonetici")] tblCalisan tblCalisan)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblCalisan).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Yonetici  = new SelectList(db.tblCalisan, "CalisanID", "Ad", tblCalisan.Yonetici);
     ViewBag.Departman = new SelectList(db.tblDepartman, "DepartmanID", "DepartmanAd", tblCalisan.Departman);
     return(View(tblCalisan));
 }