static public void Preload() { try { EmpiriaLog.Info($"Application preloading starts at {DateTime.Now}."); StandardAccount.Preload(); AccountsChart.Preload(); SubsidiaryLedger.Preload(); SubsidiaryAccount.Preload(); EmpiriaLog.Info($"Application preloading ends at {DateTime.Now}."); } catch (Exception e) { EmpiriaLog.Error(e); } }
public StandardAccount GetParent() { if (!this.HasParent) { return(StandardAccount.Empty); } var accountNumberSeparator = this.AccountsChart.MasterData.AccountNumberSeparator; var parentAccountNumber = this.Number.Substring(0, this.Number.LastIndexOf(accountNumberSeparator)); var parent = AccountsChart.GetAccount(parentAccountNumber); return(StandardAccount.Parse(parent.StandardAccountId)); }