Esempio n. 1
0
        private void carsOrders()
        {
            if (this.ordersTableAdapter.CarOrders(this.ssSQLite.Orders, Convert.ToInt32(Data.CarID)) == 0)
            {
                string            message = "Would you like to create new order?";
                string            caption = "No orders for the car";
                MessageBoxButtons buttons = MessageBoxButtons.YesNo;
                DialogResult      result  = MessageBox.Show(message, caption, buttons);

                if (result == DialogResult.Yes)
                {
                    orderAdd newOrder = new orderAdd();
                    newOrder.MdiParent = main.ActiveForm;
                    newOrder.Show();
                }
            }
            else
            {
                main Main = (main)MdiParent;
                Main.toolStripButton6.Enabled = true;
                Main.toolStripButton9.Enabled = true;
                Main.toolStripButton3.Enabled = false;
                Main.toolStripButton4.Enabled = false;
                Main.toolStripButton7.Enabled = false;
                Main.toolStripButton5.Enabled = false;
                Main.toolStripButton2.Enabled = false;
            }
        }
Esempio n. 2
0
        private void addAnOrderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            orderAdd newOrder = new orderAdd();

            newOrder.MdiParent = ActiveForm;
            newOrder.Show();
        }
Esempio n. 3
0
        private void toolStripButton6_Click(object sender, EventArgs e)
        {
            orderAdd newOrder = new orderAdd();

            newOrder.MdiParent = ActiveForm;
            newOrder.Show();
        }