public PredefinedCurrency GetCurrecny(int currencyId) { setLanguage(); PredefinedGuidesContent predefinedGuidesContent = GetPredefinedGuidesContent(); var viewModel = predefinedGuidesContent.Currencies.FirstOrDefault(e => e.Id == currencyId); return(viewModel); }
public List <PredefinedAccount> GetGuideAccounts(int guideId) { setLanguage(); PredefinedGuidesContent predefinedGuidesContent = GetPredefinedGuidesContent(); var viewModels = predefinedGuidesContent.AccountGuides.FirstOrDefault(e => (int)e.Id == guideId).Accounts; return(viewModels); }
public PredefinedGuideService( IFileManager fileManager, ILanguageManager languageManager ) { _fileManager = fileManager; _predefinedGuidesContent = GetPredefinedGuidesContent(); _languageManager = languageManager; _language = _languageManager.GetLang(); }
public List <AccountGuideViewModel> GetAccountGuides() { setLanguage(); PredefinedGuidesContent predefinedGuidesContent = GetPredefinedGuidesContent(); var viewModels = predefinedGuidesContent.AccountGuides.OrderBy(a => a.Order).Select(e => new AccountGuideViewModel { Id = (int)e.Id, Name = e.GetName(_language) }).ToList(); return(viewModels); }
public List <CurrencyViewModel> GetCurrencies() { setLanguage(); PredefinedGuidesContent predefinedGuidesContent = GetPredefinedGuidesContent(); var viewModels = predefinedGuidesContent.Currencies.ToList().OrderBy(a => a.Order) .Select(e => new CurrencyViewModel { Id = e.Id, Code = e.Code, Name = e.GetName(_language), ISOCode = e.ISOCode, PartName = e.GetPartName(_language), PartRate = e.PartRate }).ToList(); return(viewModels); }