public ActionResult SupprimerNews(int id) { InfoNews info = InfoNews.ChargeInfo(id); info.deleteNews(id); return(RedirectToRoute(new { area = "", controller = "home", action = "index" })); }
public ActionResult Details(int idNews, int idAuthor) { Wrapper wrap = new Wrapper(); wrap.Anews = InfoNews.ChargeInfo(idNews); wrap.Auteur = Author.ChargeAuthor(idAuthor); return(View(wrap)); }
public ActionResult AjouterNews(string newsTitle, string newsResume, string newsText, int idAuthor, string newsImage) { InfoNews nouvelle = new InfoNews(); nouvelle.insertNews(newsTitle, newsResume, newsText, idAuthor, newsImage); return(RedirectToRoute(new { area = "", controller = "Home", action = "Index" })); }
public ActionResult Infos() { List <InfoNews> infos = InfoNews.ChargeAll(); return(View("Index", infos)); }
// // GET: /Home/ public ActionResult Index() { List <InfoNews> infos = InfoNews.ChargeFive(); return(View(infos)); }
private List <InfoNews> ChargeNews() { return(InfoNews.getAuthorArticles(this.IdAuthor)); }
public ActionResult ModifierNews(InfoNews info) { info.updateNews(); return(RedirectToRoute(new { area = "", controller = "Home", action = "Index" })); }
public ActionResult ModifierNews(int id) { InfoNews info = InfoNews.ChargeInfo(id); return(View(info)); }