Beispiel #1
0
 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));
 }
Beispiel #2
0
 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));
 }
Beispiel #3
0
 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));
 }
Beispiel #4
0
 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));
 }
Beispiel #5
0
 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));
 }
Beispiel #6
0
 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));
 }