private void AddMapItemAsync(LocationBrand item)
        {
            var exist = from pro in LocationBrands.Where(i => i.Latitude == item.Latitude && i.Longitude == item.Longitude) select pro;

            if (exist.Count() <= 0)
            {
                LocationBrands.Add(item);
            }
        }
示例#2
0
        private void AddMap()
        {
            if (_isValidAll)
            {
                LocationBrand locationBrand = new LocationBrand
                {
                    Latitude    = double.Parse(Latitude.Value),
                    Longitude   = double.Parse(Longitude.Value),
                    IdBrand     = Brand.Id,
                    Brand       = Brand.Brand,
                    Description = Description.Value
                };

                MessagingCenter.Send(this, MessageKeys.AddMapBrand, locationBrand);

                DialogService.ShowAlertAsync("Map Added", "Maps", "OK");

                //Redirect to Maps
                NavigationService.NavigateToAsync <MainViewModel>();
            }
        }