public ActionResult Feedback() { if (Session["Paciente"] != null) { ViewBag.Logado = Session["Paciente"]; Paciente p = (Paciente)Session["Paciente"]; ViewBag.Nome = p.Nome; ViewBag.Email = p.Email; } if (Session["Nutricionista"] != null) { ViewBag.LogadoN = Session["Nutricionista"]; Nutricionista n = (Nutricionista)Session["Adm"]; } if (Session["Adm"] != null) { ViewBag.LogadoA = Session["Adm"]; Adm p = (Adm)Session["Adm"]; } List <Feedbacks> f = Feedbacks.ListarF(); ViewBag.Feedback = f; return(View()); }
// GET: Adm public ActionResult Listar() { if (Session["Adm"] == null) { Response.Redirect("~/Home/Index", false); } ViewBag.LogadoA = Session["Adm"]; Adm p = (Adm)Session["Adm"]; List <Paciente> ps = Paciente.ListarP(); List <Nutricionista> ns = Nutricionista.ListarN(); List <Categoria> cs = Categoria.ListarC(); List <Alimento> a = Alimento.ListarA(); List <Feedbacks> fs = Feedbacks.ListarF(); ViewBag.Usuario = ps; ViewBag.Nutricionista = ns; ViewBag.Categoria = cs; ViewBag.Alimento = a; ViewBag.Feedback = fs; return(View()); }