Example #1
0
        private void RestoreDataBtn_Click(object sender, RoutedEventArgs e)
        {
            GeoServiceClient          proxy     = new GeoServiceClient();
            IEnumerable <ZipCityData> cityBatch = new List <ZipCityData>()
            {
                new ZipCityData {
                    ZipCode = "70112", City = "New Orleans"
                },
                new ZipCityData {
                    ZipCode = "30313", City = "Atlanta"
                }
            };

            try
            {
                proxy.UpdateZipCityBatch(cityBatch.ToList());
                proxy.Close();

                MessageBox.Show("Updated");
            }
            catch (FaultException)
            {
                proxy.Abort();
                MessageBox.Show("Error");
            }
        }
Example #2
0
        private void UpdateBatchBtn_Click(object sender, RoutedEventArgs e)
        {
            GeoServiceClient          proxy     = new GeoServiceClient();
            IEnumerable <ZipCityData> cityBatch = new List <ZipCityData>()
            {
                new ZipCityData {
                    ZipCode = "70112", City = "Who Data Nation"
                },
                new ZipCityData {
                    ZipCode = "30313", City = "Next SuperBowl"
                }
            };

            try
            {
                proxy.UpdateZipCityBatch(cityBatch.ToList());
                proxy.Close();

                MessageBox.Show("Updated");
            }
            catch (FaultException ex)
            {
                proxy.Abort();
                MessageBox.Show("Error");
            }
        }