private void btnStockMaterials_Click(object sender, EventArgs e)
        {
            AddMaterialForm formMaterial = new AddMaterialForm(Home);

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

                formMaterial.MdiParent = Home;
                formMaterial.Show();
            }
            else
            {
                formMaterial.Dispose();
                MessageBox.Show("You do not have access for the Stock Materials Form.\nContact your local Stockiest.");
            }
        }
Exemplo n.º 2
0
        private void Confirm_btn_Click(object sender, EventArgs e)
        {
            AddMaterial           = new AddMaterialForm(home);
            AddMaterial.MdiParent = home;

            AddMaterial.FormClosing += (s, a) =>
            {
                this.Show();
            };

            AddMaterial.Leave += (s, a) =>
            {
                home.MdiChildren.Last <Form>().Close();
            };

            this.Hide();

            AddMaterial.SETFORM(Order.MaterialType, Order.Quantity);
            AddMaterial.Show();
        }