Exemplo n.º 1
0
        private void AddClientButton1_Click(object sender, EventArgs e)
        {
            //Hide();
            AddClient form = new AddClient();

            form.FormClosed += (s, args) => BindData();
            form.Show();
        }
Exemplo n.º 2
0
        private void EditToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            //Hide();
            AddClient form = new AddClient();

            form.fioTextBox.Text     = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            form.sexBox.Text         = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            form.birthPicker.Text    = dataGridView1.CurrentRow.Cells[3].Value.ToString();
            form.addressTextBox.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString();
            form.phoneTextBox.Text   = dataGridView1.CurrentRow.Cells[5].Value.ToString();
            form.passTextBox.Text    = dataGridView1.CurrentRow.Cells[6].Value.ToString();

            form.EditMode = true;
            form.id       = dataGridView1.CurrentRow.Cells[0].Value.ToString();

            form.FormClosed += (s, args) => BindData();
            form.Show();
        }