Beispiel #1
0
 public ActionResult Edit([Bind(Include = "UserRequestID,DateRequested,RequestorEmail,Status,RequestDescription,DateNeededBy,DeliveryType,TotalCost")] UserRequest userRequest)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userRequest).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(userRequest));
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "AnimalId,AnimalName")] Animal animal)
 {
     if (ModelState.IsValid)
     {
         db.Entry(animal).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(animal));
 }
Beispiel #3
0
 public ActionResult Edit([Bind(Include = "CookId,CookType1")] CookType cookType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cookType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cookType));
 }
Beispiel #4
0
 public ActionResult Edit([Bind(Include = "ProductID,ProductName,ProductDescription,PricePerUnit,QtyInStock")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(product));
 }
Beispiel #5
0
 public ActionResult Edit([Bind(Include = "AltNameId,CutId,AltName1")] AltName altName)
 {
     if (ModelState.IsValid)
     {
         db.Entry(altName).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CutId = new SelectList(db.CutNames, "CutId", "CutName1", altName.CutId);
     return(View(altName));
 }
Beispiel #6
0
 public ActionResult Edit([Bind(Include = "CutId,CutName1,PrimalCutId")] CutName cutName)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cutName).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PrimalCutId = new SelectList(db.PrimalCuts, "PrimalCutId", "PrimalCutName", cutName.PrimalCutId);
     return(View(cutName));
 }
Beispiel #7
0
 public ActionResult Edit([Bind(Include = "PrimalCutId,PrimalCutName,AnimalId")] PrimalCut primalCut)
 {
     if (ModelState.IsValid)
     {
         db.Entry(primalCut).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AnimalId = new SelectList(db.Animals, "AnimalId", "AnimalName", primalCut.AnimalId);
     return(View(primalCut));
 }
Beispiel #8
0
 public ActionResult Edit([Bind(Include = "PurchaseRequestID,UserRequestID,ProductID,QtyNeeded")] PurchaseRequest purchaseRequest)
 {
     if (ModelState.IsValid)
     {
         db.Entry(purchaseRequest).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductID     = new SelectList(db.Products, "ProductID", "ProductName", purchaseRequest.ProductID);
     ViewBag.UserRequestID = new SelectList(db.UserRequests, "UserRequestID", "RequestorEmail", purchaseRequest.UserRequestID);
     return(View(purchaseRequest));
 }
 public ActionResult Edit([Bind(Include = "CutId,CookId,Good_Bad,CookCutId")] CookCut cookCut)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cookCut).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CookId = new SelectList(db.CookTypes, "CookId", "CookType1", cookCut.CookId);
     ViewBag.CutId  = new SelectList(db.CutNames, "CutId", "CutName1", cookCut.CutId);
     return(View(cookCut));
 }