コード例 #1
0
        private void SearchAutoSuggestBox_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
        {
            var          SearchItem = SearchAutoSuggestBox.Text.Trim();
            SearchEvents dbevents   = new SearchEvents();

            //Db_EventList = dbevents.SearchAllEvent(SearchItem);
            if (Db_EventList.Count > 0)
            {
                EventoListView.ItemsSource = Db_EventList.OrderByDescending(i => i.Id).ToList();
            }
            else
            {
                EventoListView.ItemsSource = null;
            }
        }
コード例 #2
0
ファイル: EventsController.cs プロジェクト: chipdlk/THD
        public IActionResult Index([FromQuery] SearchEvents dto)
        {
            int         TotalItems     = 0;
            string      ControllerName = this.ControllerContext.RouteData.Values["controller"].ToString();
            EventsModel data           = new EventsModel()
            {
                SearchData = dto
            };

            data.ListItems = EventsService.GetListPagination(data.SearchData, API.Models.Settings.SecretId + ControllerName);
            if (data.ListItems != null && data.ListItems.Count() > 0)
            {
                TotalItems = data.ListItems[0].TotalRows;
            }
            data.Pagination = new Models.Partial.PartialPagination()
            {
                CurrentPage = data.SearchData.CurrentPage, ItemsPerPage = data.SearchData.ItemsPerPage, TotalItems = TotalItems, QueryString = Request.QueryString.ToString()
            };
            return(View(data));
        }