private void btnAdd_Click(object sender, EventArgs e) { CustomerCounty _newRecord = new CustomerCounty(); _newRecord.CustomerId = this.CustomerId; _newRecord.CountyCode = (int)cboCountys.SelectedValue; _newRecord.CountyDescription = cboCountys.Text; _db.AddToCounties(_newRecord); _db.SaveChanges(); this.Close(); }