Beispiel #1
0
        public ActionResult Edit(int id)
        {
            NewsVM      vm    = new NewsVM();
            List <News> lista = vm.Get_list();
            News        a     = lista.Where(s => s.NewsID == id).FirstOrDefault();

            return(View(a));
        }
Beispiel #2
0
        // GET: News
        public ActionResult Index()
        {
            NewsVM      vm        = new NewsVM();
            List <News> list_news = vm.Get_list().ToList();

            ViewBag.News = list_news;
            return(View(list_news));
        }
Beispiel #3
0
        // GET: Home
        public ActionResult Index()
        {
            NewsVM      vm        = new NewsVM();
            List <News> list_news = vm.Get_list().ToList();

            list_news.Reverse();
            ViewBag.News = list_news.Take(3);
            //-----
            AccountVM      userBL = new AccountVM();
            List <Account> list   = userBL.Get_list();

            return(View(list));
        }