Example #1
0
        public void Rechazar()
        {
            EventosDAO d = new EventosDAO();

            GridView2.DataSource = d.VerEvento();
            GridView2.DataBind();
        }
        public void VerUsuarios()
        {
            EventosDAO d = new EventosDAO();

            GridView1.DataSource = d.VerUsuarios();
            GridView1.DataBind();
        }
Example #3
0
        public void Aprobar()
        {
            EventosDAO d = new EventosDAO();

            GridView1.DataSource = d.Aprobar();
            GridView1.DataBind();
        }
 protected void Convertir(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "btnConvert")
     {
         int        indice     = Convert.ToInt32(e.CommandArgument);
         int        id         = Convert.ToInt32(GridView1.Rows[indice].Cells[2].Text);
         EventosDAO oEventoDAO = new EventosDAO();
         EventosBO  oEventoBO  = new EventosBO();
         oEventoBO.IDevento = id;
         oEventoDAO.ModificarTipo(oEventoBO, 1);
         VerUsuarios();
     }
 }
Example #5
0
 protected void Rechazar(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "btnRechazar")
     {
         int        indice     = Convert.ToInt32(e.CommandArgument);
         int        id         = Convert.ToInt32(GridView2.Rows[indice].Cells[1].Text);
         EventosDAO oEventoDAO = new EventosDAO();
         EventosBO  oEventoBO  = new EventosBO();
         oEventoBO.IDevento = id;
         oEventoDAO.ModificarEstatus(oEventoBO, 0);
         Rechazar();
         Aprobar();
     }
 }
Example #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Fecha.Text  = DateTime.Now.ToString();
            Label1.Text = DateTime.Now.ToString();
            Label2.Text = DateTime.Now.ToString();
            EventosDAO d = new EventosDAO();

            GridView1.DataSource = d.VerUsuarios();
            GridView1.DataBind();
            GridView2.DataSource = d.Aprobar();
            GridView2.DataBind();
            GridView3.DataSource = d.VerEvento();
            GridView3.DataBind();
        }
        public IActionResult Index([FromServices] EventosDAO eventosDAO)
        {
            var eventoSelecionado = Cookie.LerCookie("EventoSelecionado", Request);

            if (!string.IsNullOrEmpty(eventoSelecionado))
            {
                if (eventoSelecionado != "0")
                {
                    return(RedirectToAction("Index", "Pessoas"));
                }
            }

            var eventos = eventosDAO.Listar();

            return(View(eventos));
        }
        public IActionResult Index([FromServices] PessoaDAO pessoaDAO,
                                   [FromServices] EventosDAO eventoDAO)
        {
            IEnumerable <Pessoa> pessoas;
            var id = int.Parse(Cookie.LerCookie("EventoSelecionado", Request) ?? "0");

            if (id != 0)
            {
                pessoas = pessoaDAO.ListarPorEvento(id);
            }
            else
            {
                Cookie.DeletarCookie("EventoSelecionado", Request);
                return(RedirectToAction("Index", "Home"));
            }

            ViewData["Eventos"]           = eventoDAO.Listar();
            ViewData["EventoSelecionado"] = id;
            return(View(pessoas));
        }
Example #9
0
 public IEnumerable <Evento> Get(int id, [FromBody] ValidarViewModel model, [FromServices] EventosDAO eventosDAO)
 {
     return(eventosDAO.Listar());
 }