示例#1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmCustomer frm = new FrmCustomer();

            this.Hide();
            frm.ShowDialog();
            this.Visible             = true;
            dto                      = bll.Select();
            dataGridView1.DataSource = dto.Customer;
        }
示例#2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (detail.ID == 0)
     {
         MessageBox.Show("Select a customer to update");
     }
     else
     {
         FrmCustomer frm = new FrmCustomer();
         frm.detail   = detail;
         frm.isUpdate = true;
         this.Hide();
         frm.ShowDialog();
         this.Visible             = true;
         bll                      = new CustomerBLL();
         dto                      = bll.Select();
         dataGridView1.DataSource = dto.Customer;
     }
 }