C# Класс Sage.Integration.Northwind.Application.Entities.Account.Account

The AccountEntity presents an account object of the application in the integration space. The entity supports: - GetDocument, GetDocumentTemplate - Insert, Update and Delete verb (to support execute transcation) - FillChangeLog and FillAll (to Support getChangelog and getAll)
Наследование: Sage.Integration.Northwind.Application.Base.EntityBase
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Account ( ) : System

Constructor. The method initializes the base class.

Add ( Document doc, NorthwindConfig config, List &result ) : void

The Add verb inserts an account and all subentities in the underlying data-store. On success, the identity of the newly inserted instances will added to the document and all subdocuments.

Delete ( Document doc, NorthwindConfig config, List &result ) : void

The Delete verb deletes existing account and all subentities in the underlying data-store. Should no account instance be found in the data-store that matches the id of the document, the transaction result will set accordingly.

FillChangeLog ( DataTable &table, NorthwindConfig config, Token lastToken ) : int

fill up a datatable with the next 11 id's of inserted, modified and deleted accounts since the given token.

GetAll ( NorthwindConfig config, string whereExpression, System.Data.OleDb.OleDbParameter oleDbParameters ) : List
GetAll ( NorthwindConfig config, string whereExpression, int startIndex, int count ) : List
GetDocument ( Identity identity, Token lastToken, NorthwindConfig config ) : Document

The GetDocument verb retuns an complete AccountDocument containing the data associated with an existing account instance. Should no account instance be found in the data-store that matches the identity passed as a parameter it will return an empty account document marked as deleted within the given identity.

Update ( Document doc, NorthwindConfig config, List &result ) : void

The Update verb ammends an existing account and all subentities (Person, Email, Address, Phone) in the underlying data-store. The data as it should be stored is found in the parameter document. Should no account instance be found in the data-store that matches the id of the document, the transaction result will set accordingly.

Приватные методы

Метод Описание
GetDocument ( AccountDataset row, Token lastToken, NorthwindConfig config ) : AccountDocument
GetDocument ( string accountId, NorthwindConfig config ) : Document

returns a complete account document without using a token

GetEmailsCollectionFromCustomer ( Emails emails, DeleteHistoryDataset history, Token lastToken, string crmUser ) : EmailsDocumentCollection
GetEmailsCollectionFromCustomer ( string customerId, Token lastToken, NorthwindConfig config ) : EmailsDocumentCollection
GetNewCustomerID ( string customerName, NorthwindConfig config ) : string
GetRow ( AccountDocument accDoc, NorthwindConfig config, bool newAccount ) : AccountDataset.AccountsRow

get a northwind account row, which is a union of customers and suppliers, from the given account document and set the transaction status on the documents

SetIdentitiesForAccounts ( string accountID, AccountDocument account ) : void

ste the Identies of the account sub entities address, phone and person

StoreCustomer ( AccountDocument accDoc, AccountDataset accountRow, NorthwindConfig config, List &result ) : void

StoreSupplier ( AccountDocument accDoc, AccountDataset accountRow, NorthwindConfig config, List &result ) : void
UpdateEmailsCollectionFromCustomer ( string customerId, EmailsDocumentCollection emailCollection, NorthwindConfig config, List &result ) : void

Описание методов

Account() публичный Метод

Constructor. The method initializes the base class.
public Account ( ) : System
Результат System

Add() публичный Метод

The Add verb inserts an account and all subentities in the underlying data-store. On success, the identity of the newly inserted instances will added to the document and all subdocuments.
public Add ( Document doc, NorthwindConfig config, List &result ) : void
doc Sage.Integration.Northwind.Application.Base.Document Document (without ID) containing the data to be stored
config NorthwindConfig The configuration object
result List
Результат void

Delete() публичный Метод

The Delete verb deletes existing account and all subentities in the underlying data-store. Should no account instance be found in the data-store that matches the id of the document, the transaction result will set accordingly.
public Delete ( Document doc, NorthwindConfig config, List &result ) : void
doc Sage.Integration.Northwind.Application.Base.Document Document (incl. ID) containing the data to be stored
config NorthwindConfig The configuration object
result List
Результат void

FillChangeLog() публичный Метод

fill up a datatable with the next 11 id's of inserted, modified and deleted accounts since the given token.
public FillChangeLog ( DataTable &table, NorthwindConfig config, Token lastToken ) : int
table System.Data.DataTable tha DataTable to filled up. The first column contains the identity
config NorthwindConfig The configuration object
lastToken Sage.Integration.Northwind.Application.API.Token the last token
Результат int

GetAll() публичный Метод

public GetAll ( NorthwindConfig config, string whereExpression, System.Data.OleDb.OleDbParameter oleDbParameters ) : List
config NorthwindConfig
whereExpression string
oleDbParameters System.Data.OleDb.OleDbParameter
Результат List

GetAll() публичный Метод

public GetAll ( NorthwindConfig config, string whereExpression, int startIndex, int count ) : List
config NorthwindConfig
whereExpression string
startIndex int
count int
Результат List

GetDocument() публичный Метод

The GetDocument verb retuns an complete AccountDocument containing the data associated with an existing account instance. Should no account instance be found in the data-store that matches the identity passed as a parameter it will return an empty account document marked as deleted within the given identity.
public GetDocument ( Identity identity, Token lastToken, NorthwindConfig config ) : Document
identity Identity Identity of the account
lastToken Sage.Integration.Northwind.Application.API.Token the last given Token to mark the account status as updated or created
config NorthwindConfig The configuration object
Результат Sage.Integration.Northwind.Application.Base.Document

Update() публичный Метод

The Update verb ammends an existing account and all subentities (Person, Email, Address, Phone) in the underlying data-store. The data as it should be stored is found in the parameter document. Should no account instance be found in the data-store that matches the id of the document, the transaction result will set accordingly.
public Update ( Document doc, NorthwindConfig config, List &result ) : void
doc Sage.Integration.Northwind.Application.Base.Document Document (incl. ID) containing the data to be stored
config NorthwindConfig The configuration object
result List
Результат void