Exemplo n.º 1
0
        private async void InsertCampaign_VisibleChanged(object sender, EventArgs e)
        {
            if (InsertCampaign.Visible)
            {
                CampaignManager.Enabled = false;
                await Task.Run(() =>
                {
                    cms.InitializeConnection();
                    managers = cms.GetAllEmployees();
                });

                foreach (var manager in managers)
                {
                    CampaignManager.Items.Add(manager.Name);
                }
                CampaignManager.Enabled = true;
            }
        }