private void Confirm_btn_Click(object sender, EventArgs e)
        {
            Home.MdiChildren.Last <Form>().Close();

            addProduct           = new AddProduct(this);
            addProduct.MdiParent = Home;
            addProduct.SetTXTBoxs(Order.ProductID.ToString(), Order.Quantity.ToString());
            addProduct.Show();
        }
        private void btn_AddProduct_Click(object sender, EventArgs e)
        {
            AddProduct AddProduct = new AddProduct();

            if (objCurrentUser.canView(AddProduct))
            {
                Home.MdiChildren.Last <Form>().Close();

                AddProduct.MdiParent = Home;
                AddProduct.Show();
            }
            else
            {
                AddProduct.Dispose();
                MessageBox.Show("You do not have access for the Add Products Form.\nContact your local Product Manager.");
            }
        }
        //add selected item to Remanufacture list
        private void btnRepRemanufacture_Click(object sender, EventArgs e)
        {
            AddProduct newProduct = new AddProduct();

            newProduct.MdiParent = Home;
            newProduct.SetTXTBoxs(PS.ProductID.ToString(), 1.ToString());

            newProduct.FormClosing += (sender2, args2) =>
            {
                this.Show();
            };

            newProduct.Leave += (sender3, args3) =>
            {
                Home.MdiChildren.Last <Form>().Close();
            };

            this.Hide();
            newProduct.Show();
        }
Exemplo n.º 4
0
        private void btn_OrderProduct_Click(object sender, EventArgs e)
        {
            try
            {
                //More of an existing product.
                AddProduct addp = new AddProduct();
                addp.SetTXTBoxs(txt_ProductID.Text, txt_ProductQuantity.Text);
                addp.MdiParent = home;

                addp.Leave += (sender3, args3) =>
                {
                    home.MdiChildren.Last <Form>().Close();
                };

                addp.Show();
            }
            catch (Exception)
            {
                MessageBox.Show("Select a product using the Product ID dropdown before trying to order more.");
            }
        }