Beispiel #1
0
 /// <summary>
 ///     Inicia las validaciones
 /// </summary>
 public Validations()
 {
     _db          = new BasesDatos();
     _failRecords = new List <KeyValuePair <OracleRecord, string> >();
     _dbRecords   = new Dictionary <string, List <string> >();
     _reporte     = new OutputInterface();
     GetDataFromDataBase();
 }
Beispiel #2
0
        /// <summary>
        /// Crea una nueva interfaz con los registros fallidos pero aprobados
        /// </summary>
        /// <param name="newRecords">Lista de nuevos registros a agregar</param>
        /// <returns></returns>
        public bool WriteApproved(List <OracleRecord> newRecords)
        {
            var estado = false;

            try
            {
                LogUtilities.ShowMessage("Procesando " + newRecords.Count + " archivos aprobados", 1);
                var reporte = new OutputInterface();
                reporte.AddRecords(newRecords);
                var outputFile = DateTime.Now.ToString("dd-MM-yyyyThh-mm-ss") + "_output.csv";
                reporte.Save(outputFile);
                estado = true;
            }
            catch (Exception ex)
            {
                LogUtilities.ShowMessage(ex.ToString(), 1, false);
            }
            return(estado);
        }