コード例 #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Are you sure you wanna delete this?", "Delete Product",
                                                        MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                int index = this.ProductsGRID.Rows.IndexOf((GridViewDataRowInfo)this.ProductsGRID.CurrentRow);
                if (index < 0)
                {
                    return;
                }
                BO.Product product = (BO.Product)ProductsGRID.Rows[index].DataBoundItem;
                if (product != null)
                {
                    productBll.Remove(product.ProductID);
                }
            }
            else if (dialogResult == DialogResult.No)
            {
                this.Hide();
                Products products = new Products();
                products.ShowDialog();
            }
        }
コード例 #2
0
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            this.Hide();
            Products products = new Products();

            products.ShowDialog();
        }
コード例 #3
0
 private void menuRegjistrimiProduktev_Click(object sender, EventArgs e)
 {
     Products.Products products = new Products.Products();
     products.ShowDialog();
 }