private async void btnAddRegion_Click(object sender, EventArgs e) { var selectedCountry = (CountryResponse)cbOriginCountry.SelectedItem; var addRegionResponse = await Infrastructure.AddRegion(tbNewRegion.Text, selectedCountry.CountryId); if (addRegionResponse.ErrorCode) { var metadetaErrorModel = await Infrastructure.GetMetadata(); MetaDataResponse metadata = (MetaDataResponse)metadetaErrorModel.Object; Metadata = metadata; ShowCountriesAddNewWine(); cbOriginCountry.SelectedIndex = cbOriginCountry.FindStringExact(selectedCountry.CountryName); cbOriginRegion.SelectedIndex = cbOriginRegion.FindStringExact(tbNewRegion.Text); } else if (!string.IsNullOrEmpty(addRegionResponse.Message)) { MessageBox.Show(addRegionResponse.Message, "Fel"); } }