public async Task OnGetAsync()
        {
            if (PageIndex == 0)
            {
                PageIndex = 1;
            }

            // add param filterByName for filtering
            lamps = await ServiceMan.GetAsync(PageIndex, ItemPerPage, FilterByName);

            var totalLampu = ServiceMan.GetTotalData();

            TotalPage = (int)Math.Ceiling(totalLampu / (double)ItemPerPage);
        }
Example #2
0
        public async Task <ActionResult <List <LampuModel> > > GetFilterDataAsync([FromQuery] int pageIndex, int itemPerPage, string filterByName)
        {
            var data = await ServiceMan.GetAsync(pageIndex, itemPerPage, filterByName);

            return(Ok(data));
        }