public frmMailChimpApiKey() { InitializeComponent(); Access = new AccessHelper(); ErrorProvider1 = new ErrorProvider(); MailChimpAPIKey = new UDT.MailChimpAPIKey(); this.Load += new EventHandler(Form_Load); }
private void Form_Load(object sender, EventArgs e) { List<UDT.MailChimpAPIKey> MailChimpAPIKeys = Access.Select<UDT.MailChimpAPIKey>(); if (MailChimpAPIKeys.Count > 0) { this.MailChimpAPIKey = MailChimpAPIKeys.ElementAt(0); this.txtAPIKey.Text = this.MailChimpAPIKey.APIKey; } }