Beispiel #1
0
        public void DesabilitarPeriodoAreas(int EventoID, int EntregaID)
        {
            try
            {
                EventoEntregaControle oEEC = new EventoEntregaControle();
                List <int>            ListaEntregaControleID       = new List <int>();
                List <int>            ListaEventoEntregaControleID = new List <int>();

                string sql = "SELECT ID FROM tEntregaControle (nolock) WHERE Ativa = 'T' AND tEntregaControle.EntregaID = " + EntregaID;

                bd.Consulta(sql);

                while (bd.Consulta().Read())
                {
                    ListaEntregaControleID.Add(bd.LerInt("ID"));
                }

                bd.Fechar();

                foreach (int EntregaControleID in ListaEntregaControleID)
                {
                    string sqlaux = "select ID from tEventoEntregaControle (nolock) where tEventoEntregaControle.EntregaControleID =  " + EntregaControleID + "and tEventoEntregaControle.EventoID = " + EventoID;
                    bd.Consulta(sqlaux);

                    while (bd.Consulta().Read())
                    {
                        ListaEventoEntregaControleID.Add(bd.LerInt("ID"));
                    }
                }

                bd.Fechar();
                foreach (int EventoEntregaControleID in ListaEventoEntregaControleID)
                {
                    oEEC.Excluir(EventoEntregaControleID);
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                bd.Fechar();
            }
        }
Beispiel #2
0
        public void HabilitarPeriodoAreas(int EventoID, int EntregaID)
        {
            try
            {
                EventoEntregaControle oEEC = new EventoEntregaControle();
                List <int>            ListaEntregaControleID = new List <int>();

                string sql = @"SELECT c.ID FROM  tEntregaControle c
                        LEFT JOIN tEventoEntregaControle e ON c.ID = e.EntregaControleID and e.EventoID = " + EventoID + @" 
                        WHERE c.Ativa = 'T' and c.EntregaID = " + EntregaID + " and e.ID is null";

                bd.Consulta(sql);

                while (bd.Consulta().Read())
                {
                    ListaEntregaControleID.Add(bd.LerInt("ID"));
                }

                bd.Fechar();

                foreach (int EntregaControleID in ListaEntregaControleID)
                {
                    oEEC.Limpar();
                    oEEC.EventoID.Valor            = EventoID;
                    oEEC.EntregaControleID.Valor   = EntregaControleID;
                    oEEC.ProcedimentoEntrega.Valor = "";
                    oEEC.DiasTriagem.Valor         = 0;
                    oEEC.Inserir();
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                bd.Fechar();
            }
        }
Beispiel #3
0
 // passar o Usuario logado no sistema
 public EventoEntregaControleLista_B(int usuarioIDLogado)
 {
     eventoEntregaControle = new EventoEntregaControle(usuarioIDLogado);
 }
Beispiel #4
0
 // passar o Usuario logado no sistema
 public EventoEntregaControleLista_B()
 {
     eventoEntregaControle = new EventoEntregaControle();
 }