Ejemplo n.º 1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            string id, name, address;

            id      = txtId.Text;
            name    = txtName.Text;
            address = txtAddress.Text;

            Supplier s            = new Supplier(id, name, address);
            int      numberOfRows = supBUS.Update(s);

            if (numberOfRows > 0)
            {
                List <Supplier> list = supBUS.LoadSupplier();
                dgvSupplier.DataSource = list;
                MessageBox.Show("Sửa thành công");
            }
            else
            {
                MessageBox.Show("Sửa thất bại");
            }
        }