Example #1
0
        public void AdicionarSeq(List <SequencialGed> seq)
        {
            TCEREDXEntities db = new TCEREDXEntities();

            db.SequencialGeds.AddRange(seq);
            db.SaveChanges();
        }
Example #2
0
        public void DevolverGuia(string text)
        {
            try
            {
                TCEREDXEntities db         = new TCEREDXEntities();
                List <Guia>     guiaResult = (from g in db.Guias where g.NumeroGuia == text select g).ToList();
                foreach (Guia g in guiaResult)
                {
                    g.Devolvido = true;
                }

                List <Processo> proResult = (from g in db.Processoes where g.NumeroGuia == text select g).ToList();

                foreach (Processo g in proResult)
                {
                    g.Devolvido = true;
                }

                db.SaveChanges();
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #3
0
        public void DigitalizarProcesso(Processo p)
        {
            try
            {
                TCEREDXEntities db = new TCEREDXEntities();

                var proResult = (from g in db.Processoes where g.NumeroGuia == p.NumeroGuia && g.NProcesso == p.NProcesso && g.AnoProcesso == p.AnoProcesso select g).ToList().AsEnumerable();

                foreach (Processo g in proResult)
                {
                    g.Digitalizado = true;
                    g.PastaDestino = p.PastaDestino;
                }

                var pro2Result = (from g in db.Processoes where g.NumeroGuia == p.NumeroGuia && g.NProcesso == p.NProcesso && g.AnoProcesso == p.AnoProcesso select g).ToList().Count();

                if (pro2Result == 0)
                {
                    DALGuia guia = new DALGuia();
                    guia.DigitalizarGuia(p);
                }

                db.SaveChanges();
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #4
0
 public void AdicionarRange(List <Guia> seq)
 {
     try
     {
         TCEREDXEntities db = new TCEREDXEntities();
         db.Guias.AddRange(seq);
         db.SaveChanges();
     }
     catch (Exception ex)
     { throw ex; }
 }
Example #5
0
        private void AtualizarSequencial(Processo p, int Seq)
        {
            TCEREDXEntities db = new TCEREDXEntities();

            var proResult = (from g in db.SequencialGeds where g.Numero.ToString() == p.NProcesso && g.Ano == p.AnoProcesso select g);

            foreach (SequencialGed seq in proResult)
            {
                seq.Sequencial = seq.Sequencial + 1;
            }

            db.SaveChanges();
        }
Example #6
0
        internal void DigitalizarGuia(Processo p)
        {
            try
            {
                TCEREDXEntities db         = new TCEREDXEntities();
                List <Guia>     guiaResult = (from g in db.Guias where g.NumeroGuia == p.NumeroGuia && p.AnoGuia == g.AnoGuia select g).ToList();
                foreach (Guia g in guiaResult)
                {
                    g.Digitalizado = true;
                }

                db.SaveChanges();
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }