private void barButtonItemDeleteCity_ItemClick(object sender, ItemClickEventArgs e) { City city = bindingSourceCity.Current as City; if (city.IsNull()) { Extensions.Extensions.ObjectNotSelectedForDelete(); return; } if (Extensions.Extensions.DeletingAlert(city.Name) != DialogResult.Yes) { return; } Extensions.Extensions.ShowWaitForm(description: "Şehir siliniyor..."); CitySolClient client = Extensions.Extensions.GetCityServiceSol(); ProcessResult processResult = client.Delete(city.Id); SplashScreenManager.CloseForm(false); Extensions.Extensions.ProcessResultMessage(processResult.Errors, (int)processResult.Result); if (processResult.Result == ExtensionsBLLResult.Success) { RefreshCity(); } }
private void barButtonItemEditCity_ItemClick(object sender, ItemClickEventArgs e) { City selectedCity = bindingSourceCity.Current as City; if (selectedCity.IsNull()) { Extensions.Extensions.ObjectNotSelectedForEdit(); return; } XtraFormCity formCity = new XtraFormCity(selectedCity); formCity.ShowDialog(); }
private void SelectionChangedNewCity(object sender, SelectionChangedEventArgs e) { City selectedCity = bindingSourceCity.Current as City; if (selectedCity.IsNull()) { return; } CountrySolClient client1 = Extensions.Extensions.GetCountrySolService(); bindingSourceCountry.DataSource = client1.Countries(selectedCity.Id, selectedCity.IsActive); client1.Close(); }