/// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.
        /// This parameter is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            try
            {
                _myClinic = e.Parameter as Clinics;
                MyMap.SetView(new Windows.Devices.Geolocation.BasicGeoposition() { Latitude = _myClinic._Latitude, Longitude = _myClinic._Longitude }, 10);
                txtName.Text = _myClinic._Name.ToString();
                txtAddress.Text = _myClinic._Address1.ToString();
                txtTelephone.Text = _myClinic._Telephone.ToString();
                txtTown.Text = _myClinic._Town.ToString();
                txtWeb.Text = _myClinic._WebSite.ToString();
                txttxtSpeciality.Text = _myClinic._Speciaity.ToString();

            }
            catch (Exception ex)
            {

            }
        }
示例#2
0
        public static async Task<Clinics> CreateFromParseObject(ParseObject parseObject)
        {
            return await Task.Run<Clinics>(() =>
            {
                var findaPhysioList = new Clinics();

                findaPhysioList._Name = parseObject.ObjectId;
                if (parseObject.ContainsKey("BookURL"))
                {
                    findaPhysioList._Name = (string)parseObject["BookURL"];
                }

                
                if (parseObject.ContainsKey("OpeningHours"))
                {
                    findaPhysioList._OpeningHours = (string)parseObject["OpeningHours"];
                }

                if (parseObject.ContainsKey("Speciality"))
                {
                    findaPhysioList._Speciaity = (string)parseObject["Speciality"];
                }

                if (parseObject.ContainsKey("Town"))
                {
                    findaPhysioList._Town = (string)parseObject["Town"];
                }



                if (parseObject.ContainsKey("Website"))
                {
                    findaPhysioList._WebSite = (string)parseObject["Website"];
                }

                if (parseObject.ContainsKey("adress1"))
                {
                    findaPhysioList._Address1 = (string)parseObject["adress1"];
                }


              


                if (parseObject.ContainsKey("name"))
                {
                    findaPhysioList._Name = (string)parseObject["name"];
                }


                if (parseObject.ContainsKey("postcode"))
                {
                    findaPhysioList._Postcode = (string)parseObject["postcode"];
                }

                if (parseObject.ContainsKey("telephone"))
                {
                    findaPhysioList._Telephone = (string)parseObject["telephone"];
                }


                if (parseObject.ContainsKey("lat"))
                {
                    findaPhysioList._Latitude = (double)parseObject["lat"];
                }


                if (parseObject.ContainsKey("long"))
                {
                    findaPhysioList._Longitude = (double)parseObject["long"];
                }
                return findaPhysioList;
            });
        }