Exemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmCategory frm = new FrmCategory();

            this.Hide();
            frm.ShowDialog();
            this.Visible             = true;
            dto                      = bll.Select();
            dataGridView1.DataSource = dto.Categories;
        }
Exemplo n.º 2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (detail.ID == 0)
     {
         MessageBox.Show("Please select a category from table");
     }
     else
     {
         FrmCategory frm = new FrmCategory();
         frm.detail   = detail;
         frm.isUpdate = true;
         this.Hide();
         frm.ShowDialog();
         this.Visible             = true;
         bll                      = new CategoryBLL();
         dto                      = bll.Select();
         dataGridView1.DataSource = dto.Categories;
     }
 }