Example #1
0
        public void Importar(string strFileName)
        {
            DALTDummy dAL = new DALTDummy();

            int    counter = 0;
            string line;

            System.IO.StreamReader file = new System.IO.StreamReader(strFileName);

            List <TDummy> lst = new List <TDummy>();

            while ((line = file.ReadLine()) != null)
            {
                TDummy seq = Extrair(line);
                if (seq.um != "")
                {
                    try
                    {
                        lst.Add(seq);
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }
Example #2
0
        public void ImportarGenerico(string strFileName)
        {
            BLLGuia     bLLG    = new BLLGuia();
            BLLProcesso bLLP    = new BLLProcesso();
            DALTDummy   dAL     = new DALTDummy();
            int         counter = 0;
            string      line;

            System.IO.StreamReader file = new System.IO.StreamReader(strFileName);

            List <TDummy>   lst         = new List <TDummy>();
            List <Guia>     lstGuia     = new List <Guia>();
            List <Processo> lstProcesso = new List <Processo>();

            while ((line = file.ReadLine()) != null)
            {
                TDummy seq = Extrair(line);
                counter++;

                lst.Add(seq);

                if (!lstGuia.Exists(x => x.NumeroGuia == seq.dois))
                {
                    lstGuia.Add(bLLG.Extrair(line));
                }
                if (bLLP.VerificarProcesso(seq))
                {
                    lstProcesso.Add(bLLP.Extrair(line));
                }
            }

            try
            {
                //  dAL.AdicionarRange(lst);
                bLLG.AdicionarRange(lstGuia);
                bLLP.AdicionarRange(lstProcesso);
            }
            catch (Exception ex)
            { throw ex; }
        }
Example #3
0
 public bool VerificarGuia(TDummy seq)
 {
     return(seq.cinco.Length == 0);
 }