예제 #1
0
        private void btnNovo_Click(object sender, EventArgs e)
        {
            frmCadastroTipoUsuario frm = new frmCadastroTipoUsuario();

            frm.ShowDialog();
            this.MostrarDados(txtValor.Text);
        }
예제 #2
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     if (dtDados.SelectedRows.Count > 0)
     {
         string id                  = dtDados.CurrentRow.Cells["TipoUsuarioId"].Value.ToString();
         string descricao           = dtDados.CurrentRow.Cells["Nome"].Value.ToString();
         frmCadastroTipoUsuario frm = new frmCadastroTipoUsuario();
         frm.txtCodigo.Text    = id;
         frm.txtDescricao.Text = descricao;
         frm.ShowDialog();
         this.MostrarDados(txtValor.Text);
     }
     else
     {
         MessageBox.Show("Por favor, selecione um registro!");
     }
 }