Example #1
0
        private void btnAddProduct_Click(object sender, EventArgs e)
        {
            using (frmAddEditProduct frmProductDetail = new frmAddEditProduct()
            {
                Categories = listCategories, CurrentCategoryId = currentCategory.Id
            }) {
                frmProductDetail.ShowDialog();

                LoadDataFromDBBaseCategory(currentCategory);
            }
        }
Example #2
0
        private void dgvProduct_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int index   = dgvProduct.SelectedCells[0].RowIndex;
            var product = dgvProduct.Rows[index].Tag as ProductModel;

            using (frmAddEditProduct frmProductDetail = new frmAddEditProduct()
            {
                ProductSelected = product, Categories = listCategories, CurrentCategoryId = currentCategory.Id
            }) {
                frmProductDetail.ShowDialog();

                if (currentCategory != null)
                {
                    LoadDataFromDBBaseCategory(currentCategory);
                }
            }
        }
Example #3
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            frmAddEditProduct frmAddEditProduct = new frmAddEditProduct();

            frmAddEditProduct.ShowDialog();
        }