예제 #1
0
 //
 // GET: /Pet/Edit/5
 public ActionResult Edit(int id = 0)
 {
     _logic = new PetLogic();
     Pet pet = _logic.GetPetById(id);
     //Pet pet = db.Pets.Find(id);
     if (pet == null)
     {
         return HttpNotFound();
     }
     ViewBag.CustomerId = new SelectList(db.Customers, "CustomerId", "Username", pet.CustomerId);
     return View(pet);
 }
예제 #2
0
 //
 // GET: /Pet/Delete/5
 public ActionResult Delete(int id = 0)
 {
     _logic = new PetLogic();
     Pet pet = _logic.GetPetById(id);
     if (pet == null)
     {
         return HttpNotFound();
     }
     return View(pet);
 }