private void addNewCarToolStripMenuItem_Click(object sender, EventArgs e) { carAdd newCar = new carAdd(); newCar.MdiParent = main.ActiveForm; newCar.Show(); }
private void clientCars() { if (this.carsTableAdapter.ClientCars(this.ssSQLite.Cars, Convert.ToInt32(Data.ClientID)) == 0) { string message = "Would you like to add a car?"; string caption = "No cars of " + Data.ClientName; MessageBoxButtons buttons = MessageBoxButtons.YesNo; DialogResult result = MessageBox.Show(message, caption, buttons); if (result == DialogResult.Yes) { carAdd newCar = new carAdd(); newCar.MdiParent = main.ActiveForm; newCar.Show(); } } else { main Main = (main)this.MdiParent; Main.toolStripButton4.Enabled = true; Main.toolStripButton7.Enabled = true; Main.toolStripButton5.Enabled = true; Main.toolStripButton2.Enabled = false; Main.toolStripButton6.Enabled = false; Main.toolStripButton3.Enabled = false; Main.toolStripButton9.Enabled = false; } }
private void toolStripButton4_Click(object sender, EventArgs e) { carAdd newCar = new carAdd(); newCar.MdiParent = ActiveForm; newCar.Show(); }