private void btnPesquisarCidade_Click(object sender, EventArgs e) { try { FrmCidades frmCidades = new FrmCidades(); frmCidades.ShowDialog(); if (frmCidades._CidadeId > 0) { cidadeId = frmCidades._CidadeId; txtCidade.Text = frmCidades._Cidade + " - " + frmCidades._UF;; } else { cidadeId = 0; txtCidade.Text = "SELECIONE A CIDADE"; } txtSite.Focus(); } catch { } }
private void btnCidadeC_Click(object sender, EventArgs e) { try { FrmCidades frmCidades = new FrmCidades(); frmCidades.ShowDialog(); if (frmCidades._CidadeId > 0) { cidadeCId = frmCidades._CidadeId; txtCidadeC.Text = frmCidades._Cidade; } else { cidadeCId = 0; txtCidadeC.Clear(); } btnSalvar.Focus(); } catch { } }