Esempio n. 1
0
        public async Task <IActionResult> GetPageData(Int64 pScreenId, Int64 pUserId, Int64 pRecordsPerPage,
                                                      Int64 pPageNo, Int64 pTableId, Boolean pLastPage)
        {
            SQLResult resultValidation = new SQLResult();

            resultValidation = Functions.ValidateGetPageData(pScreenId, pUserId, pRecordsPerPage, pPageNo, pTableId, pLastPage);
            if (resultValidation.ErrorNo > 0)
            {
                return(BadRequest(resultValidation.ErrorMessage));
            }
            try
            {
                List <CityIndex> result = new List <CityIndex>();

                result = await _repo.GetIndex(pScreenId, pUserId, pRecordsPerPage, pPageNo, pTableId, pLastPage);

                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message.ToString()));
            }
        }