Kind: Class
Source: Pams/Data/Pams.Data/PamsLinq5.designer.cs (line 166863)
Part of: Pams
Account is a C# data model representing an account record in the Pams data layer. It stores account identity, company ownership, currency, type, display names, VAT data, status, image path, and principal-account state.
Diagram
mermaidgraph LR Account["Account"] Account --> PrimaryID["PrimaryID: long"] Account --> CompanyID["CompanyID: Nullable<int>"] Account --> Currency["AccountCurrencyCode: string"] Account --> AccountTypeID["AccountTypeID: Nullable<int>"] Account --> Name["Name: string"] Account --> FullName["FullName: string"] Account --> Vat["Vat: string"] Account --> IsActive["IsActive: Nullable<bool>"] Account --> ImgPath["ImgPath: string"] Account --> IsPrincipal["IsPrincipal: bool"]
Usage
tstype Account = {
primaryID: number;
companyID: number | null;
accountCurrencyCode: string;
accountTypeID: number | null;
name: string;
fullName: string;
vat: string;
isActive: boolean | null;
imgPath: string;
isPrincipal: boolean;
};
async function getAccount(primaryID: number): Promise<Account> {
const response = await fetch(`/api/accounts/${primaryID}`);
if (!response.ok) {
throw new Error("Unable to load account");
}
return response.json();
}
const account = await getAccount(123);
if (account.isActive && account.isPrincipal) {
console.log(`Principal account: ${account.fullName}`);
}
AI Coding Instructions
- Treat
PrimaryIDas the account identifier when reading, updating, or linking account records. - Handle
CompanyID,AccountTypeID, andIsActiveas nullable values before using them in application logic. - Preserve
AccountCurrencyCodewhen creating integrations involving balances, invoices, or financial reporting. - Use
IsPrincipalto distinguish the primary account from other account records for the same company. - Keep API field naming consistent with the serialization settings used by the .NET application.
Relationships
- IMPORTS →
Person - IMPORTS →
Account - IMPORTS →
AddressBindingModel - IMPORTS →
ContactInfoBindingModel - IMPORTS →
ContactPersonBindingModel - IMPORTS →
CommentsView - IMPORTS →
Comments - IMPORTS →
City - IMPORTS →
Country
Used by
9 references from 9 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (9)
FilesController—Pams/API/Pams.API/Controllers/Common/FilesController.cs:27CompanyBranchController—Pams/API/Pams.API/Controllers/Organization/CompanyBranchController.cs:21Account—Pams/Data/Pams.Data/PamsLinq5.designer.cs:166863AccountViewModel—Pams/Logic/Pams.Business/BindingModels/Person/AccountsBindingModel.cs:6ReturnData—Pams/Logic/Pams.Business/Component/NewSales/SalesOfferLogic.cs:2637MeetingParticipantsBindingModel—Pams/Logic/Pams.Business/Component/Person/AccountsLogic.Logic.cs:2717EndUser—Pams/Logic/Pams.Business/Domain/Import/ImportDomain.cs:3891ContactPerson—Pams/Logic/Pams.Business/Entity/Common/ContactPerson.Model.cs:14
…and 1 more.
Was this page helpful?