Exemplo n.º 1
0
        public ActionResult Oferta(int id = 0)
        {
            // Recordar a que oferta tengo que volver
            Session["NumOferta"] = id;


            var oferta = mOferta.GetOferta(id);

            //solo ver mis ofertas
            if (oferta == null)
            {
                return(RedirectToAction("Index", "Usuario"));
            }
            ViewBag.Estado = oferta.Abierta;
            ViewBag.Nombre = oferta.Nombre;
            //pasar valor si voy a vista DatosUsuario
            TempData["Nombre"] = oferta.Nombre;
            return(View());
        }
Exemplo n.º 2
0
 public ActionResult Acciones(int id = 0)
 {
     if (id == 0)
     {
         mOferta.id         = 0;
         mOferta.Usuario_id = SesionHelper.GetUser();
         ViewBag.Title      = "Nueva Oferta de empleo";
     }
     else
     {
         ViewBag.Title = "Modificar Oferta";
         mOferta       = mOferta.GetOferta(id);
         // Solo puedo leer mis ofertas
         if (mOferta == null)
         {
             return(RedirectToAction("Index"));
         }
     }
     ViewBag.LPago      = mEstado.GetPago();
     ViewBag.LModoPago  = mEstado.GetModoPago();
     ViewBag.LCategoria = mCategoria.GetListado();
     return(View(mOferta));
 }