Beispiel #1
0
 public static AuxCsv GetFronCsv(string csvLine)
 {
     try
     {
         string[] values = csvLine.Split(';');
         if (values.Count() == 6)
         {
             AuxCsv aux = new AuxCsv
             {
                 Rut   = values[0],
                 Name  = values[1],
                 Email = values[4]
             };
             return(aux);
         }
         else
         {
             AuxCsv aux = new AuxCsv
             {
                 Rut   = "0",
                 Name  = "0",
                 Email = "0"
             };
             return(aux);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #2
0
        public static AuxCsv GetAuxCvsFromFile(Detalle detalle)
        {
            AuxCsv auxCsv = new AuxCsv();

            try
            {
                auxCsv = AuxCsvsList.FirstOrDefault(x => x.Rut == detalle.Instruction.ParticipantDebtor.Rut + "-" + detalle.Instruction.ParticipantDebtor.VerificationCode);
                return(auxCsv);
            }
            catch (Exception)
            {
                return(null);
            }
        }
Beispiel #3
0
 public static void ReadFileSii()
 {
     AuxCsvsList = File.ReadAllLines(Path).Skip(1).Select(v => AuxCsv.GetFronCsv(v)).ToList();
 }