private void buttonEmployeeForm_Click(object sender, System.EventArgs e) { EmployeeForm form = new EmployeeForm(); form.ObjectRepository = new ObjectRepository(BuildProviderString()); form.ShowDialog(); }