// submit data update to parent form
        private void btnEditSubmit_Click(object sender, EventArgs e)
        {
            BLLEdit       control = new BLLEdit();
            List <string> data    = new List <string>();

            data.Add(txtID.Text);
            data.Add(txtCompanyName.Text);
            data.Add(txtContactName.Text);
            data.Add(txtContactTitle.Text);
            data.Add(txtAddress.Text);
            data.Add(txtCity.Text);
            data.Add(txtRegion.Text);
            data.Add(txtRegion.Text);
            data.Add(txtCountry.Text);
            data.Add(txtPhone.Text);
            data.Add(txtFax.Text);
            data.Add(txtHomePage.Text);

            if (control.Edit(data) == 1)
            {
                MessageBox.Show("Cập nhật thành công !");
            }
            else
            {
                MessageBox.Show("Cập nhật thất bại");
            }
        }
Beispiel #2
0
        // load data into grid view
        public void LoadDataGridView()
        {
            BLLEdit   control = new BLLEdit();
            DataTable dt      = new DataTable();

            dt = control.getDataTable();
            gridView.DataSource = dt;
        }