public IActionResult List() { try { string funcId = PermissionEnum.CodeFormat((int)PermissionEnum.扩展管理.广告管理.列表); if (!IsPermission(funcId)) { return(ToPermission(funcId)); } string startTime = GetQueryString("datemin"); string endTime = GetQueryString("datemax"); string state = GetQueryString("state"); string keyword = GetQueryString("keyword"); ViewData["DateMin"] = startTime; ViewData["DateMax"] = endTime; ViewData["State"] = state; ViewData["Keyword"] = keyword; int total = 100; List <Extend_Advertisement> lists = new List <Extend_Advertisement>(); string strKeyword = string.Format("{0}{1}", startTime, keyword); if (string.IsNullOrWhiteSpace(strKeyword)) { lists = AdvertisementService.GetAdvertisementTop(SystemID, CompanyID, total); } else { lists = AdvertisementService.SearchAdvertisement(SystemID, CompanyID, startTime, endTime, state, keyword, total); } ViewData["Count"] = AdvertisementService.CountAdvertisement(SystemID, CompanyID); return(View(lists)); } catch (Exception ex) { return(ToError(ex.Message)); } }