4
Dear friends, I have a very simple form that is closing after clicking OK on Messagebox. I have already reviewed everything, compared it with other papers I have and I haven’t found the solution. If anyone can give me a hand, Thank you.
namespace menu
{
public partial class frmFinanceiroDocumentosVencidosGrid : Form
{
public frmFinanceiroDocumentosVencidosGrid()
{
InitializeComponent();
}
public int codigo { get; set; }
private void frmFinanceiroDocumentosVencidosGrid_Load(object sender, EventArgs e)
{
dataGridView1.DataSource = ClienteBLL.verificaParcelasVencidas(codigo);
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnVisualizar_documento_Click(object sender, EventArgs e)
{
if (dataGridView1.Rows.Count > 0)
{
int codigo = (int)dataGridView1.CurrentRow.Cells[0].Value;
Financeiro fin = FinanceiroBLL.pesquisaFinanceiroCodigo(codigo);
if (fin.nota_fiscal_id != null)
{
int nota_codigo = (int)fin.nota_fiscal_id;
using (frmNotaFiscalVisualizar ver = new frmNotaFiscalVisualizar())
{
ver.codigo = nota_codigo;
ver.ShowDialog();
}
}
else
{
MessageBox.Show("Não há notas fiscais vinculadas à este documento.");
}
}
}
private void btnFechar_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
What is the code of the form
frmNotaFiscalVisualizar
?– Augusto Vasques
What are you calling this
Form
?– CypherPotato