Beispiel #1
0
        public async Task <bool> UpdatePet(Pet pet)
        {
            jsonUtils = new JsonUtils();
            jsonPet   = jsonUtils.CreatePatchDocument("pet", null, pet);
            await _familyAPIService.PatchFamilyAPIData("patchpet", pet.PetId.ToString(), jsonPet);

            return(true);
        }
Beispiel #2
0
        private async Task UpdatePerson()
        {
            showEditPerson = false;
            showAddPets    = false;
            showPets       = false;

            if (!string.IsNullOrEmpty(petDTO.Name) && !string.IsNullOrEmpty(petDTO.NickName) && !string.IsNullOrEmpty(petDTO.petType))
            {
                pet.Name     = petDTO.Name;
                pet.NickName = petDTO.NickName;
                pet.petType  = petDTO.petType;
                pet.PersonId = person.PersonId;
                var petAdded = await PetService.AddNewPet(pet, petTypeList, pet.petType);
            }

            person.StateId = BirthState.GetBirthStateId(person, birthStateList);
            jsonPerson     = jsonUtils.CreatePatchDocument("person", person);
            await FamilyAPIService.PatchFamilyAPIData("patchperson", person.PersonId.ToString(), jsonPerson);

            personList = await GetPersons();
        }