Exemplo n.º 1
0
        public async Task <IActionResult> PutCirugia(int id, Cirugia cirugia)
        {
            if (id != cirugia.Id)
            {
                return(BadRequest());
            }

            _context.Entry(cirugia).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CirugiaExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> PutTratamiento(int id, Tratamiento tratamiento)
        {
            if (id != tratamiento.Id)
            {
                return(BadRequest());
            }

            _context.Entry(tratamiento).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!TratamientoExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemplo n.º 3
0
        public async Task <IActionResult> PutDesparacitacion(int id, Desparacitacion desparacitacion)
        {
            if (id != desparacitacion.Id)
            {
                return(BadRequest());
            }

            _context.Entry(desparacitacion).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!DesparacitacionExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "Id,AnimalId,MicrochipNumber,EartagNumber")] ChipIdentification chipIdentification)
 {
     if (ModelState.IsValid)
     {
         db.Entry(chipIdentification).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(chipIdentification));
 }
Exemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "Id,OwnerId,FirstName,LastName,PetRelation,PhoneNumber")] AdditionalContact additionalContact)
 {
     if (ModelState.IsValid)
     {
         db.Entry(additionalContact).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(additionalContact));
 }
Exemplo n.º 6
0
 public ActionResult Edit([Bind(Include = "AnimalId,OwnerId,AnimalName,AnimalSpecies,AnimalBreed,AnimalAge,AnimalEstimatedWeight,AnimalDescription")] AnimalInfo animalInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(animalInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(animalInfo));
 }
Exemplo n.º 7
0
 public ActionResult Edit([Bind(Include = "Id,JobName,Description")] ShelterOperations shelterOperations)
 {
     if (ModelState.IsValid)
     {
         db.Entry(shelterOperations).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(shelterOperations));
 }
Exemplo n.º 8
0
 public ActionResult Edit([Bind(Include = "Id,AnimalId,AggressionComments")] AnimalBehavior animalBehavior)
 {
     if (ModelState.IsValid)
     {
         db.Entry(animalBehavior).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(animalBehavior));
 }
Exemplo n.º 9
0
 public ActionResult Edit([Bind(Include = "Id,AnimalId,Year,Vaccination,Reason")] MedicalHistory medicalHistory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(medicalHistory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(medicalHistory));
 }
Exemplo n.º 10
0
 public ActionResult Edit([Bind(Include = "Id,CurrentMedication,AnimalAllergies")] AnimalHistory animalHistory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(animalHistory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(animalHistory));
 }
Exemplo n.º 11
0
 public ActionResult Edit([Bind(Include = "Id,AnimalId,InsuranceName")] Insurance insurance)
 {
     if (ModelState.IsValid)
     {
         db.Entry(insurance).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(insurance));
 }
 public ActionResult Edit([Bind(Include = "Id,AnimalId,Belongings,Comment")] AdditionalPetInfo additionalPetInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(additionalPetInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(additionalPetInfo));
 }
Exemplo n.º 13
0
 public ActionResult Edit([Bind(Include = "OwnerId,FirstName,LastName,HomeAddress,City,State,County,ZipCode,HomePhone,CellPhone,DriversLicenseNumber,HumanEvacNumber,Email")] OwnerInfo ownerInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ownerInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(ownerInfo));
 }
Exemplo n.º 14
0
 public ActionResult Edit([Bind(Include = "Id,OwnerId,FirstName,LastName,HomeAddress,City,State,ZipCode,HomePhone,CellPhone,DriversLicenseNumber,HumanEvacNumber")] SecondaryContact secondaryContact)
 {
     if (ModelState.IsValid)
     {
         db.Entry(secondaryContact).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(secondaryContact));
 }
Exemplo n.º 15
0
 public ActionResult Edit([Bind(Include = "Id,FacilityId,LocationKind,LocationName,Address,City,State,ZipCode,PhoneNumber,Directions,OperationalHours")] FacilityInfo facilityInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(facilityInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(facilityInfo));
 }
Exemplo n.º 16
0
 public ActionResult Edit([Bind(Include = "Id,MovementStatus,Description")] TrackingOperations trackingOperations)
 {
     if (ModelState.IsValid)
     {
         db.Entry(trackingOperations).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(trackingOperations));
 }