private void frmAddEditCustomer_Load(object sender, EventArgs e) { cboCompany.DisplayMember = "CompanyName"; cboCompany.ValueMember = "ID"; using (GoDinghyDBEntities db = new GoDinghyDBEntities()) { cboCompany.DataSource = db.CompanyTables.ToList(); } }
private void frmMainNormal_Load(object sender, EventArgs e) { db = new GoDinghyDBEntities(); companyTableBindingSource.DataSource = db.CompanyTables.ToList(); customersTableBindingSource.DataSource = db.CustomersTables.ToList(); label1.Text += " "; if (chkFullScreen.CheckState == CheckState.Checked) { chkFullScreen.Text = "True"; } else { chkFullScreen.Text = "False"; } }
private void Form1_Load(object sender, EventArgs e) { db = new GoDinghyDBEntities(); usersTableBindingSource.DataSource = db.UsersTables.ToList(); }
private void loadCompany() { db = new GoDinghyDBEntities(); companyTableBindingSource.DataSource = db.CompanyTables.ToList(); }