public ActionResult Edit([Bind(Include = "Id,status1,rok")] status status)
 {
     if (ModelState.IsValid)
     {
         db.Entry(status).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(status));
 }
 public ActionResult Edit([Bind(Include = "Id,city1,datazag")] city city)
 {
     if (ModelState.IsValid)
     {
         db.Entry(city).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(city));
 }
 public ActionResult Edit([Bind(Include = "Id,firstname,lastname,username,password")] user user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
Beispiel #4
0
 public ActionResult Edit([Bind(Include = "Id,firstname,lastname,alias,city_id,status_id,tel")] osoba osoba)
 {
     if (ModelState.IsValid)
     {
         db.Entry(osoba).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.city_id   = new SelectList(db.cities, "Id", "city1", osoba.city_id);
     ViewBag.status_id = new SelectList(db.status, "Id", "status1", osoba.status_id);
     return(View(osoba));
 }