×

Topal Server Data

 
Getting Data from the Topal Server
The Topal System uses only one Database for all clients. Therefore, after a connection to the Topal Server with a valid userid and password has
been established, a client list must be retrieved in order to find all available clients in the database, or a known client can be set directly.
Define the chosen client as current client and set the associated fiscal year for that particular client. In most cases, the ID properties will
be used to identify instances of any entities.
 
There exist various entities to retrieve data from Topal Server. All of those entities work the same way as described in the Client list exapmple.
Below you find a list of available entities:
 
  • LoadBanks()
  • LoadBankAccounts()
  • LoadVATCodes()
  • LoadParties()
  • LoadTransactions()
  • LoadInvoices()
  • etc.
 
Example Code
 
Client list selection
The LoadGlobalClients() methods refreshes the client list of the Topal Manager Instance.
After a successful method call, use the Clients properties of the manager object to access the clients list.
In the following example, we open a message box that shows all the clients that are available for the connected user.
 
Client list
    
public void LoadClients() 
{
    IManager manager = new Manager();

    int errorcode = manager.LoadGlobalClients(); 	
    // Add error handling here

    string clientsString = string.Empty; 	
    foreach (IClient client in manager.Clients) {
         clientsString += client.ID + “-“ + client.Name + “\n”; 
    }	
}
    
  
Client list
    
UNDER CONSTRUCTION
    
  
 
User defaults
There are several properties, which show the default values of the current user:
 
  • IClient Client;
  • IFiscalYear FiscalYear;
  • IVATPeriod VatPeriod;
  • etc.
 
The default client, fiscal year and VAT period of the connected user will be obtained, by using these interfaces.
Default always means "current" in this context. By using the ID of a client, after the client, fiscal year and VAT period selection,
more detailed information via default properties, can be retrieved. The following example displays a message box with the
default (current) client name.
 
Defaults
    
public void LoadClients() 
{
    IManager manager = new Manager();

    foreach (IClient client in manager.Clients) { 	
        
       if (client.ID == manager.Client.ID) 	{
            MessageBox.Show(“default client name:” + client.Name); 	
       }
    }
}
    
  
Defaults
    
UNDER CONSTRUCTION