// Load database to view private void initLoad() { productTBBindingSource.DataSource = ProductBUS.getAll(); categoryBindingSource.DataSource = CategoryBUS.getAll(); brandBindingSource.DataSource = BrandBUS.getAll(); productBindingSource.DataSource = new Product(); dgvProduct.ClearSelection(); }
//Open category form private void btnAddCate_Click(object sender, EventArgs e) { frmCategory _frmCate = new frmCategory(); if (_frmCate.ShowDialog() == DialogResult.Cancel) { categoryBindingSource.DataSource = CategoryBUS.getAll(); } }
private void btnUpdate_Click(object sender, EventArgs e) { CategoryBUS.update(categoryBindingSource.Current as Category); categoryTBBindingSource.DataSource = CategoryBUS.getAll(); categoryBindingSource.DataSource = new Category(); }
private void frmCategory_Load(object sender, EventArgs e) { categoryTBBindingSource.DataSource = CategoryBUS.getAll(); categoryBindingSource.DataSource = new Category(); }