Ejemplo n.º 1
0
        public JsonInstitute InstituteList()
        {
            JsonInstitute             jsonInstitute         = new JsonInstitute();
            InstituteViewModel        instituteListObj      = new InstituteViewModel();
            List <InstituteViewModel> institutesLinkListObj = new List <InstituteViewModel>();

            try
            {
                var instituteLists = _place.PlacesInstitute();
                foreach (var item in instituteLists)
                {
                    instituteListObj.Logo        = _links.FindById(item.Id).Icon;
                    instituteListObj.Title       = _links.FindById(item.Id).Title;
                    instituteListObj.Description = _links.FindById(item.Id).Description;
                    instituteListObj.WebUrl      = _links.FindById(item.Id).Url;
                    instituteListObj.Phone       = item.PhoneNumber;
                    instituteListObj.CatagoriId  = item.CategoryId;
                    instituteListObj.AddressId   = _address.FindById(item.AdressId).Detail;
                    instituteListObj.LocationX   = _address.FindById(item.AdressId).LocationX;
                    instituteListObj.LocationY   = _address.FindById(item.AdressId).LocationY;
                    instituteListObj.LocationR   = _address.FindById(item.AdressId).LocationR;
                    institutesLinkListObj.Add(instituteListObj);
                }
                jsonInstitute.Result = institutesLinkListObj;
                return(jsonInstitute);
            }
            catch (Exception ex)
            {
                _ = ex.Message;
                return(jsonInstitute);
            }
        }
Ejemplo n.º 2
0
        public JsonEntertainment booklist()
        {
            JsonEntertainment             jsonEntertainment = new JsonEntertainment();
            EntertainmentViewModel        tolinkobj         = new EntertainmentViewModel();
            List <EntertainmentViewModel> tolinklistobj     = new List <EntertainmentViewModel>();

            try
            {
                var listEntertainment = _entertainment.EntertainmentBookId();
                foreach (var item in listEntertainment)
                {
                    tolinkobj.TypeId    = item.Type;
                    tolinkobj.Name      = item.Name;
                    tolinkobj.LinkId    = _links.FindById(item.LId).Url;
                    tolinkobj.Galleryid = item.Galleryid;
                    tolinkobj.Title     = item.Title;
                    tolinklistobj.Add(tolinkobj);
                }
                jsonEntertainment.Result = tolinklistobj;
                return(jsonEntertainment);
            }
            catch (Exception ex)
            {
                _ = ex.Message;
                return(jsonEntertainment);
            }
        }
Ejemplo n.º 3
0
        public JsonServices CargoServices()
        {
            JsonServices             jsonServices     = new JsonServices();
            List <ServicesViewModel> CargoServicesOBJ = new List <ServicesViewModel>();

            try
            {
                var Cargoes = _place.ServicesTypeCargo();
                foreach (var item in Cargoes)
                {
                    ServicesViewModel CargoObj = new ServicesViewModel();

                    //Places
                    CargoObj.Name  = item.Name;
                    CargoObj.Phone = item.PhoneNumber;
                    //link
                    CargoObj.Title       = _link.FindById(item.Id).Title;
                    CargoObj.Description = _link.FindById(item.Id).Description;
                    CargoObj.Icon        = _link.FindById(item.Id).Icon;

                    //address
                    CargoObj.LocationX = _address.FindById(item.Id).LocationX;
                    CargoObj.LocationX = _address.FindById(item.Id).LocationY;
                    CargoObj.LocationX = _address.FindById(item.Id).LocationR;
                    CargoServicesOBJ.Add(CargoObj);
                }
                jsonServices.Result = CargoServicesOBJ;
                return(jsonServices);
            }
            catch (Exception ex)
            {
                _ = ex.Message;
                return(jsonServices);
            }
        }