private async void Editrow_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "DeliveryZipCode")
            {
                if (lookupZipCode)
                {
                    var deliveryCountry = editrow.DeliveryCountry ?? editrow.Country;
                    var city            = await UtilDisplay.GetCityAndAddress(editrow.DeliveryZipCode, deliveryCountry);

                    if (city != null)
                    {
                        editrow.DeliveryCity = city[0];
                        var add1 = city[1];
                        if (!string.IsNullOrEmpty(add1))
                        {
                            editrow.DeliveryAddress1 = add1;
                        }
                        var zip = city[2];
                        if (!string.IsNullOrEmpty(zip) && editrow.DeliveryZipCode != zip)
                        {
                            lookupZipCode           = false;
                            editrow.DeliveryZipCode = zip;
                        }
                    }
                }
                else
                {
                    lookupZipCode = true;
                }
            }
        }
示例#2
0
        private async void Editrow_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "ZipCode")
            {
                var city = await UtilDisplay.GetCityAndAddress(editrow.ZipCode, editrow._WorkCountry != 0?editrow._WorkCountry : api.CompanyEntity._CountryId);

                if (city != null)
                {
                    editrow.City = city[0];
                    var add1 = city[1];
                    if (!string.IsNullOrEmpty(add1))
                    {
                        editrow.WorkAddress1 = add1;
                    }
                    var zip = city[2];
                    if (!string.IsNullOrEmpty(zip))
                    {
                        editrow.ZipCode = zip;
                    }
                }
            }
        }
示例#3
0
        private async void Editrow_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "DeliveryZipCode")
            {
                var deliveryCountry = Order.DeliveryCountry ?? api.CompanyEntity._CountryId;
                var city            = await UtilDisplay.GetCityAndAddress(Order.DeliveryZipCode, deliveryCountry);

                if (city != null)
                {
                    Order.DeliveryCity = city[0];
                    var add1 = city[1];
                    if (!string.IsNullOrEmpty(add1))
                    {
                        Order.DeliveryAddress1 = add1;
                    }
                    var zip = city[2];
                    if (!string.IsNullOrEmpty(zip))
                    {
                        Order.DeliveryZipCode = zip;
                    }
                }
            }
        }