# EmployeeController

**Kind:** Controller

**Source:** `Pams/API/Pams.API/Controllers/Person/EmployeeController.cs` (line 29)

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

## Where it refuses work

- `EmployeeController` stops the work with an early return when `CheckForPersonDublicate`, in 2 places.
- `EmployeeController` stops the work with an early return when `!p.Save()`, in 2 places.
- `EmployeeController` stops the work with an early return when `!c.Save()`, in 2 places.
- `EmployeeController` stops the work with an early return when `!address.Save()`, in 2 places.
- `EmployeeController` stops the work with an early return when `!contactinfo.Save()`, in 2 places.
- `EmployeeController` stops the work with an early return when `!entity.Delete()`.

## When something fails

- `EmployeeController` handles failure in 28 places: it turns it into a return value in 27, and logs it and continues in 1.

## Relationships

- MODULE_DECLARES → `GetForDisplay`
- MODULE_DECLARES → `Get`
- MODULE_DECLARES → `UploadBranchImage`
- MODULE_DECLARES → `Save`
- MODULE_DECLARES → `insert`
- MODULE_DECLARES → `update`
- MODULE_DECLARES → `delete`
- MODULE_DECLARES → `delete`
- MODULE_DECLARES → `CopyTo`
- MODULE_DECLARES → `GetDataToBeExported`
- MODULE_DECLARES → `GetSheet`
- MODULE_DECLARES → `import`
- IMPORTS → `Person`
- IMPORTS → `BaseController`
- IMPORTS → `GetAll`
- IMPORTS → `Employee`
- IMPORTS → `EmployeeBindingModel`
- IMPORTS → `GetForDisplay`
- IMPORTS → `EmployeesViewModel`
- IMPORTS → `Gender`
- IMPORTS → `Nationality`
- IMPORTS → `EmployeesViewModelPlusCount`
- IMPORTS → `PersonBindingModel`
- IMPORTS → `Client`
- IMPORTS → `ClientBindingModel`
- IMPORTS → `UploadBranchImage`
- IMPORTS → `CacheClearFilter`
- IMPORTS → `Address`
- IMPORTS → `ContactInfo`
- IMPORTS → `ContactInfoRelatedType`
- IMPORTS → `MaritalStatus`
- IMPORTS → `Country`
- IMPORTS → `CompanyBranchDepartment`
- IMPORTS → `EmployeeImportModel`
- IMPORTS → `LookUpImportModel`
- IMPORTS → `PostedFile`
- IMPORTS → `PersonRelatedProperties`
- IMPORTS → `CompanyBranch`
- IMPORTS → `ImportXMLError`
- IMPORTS → `PersonEmail`
- IMPORTS → `PersonPhone`
- IMPORTS → `City`
- IMPORTS → `PersonAddress`

## Used by

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

### calls by (3)

- `EmployeeService` — `Frontend/src/app/services/person/employee.service.ts`:1
- `EmployeeService` — `Pams/Web/Pams.Web/Client/app/services/person/employee.service.ts`:1
- `EmployeeService` — `Pams/Web/Pams.WebApp/Client/app/services/person/employee.service.ts`:1
