private void metroTile3_Click(object sender, EventArgs e) { if (this.ActiveMdiChild != null) { this.ActiveMdiChild.Close(); } FrmCadFuncionarios func = new FrmCadFuncionarios(); func.Show(); }
private void alterarToolStripMenuItem_Click(object sender, EventArgs e) { FrmCadFuncionarios funci = new FrmCadFuncionarios(); funci.TxtNome.Text = DgFuncionarios.SelectedCells[0].Value.ToString(); funci.TxtCpf.Text = DgFuncionarios.SelectedCells[1].Value.ToString(); funci.TxtRG.Text = DgFuncionarios.SelectedCells[2].Value.ToString(); funci.TxtNasc.Text = DgFuncionarios.SelectedCells[3].Value.ToString(); funci.TxtTel.Text = DgFuncionarios.SelectedCells[4].Value.ToString(); funci.TxtCel.Text = DgFuncionarios.SelectedCells[5].Value.ToString(); funci.TxtEmail.Text = DgFuncionarios.SelectedCells[6].Value.ToString(); funci.TxtEndereco.Text = DgFuncionarios.SelectedCells[7].Value.ToString(); funci.TxtComplem.Text = DgFuncionarios.SelectedCells[8].Value.ToString(); funci.TxtBairro.Text = DgFuncionarios.SelectedCells[9].Value.ToString(); funci.button1.Visible = false; funci.Show(); }