示例#1
0
        private void barButtonItemEditCountry_ItemClick(object sender, ItemClickEventArgs e)
        {
            Country selectedCountry = bindingSourceCountry.Current as Country;

            if (selectedCountry.IsNull())
            {
                Extensions.Extensions.ObjectNotSelectedForEdit();
                return;
            }
            XtraFormCountry formCountry = new XtraFormCountry(selectedCountry);

            formCountry.ShowDialog();
            bindingSourceCity_CurrentChanged(null, null);
        }
示例#2
0
        private void barButtonItemDeleteCountry_ItemClick(object sender, ItemClickEventArgs e)
        {
            Country country = bindingSourceCountry.Current as Country;

            if (country.IsNull())
            {
                Extensions.Extensions.ObjectNotSelectedForDelete();
                return;
            }
            if (Extensions.Extensions.DeletingAlert(country.Name) != DialogResult.Yes)
            {
                return;
            }

            Extensions.Extensions.ShowWaitForm(description: "İlçe siliniyor...");
            CountrySolClient client = Extensions.Extensions.GetCountrySolService();

            CounrtyService.ProcessResult processResult = client.Delete(country.Id);
            SplashScreenManager.CloseForm(false);
            Extensions.Extensions.ProcessResultMessage(processResult.Errors, (int)processResult.Result);
            bindingSourceCity_CurrentChanged(null, null);
        }