Esempio n. 1
0
 private void btnAlterar_Click(object sender, EventArgs e)
 {
     Cadastro.FrmCargo fcu = new Cadastro.FrmCargo();
     fcu.lblTitulo.Text      = "Alterar Cargo";
     fcu.txtNomeCargo.Text   = Convert.ToString(dataGridView1.CurrentRow.Cells[1].Value);
     fcu.Codigo              = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);
     fcu.btnCadastrar.Click -= fcu.btnCadastrar_Click;
     fcu.btnCadastrar.Click += fcu.AlterarCargo;
     fcu.btnCadastrar.Text   = "Alterar";
     fcu.ShowDialog();
     CarregarDadosGrid();
 }
Esempio n. 2
0
 private void button3_Click(object sender, EventArgs e)
 {
     Cadastro.FrmCargo c = new Cadastro.FrmCargo();
     c.ShowDialog();
 }