Esempio n. 1
0
 private void confirma_Click(object sender, RoutedEventArgs e)
 {
     if (VerificaPreenchido())
     {
         Arquivo arq = new Arquivo();
         arq.escreveVoto(retornaUF(), CPF, 0, codCandidato, 0, codCandidatoReg, 0);
         Sucesso s = new Sucesso(Estado);
         s.Show();
         this.Close();
     }
 }
Esempio n. 2
0
 private void confirma_Click(object sender, RoutedEventArgs e)
 {
     if (VerificaPreenchido())
     {
         Arquivo arq = new Arquivo();
         string  candidatoNacional = arq.recuperaCandidato(codCandidato);
         string  candidatoRegional = arq.recuperaCandidato(codCandidatoReg);
         if (chkBrancoN.IsChecked == true)
         {
             codCandidato = -1;
         }
         if (chkBrancoR.IsChecked == true)
         {
             codCandidatoReg = -1;
         }
         int codPartido    = candidatoNacional == string.Empty ? 0 : Convert.ToInt32(candidatoNacional.Split(';')[2]);
         int codPartidoReg = candidatoRegional == string.Empty ? 0 : Convert.ToInt32(candidatoRegional.Split(';')[2]);
         arq.escreveVoto(retornaUF(), CPF, 0, codCandidato, codPartido, codCandidatoReg, codPartidoReg);
         Sucesso s = new Sucesso(Estado);
         s.Show();
         this.Close();
     }
 }