Ejemplo n.º 1
0
        private void tryImport()
        {
            try
            {
                DnsZoneAdapter dzAdapter = LocalContext.Default.CreateAdapter <DnsZoneAdapter>();
                dzAdapter.ReplaceBatch(GetImportZones().Cast <object>().ToArray());
            }
            catch (Exception ex)
            {
                DialogResult result = MessageBox.Show(
                    "An error occured while creating the DNS zones.\r\n\r\n" +
                    "Error: " + ex.Message,
                    "Import error",
                    MessageBoxButtons.RetryCancel,
                    MessageBoxIcon.Error);

                if (result == DialogResult.Retry)
                {
                    tryImport();
                }
            }
        }