# ImportController

**Kind:** Controller

**Source:** `Pams/API/Pams.API/Controllers/Import/ImportController.cs` (line 19)

**Part of:** [Pams](subsystem-pams)

## Where it refuses work

- `ImportController` stops the work with an early return when `httpRequest.Files.Count == 0`, in 8 places.
- `ImportController` stops the work with an early return when `msg.Length > 0`, in 4 places.

## When something fails

- `ImportController` handles failure in 2 places: it turns it into a return value in all 2.

## Relationships

- MODULE_DECLARES → `ImportFile`
- MODULE_DECLARES → `ImportFileWithReplacement`
- MODULE_DECLARES → `ImportSalesItemsToInquiry`
- MODULE_DECLARES → `ImportSalesItemsToOffer`
- MODULE_DECLARES → `ImportSalesItemsToOrder`
- MODULE_DECLARES → `ImportPurchaseItemsToInquiry`
- MODULE_DECLARES → `ImportPurchaseItemsToOffer`
- MODULE_DECLARES → `ImportpurchaseItemsToOrder`
- MODULE_DECLARES → `RefreshData`
- MODULE_DECLARES → `ImportRefList`
- IMPORTS → `BaseController`

## Used by

4 references from 4 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### calls by (4)

- `ImportDataService` — `Frontend/src/app/services/shared/import-data.service.ts`:1
- `ImportDataService` — `Pams/Web/Pams.Web/Client/app/services/shared/import-data.service.ts`:1
- `AppSettings` — `Frontend/src/app/settings/app/app.settings.ts`:241
- `AppSettings` — `Pams/Web/Pams.Web/Client/app/settings/app/app.settings.ts`:126
