Esempio n. 1
0
 public AccountGroup GetAccountGroup(int accountId)
 {
     try
     {
         var accounts = accountsList.GetItems();
         var groups   = accountGroupsList.GetItems();
         return((from account in accounts
                 where account.ID == accountId
                 from gr in groups.Where(gr => gr.Code == account.Group)
                 select gr).FirstOrDefault());
     }
     catch (Exception ex)
     {
         Logger.ErrorFormat("Ошибка в GetAccountGroup (userLogin={0}): {1}", accountId, ex);
         return(null);
     }
 }
Esempio n. 2
0
 public List <PlatformUser> GetAllPlatformUsers()
 {
     return(userList.GetItems().Select(u => new PlatformUser
     {
         Login = u.Login,
         Name = u.Name,
         Patronym = u.Patronym,
         Description = u.Description,
         Surname = u.Surname,
         ID = u.ID,
         Title = u.Title,
         RegistrationDate = u.RegistrationDate
     }).ToList());
 }
 public List <TradeTicker> GetTickers(out long lotByGroupHash)
 {
     try
     {
         UpdateLotByGroup();
         lotByGroupHash = lotByGroup.calculatedHashCode;
         return(tickersList.GetItems());
     }
     catch (Exception ex)
     {
         Logger.Error("Ошибка в TradingContractDictionary.GetTickers()", ex);
         lotByGroupHash = 0;
         return(new List <TradeTicker>());
     }
 }
Esempio n. 4
0
 public List <GroupMarkup> GetMarkupByGroup()
 {
     return(groupMarkupList.GetItems());
 }