void BtnNaturezasClick(object sender, EventArgs e) { fCadNaturezas frmCad = new fCadNaturezas(true); frmCad.ShowDialog(); if (frmCad.result) { CarregaNaturezas(); cbxCodNaturezas.Text = frmCad.codigo; int n = cbxCodNaturezas.SelectedIndex; cbxNaturezas.Text = (n >= 0) ? cbxNaturezas.Items[n].ToString() : ""; } cbxNaturezas.Focus(); }
void MniNaturezasClick(object sender, EventArgs e) { fCadNaturezas frm = new fCadNaturezas(false); frm.ShowDialog(); }