private void btnAddTimePeriods_Click(object sender, EventArgs e) { CreateMainTable frmCreateMainTable = new CreateMainTable(); frmCreateMainTable.NewMainTable = VariableFacade.GetMainTableById(menuTextBox.Text); frmCreateMainTable.SetEditMode(); frmCreateMainTable.ShowDialog(); }