public IActionResult Paging(CustomsDeclarationCriteria criteria, int pageNumber, int pageSize)
        {
            var data   = customsDeclarationService.Paging(criteria, pageNumber, pageSize, out int totalItems);
            var result = new { data, totalItems, pageNumber, pageSize };

            return(Ok(result));
        }
        public async Task <IActionResult> ExportCustomClearance(CustomsDeclarationCriteria customsDeclarationCriteria)
        {
            Helper helper          = new Helper();
            var    responseFromApi = await HttpServiceExtension.GetDataFromApi(customsDeclarationCriteria, aPis.HostStaging + Urls.CustomClearance.CustomClearanceUrl);

            var dataObjects = responseFromApi.Content.ReadAsAsync <List <CustomsDeclaration> >();  //Make sure to add a reference to System.Net.Http.Formatting.dll

            var stream = helper.CreateCustomClearanceExcelFile(dataObjects.Result);

            return(new FileHelper().ExportExcel(stream, FilesNames.CustomClearanceName));
        }
        public IActionResult Query(CustomsDeclarationCriteria criteria)
        {
            var data = customsDeclarationService.Query(criteria);

            return(Ok(data));
        }