Esempio n. 1
0
        //添加商品
        private void btnAddProduct_Click(object sender, EventArgs e)
        {
            FrmAddProduct addProduct = new FrmAddProduct();

            addProduct.FormClosed += AddProduct_FormClosed;
            ShowMDIChild(addProduct);
        }
Esempio n. 2
0
        private void AddProduct_FormClosed(object sender, FormClosedEventArgs e)
        {
            FrmAddProduct frmadd = sender as FrmAddProduct;

            if (frmadd.DialogResult == DialogResult.OK)
            {
                currentProduct      = frmadd.Tag as Produts;
                frmadd.DialogResult = DialogResult.Cancel;
                btnIntoProduct_Click(frmadd, null);
            }
        }