private void btnConfirmar_Click(object sender, EventArgs e) { UrnaDTO dto = new UrnaDTO(); dto.id_eleitor = eleitor.id_eleitor; dto.id_urna = Convert.ToInt32(txtUrna.Text); UrnaBusiness business = new UrnaBusiness(); business.LiberarUrna(dto); MessageBox.Show("Urna liberada com sucesso!"); }
private void bntConfirmar_Click(object sender, EventArgs e) { UrnaBusiness business = new UrnaBusiness(); frmDeputadoEstadual frm = new frmDeputadoEstadual(); VotoDatabase db = new VotoDatabase(); bool ativa = business.VerificarUrna(); if (ativa == false) { lblBlock.Visible = true; } else { db.ResetUrna(); Hide(); frm.ShowDialog(); Close(); } }