Example #1
0
 // 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();
 }
Example #2
0
        //Open category form
        private void btnAddCate_Click(object sender, EventArgs e)
        {
            frmCategory _frmCate = new frmCategory();

            if (_frmCate.ShowDialog() == DialogResult.Cancel)
            {
                categoryBindingSource.DataSource = CategoryBUS.getAll();
            }
        }
Example #3
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     CategoryBUS.update(categoryBindingSource.Current as Category);
     categoryTBBindingSource.DataSource = CategoryBUS.getAll();
     categoryBindingSource.DataSource   = new Category();
 }
Example #4
0
 private void frmCategory_Load(object sender, EventArgs e)
 {
     categoryTBBindingSource.DataSource = CategoryBUS.getAll();
     categoryBindingSource.DataSource   = new Category();
 }