private void btnOK_Click(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(txbNomeFilial.Text) && !string.IsNullOrWhiteSpace(txbCidadeFilial.Text) && !string.IsNullOrWhiteSpace(txbLogFilial.Text) && !string.IsNullOrWhiteSpace(txbTelFilial.Text)) { ConManager.CadastrarFilial(txbNomeFilial.Text, txbCidadeFilial.Text, txbLogFilial.Text, txbTelFilial.Text); this.Close(); } else { MessageBox.Show("Por favor preencha os campos acima!"); } }