Ejemplo n.º 1
0
        public ActionResult PetRadioButtonList(Guid providerGroupId, Guid providerId, Guid?ownerId)
        {
            List <Pet> petList = new List <Pet>();

            if (ownerId != null)
            {
                petList = new GetPetListByOwnerId()
                {
                    OwnerId = ownerId.Value, ProviderGroupId = providerGroupId
                }.ExecuteList();
            }

            return(View(petList));
        }
Ejemplo n.º 2
0
        public JsonResult GetPetList(GetPetListByOwnerId getPetListByOwnerId)
        {
            var result = getPetListByOwnerId.ExecuteList().Select(x => new { Id = x.Id, Name = x.Name, OwnerId = x.OwnerId, Weght = x.Weight, DOB = x.DOB, Breed = x.Breed.Name });

            return(this.Json(new { result = result }, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
        public JsonResult _GetPetListByOwner(GetPetListByOwnerId getPetListByOwner)
        {
            var petList = getPetListByOwner.ExecuteList();

            return(this.Json(new { result = petList }));
        }