Example #1
0
        public IActionResult Index()
        {
            List <Blog> list = bodal.GetTopList(3, " sort = 0 ORDER BY createdate DESC");

            ViewBag.xhlist = bodal.GetTopRanList(4, "");

            ViewBag.bomodel = bodal.GetTopList(2, " sort = 0 ORDER BY createdate DESC");

            ViewBag.calist = cadal.GetTopList(4, " pbh = 0 ORDER BY caname");

            //DateTime time1 = DateTime.Today;
            //DateTime time2 = new DateTime(2019 / 1 / 2);
            //TimeSpan ts = time1 - time2;
            //string timespan = (time1 - time2).ToString();

            //ViewBag.rundays = timespan;
            ViewBag.blogcounts = bodal.BlogCounts();

            return(View(list));
        }
Example #2
0
        public IActionResult Index(string key)
        {
            List <Blog> list = null;

            if (key == null)
            {
                list = bodal.GetList(" sort = 0 ORDER BY createdate DESC");
            }
            else
            {
                list = bodal.GetList(" title like '%" + key + "%' ORDER BY createdate DESC");
            }


            ViewBag.djlist = bodal.GetTopRanList(4, "");

            ViewBag.calist = cadal.GetTopList(4, " pbh = 0 ORDER BY caname");

            return(View(list));
        }
Example #3
0
 public IActionResult Index()
 {
     ViewBag.bolist = bodal.GetTopRanList(2, "");
     return(View());
 }