private IPagedList <BannerAndLink> SearchBanner(BannerListViewModel model)
        {
            IPagedList <BannerAndLink> list = db.bannerAndLink
                                              .Where(x => x.type == BannerAndLink.TYPE_BANNER)
                                              .OrderByDescending(x => x.createDate)
                                              .ToPagedList(model.pageNumber - 1, model.pageSize);

            return(list);
        }
        // 首頁banner
        public ActionResult BannerList(int?page, string qry, string sort, string disable, string pDate)
        {
            BannerListViewModel model = new BannerListViewModel();

            model.Filter.CurrentPage = page ?? 1;
            model.Filter.QueryString = qry ?? string.Empty;
            model.Filter.SortColumn  = sort ?? string.Empty;
            model.Filter.Disable     = disable ?? string.Empty;
            model.Filter.PublishDate = pDate;

            using (BannerModule module = new BannerModule())
            {
                model.Result = module.DoGetList(model.Filter);
            }

            return(View(model));
        }