public ActionResult Edit([Bind(Include = "LocationId,LocationName,Address,City,State,ZipCode,Phone,Email")] Location location)
 {
     if (ModelState.IsValid)
     {
         db.Entry(location).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(location));
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "PositionId,PositionTitle")] Position position)
 {
     if (ModelState.IsValid)
     {
         db.Entry(position).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(position));
 }
 public ActionResult Edit([Bind(Include = "RegisterId,PersonId,Date,Cash,Check,Visa,Mastercard,Discover,Amex,GiftCard,Tax")] Register register)
 {
     if (ModelState.IsValid)
     {
         db.Entry(register).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PersonId = new SelectList(db.People, "PersonId", "FirstName", register.PersonId);
     return(View(register));
 }
 public ActionResult Edit([Bind(Include = "ShiftCloseId,PersonId,ClosingDate,ShiftNotes")] ShiftClose shiftClose)
 {
     if (ModelState.IsValid)
     {
         db.Entry(shiftClose).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PersonId = new SelectList(db.People, "PersonId", "FirstName", shiftClose.PersonId);
     return(View(shiftClose));
 }
 public ActionResult Edit([Bind(Include = "PersonId,PositionId,LocationId,FirstName,LastName,Phone,Email,Address,City,State,ZipCode")] Person person)
 {
     if (ModelState.IsValid)
     {
         db.Entry(person).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.LocationId = new SelectList(db.Locations, "LocationId", "LocationName", person.LocationId);
     ViewBag.PositionId = new SelectList(db.Positions, "PositionId", "PositionTitle", person.PositionId);
     return(View(person));
 }