Пример #1
0
 /// <summary>
 /// Guarda os dadoss num ficheiro binario
 /// </summary>
 public static bool Save(string fileAuditorias, string fileVulnerabilidades, string fileColaboradores, string fileEquipamentos)
 {
     try
     {
         Auditorias.Save(fileAuditorias);
         Colaboradores.Save(fileColaboradores);
         Vulnerabilidades.Save(fileVulnerabilidades);
         Equipamentos.Save(fileEquipamentos);
         return(true);
     }
     catch (FileNotFoundException e)
     {
         throw new FileNotFoundException("Erro: " + e.Message);
     }
     catch (IOException e)
     {
         throw new IOException("Erro: " + e.Message);
     }
     catch (Exception e)
     {
         throw new Exception("ERRO! " + e.Message);
     }
 }