Example #1
0
        private void btnAddProduct_Click(object sender, EventArgs e)
        {
            FrmAddProduct addProduct = new FrmAddProduct();

            addProduct.FormClosed += AddProduct_FormClosed;
            ShowMDIChild(addProduct);
        }
Example #2
0
        /// <summary>
        /// 添加商品
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolProductADD_Click(object sender, EventArgs e)
        {
            FrmAddProduct form = new FrmAddProduct();

            form.ShowDialog();
            CshProduct();
        }
Example #3
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);
            }
        }