Beispiel #1
0
        public ActionResult SupprimerNews(int id)
        {
            InfoNews info = InfoNews.ChargeInfo(id);

            info.deleteNews(id);
            return(RedirectToRoute(new { area = "", controller = "home", action = "index" }));
        }
Beispiel #2
0
        public ActionResult Details(int idNews, int idAuthor)
        {
            Wrapper wrap = new Wrapper();

            wrap.Anews  = InfoNews.ChargeInfo(idNews);
            wrap.Auteur = Author.ChargeAuthor(idAuthor);
            return(View(wrap));
        }
Beispiel #3
0
        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" }));
        }
Beispiel #4
0
        public ActionResult Infos()
        {
            List <InfoNews> infos = InfoNews.ChargeAll();

            return(View("Index", infos));
        }
Beispiel #5
0
        //
        // GET: /Home/
        public ActionResult Index()
        {
            List <InfoNews> infos = InfoNews.ChargeFive();

            return(View(infos));
        }
Beispiel #6
0
 private List <InfoNews> ChargeNews()
 {
     return(InfoNews.getAuthorArticles(this.IdAuthor));
 }
Beispiel #7
0
 public ActionResult ModifierNews(InfoNews info)
 {
     info.updateNews();
     return(RedirectToRoute(new { area = "", controller = "Home", action = "Index" }));
 }
Beispiel #8
0
        public ActionResult ModifierNews(int id)
        {
            InfoNews info = InfoNews.ChargeInfo(id);

            return(View(info));
        }