Exemple #1
0
 public static List<Account> GetAllAccountTree()
 {
     List<Account> result = new List<Account>();
     NewAppsCnn newAppsCnn = new NewAppsCnn(AppSettings.CrAppSettings.NewAppsConnectionString);
     var dbAccounts = from g in newAppsCnn.Acc_Accounts where g.AccountID != null || g.AccountID != "" select g;
     foreach (var dbAccount in dbAccounts)
     {
         Account account = new Account();
         account.FromDbAccount(dbAccount);
         result.Add(account);
     }
     return result;
 }
Exemple #2
0
 public static Account FindByAccountID(string _VaidationID)
 {
     NewAppsCnn newAppsCnn = new NewAppsCnn(AppSettings.CrAppSettings.NewAppsConnectionString);
     var dbAccounts = from u in newAppsCnn.Acc_Accounts where u.AccountID == _VaidationID select u;
     if (dbAccounts.Count() > 0)
     {
         Acc_Accounts dbAccount = dbAccounts.First();
         Account account = new Account();
         account.FromDbAccount(dbAccount);
         account.IsNew = false;
         account.IsCopy = false;
         return account;
     }
     else
         return null;
 }