private void OnImportClick(object sender, EventArgs e) { List <DirectoryEntry> accounts = new List <DirectoryEntry>(); foreach (ListViewItem item in lvUsers.Items) { if (item.Checked) { accounts.Add((DirectoryEntry)item.Tag); } } Global.SelectedAccounts = accounts; Global.OrganizationName = txtOrgName.Text; Global.ImportAccountsOnly = rbImport.Checked; Global.HasErrors = false; Global.defaultMailboxPlanId = 0; if (cbMailboxPlan.SelectedItem != null) { ExchangeMailboxPlan plan = cbMailboxPlan.SelectedItem as ExchangeMailboxPlan; if (plan != null) { Global.defaultMailboxPlanId = plan.MailboxPlanId; } } importer.Initialize(this.username, this); importer.Start(); }
private void OnImportClick(object sender, EventArgs e) { List <DirectoryEntry> accounts = new List <DirectoryEntry>(); foreach (ListViewItem item in lvUsers.Items) { if (item.Checked) { accounts.Add((DirectoryEntry)item.Tag); } } Global.SelectedAccounts = accounts; Global.OrganizationName = txtOrgName.Text; Global.ImportAccountsOnly = rbImport.Checked; Global.HasErrors = false; importer.Initialize(this.username, this); importer.Start(); }