Пример #1
0
        private void addBtn_Click(object sender, EventArgs e)
        {
            buttonclickadd = true;

            AddProductfrm addProduct = new AddProductfrm();

            addProduct.buttonstatusadd = buttonclickadd;
            addProduct.ShowDialog();
            Display();
        }
Пример #2
0
        private void modifyBtn_Click(object sender, EventArgs e)
        {
            AddProductfrm addProduct = new AddProductfrm();

            // ProductFrm addProduct = new ProductFrm();
            //addProduct.context = context;

            addProduct.currentProduct  = currentProduct;
            addProduct.buttonstatusadd = false; //for modify button
            addProduct.ShowDialog();
            //  context.SaveChanges();
            Display();
        }