Exemplo n.º 1
0
        private void btnEdition_Click(object sender, EventArgs e)
        {
            AddEdBranchForm form = new AddEdBranchForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
            }
            else
            {
            }
        }
Exemplo n.º 2
0
        private void btnEdition_Click(object sender, EventArgs e)
        {
            AddEdBranchForm form = new AddEdBranchForm();

            form.branchBindingSource.DataSource = branchBindingSource;
            form.branchBindingSource.Position   = branchBindingSource.Position;

            if (form.ShowDialog() == DialogResult.OK)
            {
                branchTableAdapter.Update(myDataBaseDataSet.Branch);
                int index = dgvBranch.CurrentRow.Index;
                this.branchTableAdapter.Fill(this.myDataBaseDataSet.Branch);
                dgvBranch.CurrentCell = dgvBranch.Rows[index].Cells[2];
            }
        }