public EnrollmentForm(AddGuardiancs addGuardianForm) { this.addGuardianForm = addGuardianForm; type = this.addGuardianForm.type; InitializeComponent(); Data = new AppData(); ExchangeData(true); // Init data with default control values; Data.OnChange += delegate { ExchangeData(false); }; // Track data changes to keep the form synchronized }
private void addExistingGuardianBtn_Click(object sender, EventArgs e) { this.type = "Existing"; AddGuardiancs guardianForm = new AddGuardiancs(this); guardianForm.ShowDialog(); BindingSource bs = new BindingSource(); bs.DataSource = guardians; guardiansGridView.DataSource = bs; }