Example #1
0
        public ActionResult Edit(NoticiaEntidade noticia)
        {
            NoticiaEntidade not = bo.SelectById(noticia.Id);
            if (not != null)
            {
                not.Status = noticia.Status;
                not.Texto = noticia.Texto;
                not.Tipo = noticia.Tipo;
                not.Titulo = noticia.Titulo;
                not.Url = noticia.Url;
                bo.Edit(not);

                return RedirectToAction("Index");
            }
            return View(noticia);
        }
Example #2
0
 public ActionResult Create(NoticiaEntidade noticia)
 {
     bo.Insert(noticia);
     return RedirectToAction("Index");
 }