예제 #1
0
 public ChartOfAccount(ChartOfAccount chartOfAccount)
 {
     if (chartOfAccount == null)
     {
         throw new ArgumentNullException(nameof(chartOfAccount));
     }
     ChartOfAccountId = chartOfAccount.ChartOfAccountId;
     CompanyId        = chartOfAccount.CompanyId;
     AccountNo        = chartOfAccount.AccountNo;
     AccountType      = chartOfAccount.AccountType;
     AccountName      = chartOfAccount.AccountName;
     BalanceType      = chartOfAccount.BalanceType;
     BankAccountFlag  = chartOfAccount.BankAccountFlag;
 }
예제 #2
0
        public void SetChartOfAccount(ChartOfAccount chartOfAccount)
        {
            if (chartOfAccount == null)
            {
                throw new ArgumentNullException(nameof(chartOfAccount));
            }
            var existingAccount = GLAccounts.FirstOrDefault(a => a.AccountNo == chartOfAccount.AccountNo);

            if (existingAccount != null)
            {
                GLAccounts.Remove(existingAccount);
            }
            GLAccounts.Add(chartOfAccount);
        }