public ActionResult Edit([Bind(Include = "ID,name,description,Penalties")] ViolationContent violationContent) { if (ModelState.IsValid) { db.Entry(violationContent).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(violationContent)); }
public ActionResult Edit([Bind(Include = "ID,number,DateIn,DateOut,Cost")] Contract contract) { if (ModelState.IsValid) { db.Entry(contract).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(contract)); }
public ActionResult Edit([Bind(Include = "ID,category,Date")] Violation violation) { if (ModelState.IsValid) { db.Entry(violation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(violation)); }
public ActionResult Edit([Bind(Include = "ID,Name,Surname,Otch,PasportSer,PasportNumber,ZachetNumber,Sex,Birthday,Town")] NewStudent newStudent) { if (ModelState.IsValid) { db.Entry(newStudent).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(newStudent)); }
public ActionResult Edit([Bind(Include = "ID,floor,NameRoom")] Rooms rooms) { if (ModelState.IsValid) { db.Entry(rooms).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rooms)); }
public ActionResult Edit([Bind(Include = "ID,NumberRoom,NumberFloor,Count,Chear")] LeaveRooms leaveRooms) { if (ModelState.IsValid) { db.Entry(leaveRooms).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(leaveRooms)); }