Exemple #1
0
        public ActionResult Create(FormCollection collection, int id)
        {
            try
            {
                // TODO: Add insert logic here
                ComentarioCEN comentarioCEN = new ComentarioCEN();

                if (!collection["Texto"].Equals(""))
                {
                    comentarioCEN.New_(p_texto: collection["Texto"], p_usuario: User.Identity.GetUserName(), p_video: id);
                    var ctrl = new NotificacionController();
                    ctrl.CreateNV(id, User.Identity.GetUserName());
                }


                return(RedirectToRoute(new
                {
                    controller = "Video",
                    action = "Details",
                    id = id,
                }));
            }
            catch
            {
                return(View());
            }
        }
Exemple #2
0
        public ActionResult Create(FormCollection collection, int id)
        {
            try
            {
                // TODO: Add insert logic here
                RespuestaCEN res  = new RespuestaCEN();
                DateTime     fech = new DateTime();
                fech = System.DateTime.Now;
                var ctrl = new NotificacionController();
                ctrl.CreateNT(id, User.Identity.GetUserName());
                res.New_(p_tema: id, p_usuario: User.Identity.GetUserName(), p_descripcion: collection["Descripcion"], p_fecha: fech);

                return(RedirectToRoute(new
                {
                    controller = "Tema",
                    action = "Details",
                    id = id,
                }));

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }