Skip to content

Account

reference
1 min readUpdated

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

mermaid
graph 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

ts
type 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 PrimaryID as the account identifier when reading, updating, or linking account records.
  • Handle CompanyID, AccountTypeID, and IsActive as nullable values before using them in application logic.
  • Preserve AccountCurrencyCode when creating integrations involving balances, invoices, or financial reporting.
  • Use IsPrincipal to 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)

  • FilesControllerPams/API/Pams.API/Controllers/Common/FilesController.cs:27
  • CompanyBranchControllerPams/API/Pams.API/Controllers/Organization/CompanyBranchController.cs:21
  • AccountPams/Data/Pams.Data/PamsLinq5.designer.cs:166863
  • AccountViewModelPams/Logic/Pams.Business/BindingModels/Person/AccountsBindingModel.cs:6
  • ReturnDataPams/Logic/Pams.Business/Component/NewSales/SalesOfferLogic.cs:2637
  • MeetingParticipantsBindingModelPams/Logic/Pams.Business/Component/Person/AccountsLogic.Logic.cs:2717
  • EndUserPams/Logic/Pams.Business/Domain/Import/ImportDomain.cs:3891
  • ContactPersonPams/Logic/Pams.Business/Entity/Common/ContactPerson.Model.cs:14

…and 1 more.

Was this page helpful?

Download as PDF