Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "PKBuilding,Building1")] Building building)
 {
     if (ModelState.IsValid)
     {
         db.Entry(building).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(building));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "PKCustomers,Customer1,Prefix,FKBuilding")] Customer customer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(customer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FKBuilding = new SelectList(db.Buildings, "PKBuilding", "Building1", customer.FKBuilding);
     return(View(customer));
 }
Ejemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "PKPartNumber,PartNumber1,FKCustomer,Available")] PartNumber partNumber)
 {
     if (ModelState.IsValid)
     {
         db.Entry(partNumber).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FKCustomer = new SelectList(db.Customers, "PKCustomers", "Customer1", partNumber.FKCustomer);
     return(View(partNumber));
 }