Exemplo n.º 1
0
 public ActionResult Edit(Flavor flavor, int TreatId)
 {
     if (TreatId != 0)
     {
         _db.FlavorTreat.Add(new FlavorTreat()
         {
             TreatId = TreatId, FlavorId = flavor.FlavorId
         });
     }
     _db.Entry(flavor).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Exemplo n.º 2
0
 public ActionResult Edit(Treat treat, int FlavorId)
 {
     if (FlavorId != 0)
     {
         _db.FlavorTreat.Add(new FlavorTreat()
         {
             FlavorId = FlavorId, TreatId = treat.TreatId
         });
     }
     _db.Entry(treat).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Index"));
 }
 public ActionResult Edit(Flavor flavor, int TreatId, int id)
 {
     if (TreatId != 0)
     {
         _db.TreatFlavors.Add(new TreatFlavor()
         {
             TreatId = TreatId, FlavorId = flavor.FlavorId
         });
     }
     _db.Entry(flavor).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("details", new { id = id }));
 }
Exemplo n.º 4
0
 public ActionResult Edit(Flavor flavor)
 {
     _db.Entry(flavor).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Index"));
 }
 public ActionResult Edit(Flavor flavor)
 {
     _db.Entry(flavor).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Details", new { id = flavor.FlavorId }));
 }
Exemplo n.º 6
0
 public ActionResult Edit(Treat treat, int FlavorId)
 {
     _db.Entry(treat).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Edit", new { id = treat.TreatId }));
 }
Exemplo n.º 7
0
 public ActionResult Edit(Treat editedTreat)
 {
     _db.Entry(editedTreat).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Index", "Treat"));
 }