Exemple #1
0
        public IActionResult Index(string key, string month, string caNum)
        {
            ViewBag.blogDal   = bDal;
            ViewBag.calist    = caDal.GetList("");
            ViewBag.blogmonth = bDal.GetBlogMonth();

            ViewBag.search_key   = key;
            ViewBag.search_month = month;
            ViewBag.search_caNum = caNum;
            return(View());
        }
        /// <summary>
        /// show blog
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult Show(int id)
        {
            ViewBag.blogDal   = dal;
            ViewBag.calist    = cadal.GetList("");
            ViewBag.blogmonth = dal.GetBlogMonth();

            Model.Blog b = dal.GetModel(id);
            if (b == null)
            {
                return(Content("Not Found!"));
            }
            return(View(b));
        }