// GET: UsuariosEnTarea/AddUserToTask/{tareaId} public ActionResult AddUserToTask(int id) { if (Session["Usuario"] is null) { return(RedirectToAction("Index", "Home")); } List <Usuario> lista; Tarea tarea; Area area; tarea = TareaBl.Get(id); area = AreaBl.Get(tarea.AreaId); lista = UsuarioBl.GetAllByEmpresaId(area.EmpresaId); ViewBag.TareaId = id; return(View(lista)); }
// GET: Areas/Edit/5 public ActionResult Edit(int?id) { if (Session["Usuario"] is null) { return(RedirectToAction("Index", "Home")); } if (id is null) { return(RedirectToAction("Index")); } Area item; item = AreaBl.Get((int)id); ViewBag.ListaDeEmpresas = EmpresaBl.GetAll(); return(View(item)); }