# ContactPersonController

**Kind:** Controller

**Source:** `Pams/API/Pams.API/Controllers/Common/ContactPersonController.cs` (line 17)

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

## Where it refuses work

- `ContactPersonController` stops the work with an early return when `!isAllowed`, in 3 places.
- `ContactPersonController` stops the work with an early return when `!model.RelatedToID.HasValue || !model.ContactPersonRelatedTypeID.HasValue`.
- `ContactPersonController` stops the work with an early return when `isExsist`.
- `ContactPersonController` stops the work with an early return when `checkForDublicate`.
- `ContactPersonController` stops the work with an early return when `isSaved != Business.Entity.EnumNewSales.EnumReturnMessage.SavedSuccessfuly`.
- `ContactPersonController` stops the work with an early return when `!ModelState.IsValid`.

## When something fails

- `ContactPersonController` handles failure in 4 places: it turns it into a return value in all 4.

## Relationships

- MODULE_DECLARES → `GetByRelatedToId`
- MODULE_DECLARES → `GetAll`
- MODULE_DECLARES → `GetAllLGsFunnel`
- MODULE_DECLARES → `GetAllByProjectId`
- MODULE_DECLARES → `GetContactsByJobId`
- MODULE_DECLARES → `GetContactsLookup`
- MODULE_DECLARES → `AddContactToJob`
- MODULE_DECLARES → `AddContactToProject`
- MODULE_DECLARES → `RemoveContactFromInquiry`
- MODULE_DECLARES → `RemoveContactFromProject`
- MODULE_DECLARES → `GetByID`
- MODULE_DECLARES → `Insert`
- MODULE_DECLARES → `Update`
- MODULE_DECLARES → `Save`
- MODULE_DECLARES → `GetContactByName`
- MODULE_DECLARES → `Delete`
- MODULE_DECLARES → `GetLookupAllByCompanyId`
- IMPORTS → `ContactPerson`
- IMPORTS → `BaseController`
- IMPORTS → `GetByRelatedToId`
- IMPORTS → `GetByRelatedToId`
- IMPORTS → `ContactPersonBindingModel`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `GetAll`
- IMPORTS → `ContactInfoBindingModel`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `GetByID`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Insert`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Update`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `DeleteDto`

## Used by

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

### calls by (5)

- `Contact` — `Outlook_plugin/src/contacts/contact.service.ts`:1
- `ContactPersonService` — `Pams/Web/Pams.WebApp/Client/app/services/common/contact-person.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
- `AppSettings` — `Pams/Web/Pams.WebApp/Client/app/settings/app/app.settings.ts`:6
