Ejemplo n.º 1
0
        // GET: Airtickets
        public ActionResult Index(string id, int status = 0)
        {
            string searchStr = Request["searchInput"] ?? "";

            Models.Sys_Menu Menu = new Models.Sys_Menu("Airticket", id);
            Models.Crawler  CV   = new Models.Crawler(Menu.focusMenukey, searchStr);

            ViewBag.title     = "AirTickets";
            ViewBag.titleCh   = "飛機航班報價";
            ViewBag.menukey   = Menu.focusMenukey;
            ViewBag.menuName  = Menu.focusMenuName;
            ViewBag.status    = status;
            ViewBag.searchStr = searchStr;

            ViewData["menu"] = Menu.menu;

            DataTable view = CV.viewData;

            view.DefaultView.Sort = "day DESC";

            ViewData["data"]     = CV.data;
            ViewData["viewData"] = view.DefaultView.ToTable();

            return(View());
        }
Ejemplo n.º 2
0
        // GET: Crawlar
        public ActionResult Index(string id, int status = 0, string msg = "")
        {
            string searchStr = Request["searchInput"] ?? "";

            Models.Sys_Menu Menu = new Models.Sys_Menu("Crawler", id);
            Models.Crawler  CV   = new Models.Crawler(Menu.focusMenukey, searchStr);

            ViewBag.title     = "Crawler";
            ViewBag.titleCh   = "爬蟲資料庫";
            ViewBag.menukey   = Menu.focusMenukey;
            ViewBag.menuName  = Menu.focusMenuName;
            ViewBag.jsonPath  = CV.jsonPath;
            ViewBag.fileName  = CV.fileName;
            ViewBag.status    = status;
            ViewBag.msg       = msg;
            ViewBag.searchStr = searchStr;

            ViewData["menu"]     = Menu.menu;
            ViewData["data"]     = CV.data;
            ViewData["viewData"] = CV.viewData;

            return(View());
        }