public ActionResult EventoIndex()
 {
     using (EventoDAL dal = new EventoDAL())
     {
         return(View(dal.ReadAll()));
     }
 }
Beispiel #2
0
        public ActionResult Editar(int id)
        {
            CadastroEventoModel evento = new EventoDAL().ConsultarId(id);

            ViewBag.LocalId = new SelectList(context.LocalEvento.ToList(), "LocalId", "Nome");
            return(View(evento));
        }
Beispiel #3
0
        public ActionResult Editar(CadastroEventoModel evento)
        {
            ViewBag.LocalId = new SelectList(context.LocalEvento.ToList(), "LocalId", "Nome");
            EventoDAL DAL = new EventoDAL();

            DAL.Editar(evento);
            return(RedirectToAction("Index"));
        }
Beispiel #4
0
        public ActionResult Index()
        {
            EventoDAL evento = new EventoDAL();
            IList <CadastroEventoModel> lista = evento.ListarTodos();


            return(View(lista));
        }
Beispiel #5
0
        public ActionResult ComissaoCreate()
        {
            using (EventoDAL dal = new EventoDAL())
            {
                ViewBag.Eventos = dal.ReadAll();
            }

            return(View());
        }
        public ActionResult EventoCreate(Evento eventos)
        {
            using (EventoDAL dal = new EventoDAL())
            {
                dal.Create(eventos);

                return(Redirect("/Conferente/ConferenteCreate"));
            }
        }
        public ActionResult EventoUpdate(Evento eventos)
        {
            using (EventoDAL dal = new EventoDAL())
            {
                dal.Update(eventos);

                return(RedirectToAction("EventoIndex"));
            }
        }
Beispiel #8
0
        public ActionResult ComissaoUpdate(int id)
        {
            using (ComissaoDAL dalC = new ComissaoDAL())
                using (EventoDAL dalE = new EventoDAL())
                {
                    ViewBag.Eventos = dalE.ReadAll();

                    return(View(dalC.Read(id)));
                }
        }
Beispiel #9
0
        public ActionResult Index(string nome)
        {
            if (!string.IsNullOrEmpty(nome))
            {
                IList <CadastroEventoModel> evento = new EventoDAL().ConsultarNome(nome);

                return(View(evento));
            }
            return(RedirectToAction("Index"));
        }
Beispiel #10
0
        public ActionResult DeletarEvento(Evento evento)
        {
            try
            {
                EventoDAL.DeleteEvento(evento);
            }
            catch (Exception)
            {
                System.Console.WriteLine("falhou");
                return(View(nameof(Cadastro)));

                throw;
            }
            return(View(nameof(Cadastro)));
        }
Beispiel #11
0
        public ActionResult AtividadeUpdate(int id)
        {
            using (ConferenteDAL dalC = new ConferenteDAL())
                using (EventoDAL dalE = new EventoDAL())
                    using (TipoDAL dalT = new TipoDAL())
                        using (AtividadeDAL dalA = new AtividadeDAL())
                        {
                            ViewBag.Tipos = dalT.Read();

                            ViewBag.Eventos = dalE.ReadAll();

                            ViewBag.Conferentes = dalC.ReadAll();

                            return(View(dalA.ReadAll()));
                        }
        }
Beispiel #12
0
        public ActionResult AtividadeCreate()
        {
            using (EventoDAL dal = new EventoDAL())
            {
                ViewBag.Eventos = dal.ReadAll();
            }

            using (ConferenteDAL dal = new ConferenteDAL())
            {
                ViewBag.Conferentes = dal.ReadAll();
            }

            using (TipoDAL dal = new TipoDAL())
            {
                ViewBag.Tipos = dal.Read();
            }
            return(View());
        }
Beispiel #13
0
        public ActionResult Evento_UsuarioCreate()
        {
            using (EventoDAL dal = new EventoDAL())
            {
                ViewBag.Eventos = dal.ReadAll();
            }

            using (UsuarioDAL dal = new UsuarioDAL())
            {
                ViewBag.Usuarios = dal.ReadAll();
            }

            using (StatusDAL dal = new StatusDAL())
            {
                ViewBag.Status = dal.ReadAll();
            }

            return(View());
        }
Beispiel #14
0
        public ActionResult Index(CadastroEventoModel evento)
        {
            EventoDAL DAL     = new EventoDAL();
            var       sucesso = DAL.Inserir(evento);

            if (sucesso)
            {
                TempData["msg"] = "<script>alert('Evento Cadastrado com sucesso');</script>";

                ModelState.Clear();
            }
            else
            {
                TempData["msg"] = "<script>alert('Este evento já existe');</script>";
            }
            ViewBag.LocalId = new SelectList(context.LocalEvento.ToList(), "LocalId", "Nome");

            return(View());
        }
Beispiel #15
0
        public static bool ActivaEvento(EventoDTO theEventoDTO)
        {
            bool respuesta = EventoDAL.ActivaEvento(theEventoDTO);

            return(respuesta);
        }
Beispiel #16
0
        public static bool Update(DTO.EventoDTO myEventoDTO)
        {
            bool resultado = EventoDAL.Update(myEventoDTO);

            return(resultado);
        }
Beispiel #17
0
        public static bool Insert(DTO.EventoDTO myEventoDTO)
        {
            bool resultado = EventoDAL.Insert(myEventoDTO);

            return(resultado);
        }
Beispiel #18
0
 public EventoBLL()
 {
     DAL = new EventoDAL();
 }