public CommonController()
 {
     postCategoryDAO = new PostCategoryDAO(db);
     menuDAO         = new MenuDAO(db);
     postDAO         = new PostDAO(db);
     systemInfoDAO   = new SystemInfoDAO(db);
     adDAO           = new AdDAO(db);
 }
        public ActionResult EachDay(string id)
        {
            PostCategory2Controller.se = null;
            PostCategoryDAO po   = new PostCategoryDAO();
            NewsDAO         news = new NewsDAO();

            ViewBag.ListPostCategory = po.List();
            ViewBag.ListNews         = news.ListNews2();

            if (string.IsNullOrEmpty(id))
            {
                ViewBag.ListDay = new List <int>();
                ViewBag.ID      = 0;
            }
            else
            {
                string[] list = id.Split('-');
                ViewBag.ListDay   = dao.ListDay(Convert.ToInt32(list[0]), Convert.ToInt32(list[1]));
                ViewBag.ID        = id;
                ViewBag.ListVideo = dao.ListVideo(Convert.ToInt32(list[0]), Convert.ToInt32(list[1]), Convert.ToInt32(list[2]));
            }
            return(View());
        }
Beispiel #3
0
 public PostCategoryController()
 {
     postCategoryDAO = new PostCategoryDAO(db);
 }