private void addTableToolStripMenuItem_Click(object sender, EventArgs e) { AddTable _AddTable = new AddTable(); _AddTable.ShowDialog(); //Retreive TablesAgain to Show on SuppliersFlow Panel if (_AddTable.ShowDialog() == DialogResult.OK) { SuppliersFlowPanel.Controls.Clear(); DataAccess _DataAccess = new DataAccess(); ArrayList AllTables = _DataAccess.RetreiveAllTables(); foreach (Table Table in AllTables) { Button TableButton = new Button(); TableButton.Text = Table.Name; TableButton.Size = new System.Drawing.Size(90, 90); TableButton.ForeColor = Color.White; TableButton.BackColor = Table.GetColor(); TableButton.Tag = Table.Id; TableButton.Click += TableButton_Click; TablesFlowPanel.Controls.Add(TableButton); } } }
private void addTableToolStripMenuItem_Click_1(object sender, EventArgs e) { AddTable _AddTable = new AddTable(); _AddTable.ShowDialog(); }