public ApiAdapter(IDataBaseManagerFactory dbEngine, string address, string port, string table, string login, string password) { DbManager = new DatabaseManager(dbEngine, address, port, table, login, password); DbConnector = new DbConnector(DbManager); LanguageAdapter = new LanguageAdapter(DbConnector); UserAdapter = new UserAdapter(DbConnector); UserDetailsAdapter = new UserDetailsAdapter(DbConnector); TransactionTypeAdapter = new TransactionTypeAdapter(DbConnector); TransferTypeAdapter = new TransferTypeAdapter(DbConnector); FrequencyAdapter = new FrequencyAdapter(DbConnector); ImportanceAdapter = new ImportanceAdapter(DbConnector); TagAdapter = new TagAdapter(DbConnector); OperationAdapter = new OperationAdapter(DbConnector); OperationDetailsAdapter = new OperationDetailsAdapter(DbConnector); OperationTagRelationAdapter = new OperationTagAdapter(DbConnector); OperationsGroupAdapter = new OperationsGroupAdapter(DbConnector); OperationsGroupRelationAdapter = new OperationsGroupTagAdapter(DbConnector); FilterAdapter = new FilterAdapter(DbConnector); DashboardAdapter = new DashboardAdapter(DbConnector); DashboardFilterRelationAdapter = new DashboardFilterRelationAdapter(DbConnector); BankAdapter = new BankAdapter(DbConnector); SettingsAdapter = new SettingsAdapter(DbConnector); SchematicTypeAdapter = new SchematicTypeAdapter(DbConnector); SchematicAdapter = new SchematicAdapter(DbConnector); LanguageMapper = new LanguageMapper(); UserMapper = new UserMapper(); UserDetailsMapper = new UserDetailsMapper(); TransactionTypeMapper = new TransactionTypeMapper(); TransferTypeMapper = new TransferTypeMapper(); FrequencyMapper = new FrequencyMapper(); ImportanceMapper = new ImportanceMapper(); TagMapper = new TagMapper(); TagRelationMapper = new RelationTagMapper(); OperationMapper = new OperationMapper(); OperationsGroupMapper = new OperationsGroupMapper(); FilterMapper = new FilterMapper(); DashboardMapper = new DashboardMapper(); DashboardFilterMapper = new DashboardFilterMapper(); BankMapper = new BankMapper(); SettingsMapper = new SettingsMapper(); SchematicTypeMapper = new SchematicTypeMapper(); SchematicMapper = new SchematicMapper(); }
public static void SetService() { Settings = new Settings2(); var dataBaseData = ConfigurationManager.DataBaseData(); DbManager = new DatabaseManager(new MySqlConnectionFactory(), dataBaseData.Address, dataBaseData.Port, dataBaseData.Table, dataBaseData.Login, dataBaseData.Password); DbConnector = new DbConnector(DbManager); LanguageAdapter = new LanguageAdapter(DbConnector); UserAdapter = new UserAdapter(DbConnector); UserDetailsAdapter = new UserDetailsAdapter(DbConnector); TransactionTypeAdapter = new TransactionTypeAdapter(DbConnector); TransferTypeAdapter = new TransferTypeAdapter(DbConnector); FrequencyAdapter = new FrequencyAdapter(DbConnector); ImportanceAdapter = new ImportanceAdapter(DbConnector); TagAdapter = new TagAdapter(DbConnector); OperationAdapter = new OperationAdapter(DbConnector); OperationDetailsAdapter = new OperationDetailsAdapter(DbConnector); OperationTagRelationAdapter = new OperationTagAdapter(DbConnector); OperationsGroupAdapter = new OperationsGroupAdapter(DbConnector); OperationsGroupRelationAdapter = new OperationsGroupTagAdapter(DbConnector); LanguageMapper = new LanguageMapper(); UserMapper = new UserMapper(); UserDetailsMapper = new UserDetailsMapper(); TransactionTypeMapper = new TransactionTypeMapper(); TransferTypeMapper = new TransferTypeMapper(); FrequencyMapper = new FrequencyMapper(); ImportanceMapper = new ImportanceMapper(); TagMapper = new TagMapper(); OperationMapper = new OperationMapper(); OperationDetailsMapper = new OperationDetailsMapper(); RelationMapper = new RelationMapper(); OperationsGroupMapper = new OperationsGroupMapper(); OperationsGroupRelationMapper = new OperationsGroupRelationMapper(); SetMainConfigurations(); }
public ActionResult Index(BudgetModel BudgetTryingToAdd = null) { ViewBag.IsNotDashboard = true; BudgetAdapter budgetAdapter = new BudgetAdapter(); FrequencyAdapter frequencyAdapter = new FrequencyAdapter(); AccountTypeAdapter accountTypeAdapter = new AccountTypeAdapter(); BudgetModelList pageData = new BudgetModelList { Budgets = budgetAdapter.GetBudgetsByUID(Utilities.GetUsersUID(User.Identity.Name)), Categories = budgetAdapter.GetUniqueCategoryByUID(Utilities.GetUsersUID(User.Identity.Name)), Frequencies = frequencyAdapter.GetAllFrequencies(), AccountTypes = accountTypeAdapter.GetAccountTypesByUID(Utilities.GetUsersUID(User.Identity.Name)) }; if (BudgetTryingToAdd != null) { pageData.NewBudget = BudgetTryingToAdd; } return(View(pageData)); }
public List <ApiFrequency> GetFrequencies(ApiLanguage language) { return(FrequencyMapper.ConvertToApiEntitiesCollection(FrequencyAdapter.GetAll($"language_id={language.Id}")).ToList()); }
public static void LoadAttributes() { TransactionTypes = TransactionTypeMapper.ConvertToBusinessLogicEntitiesCollection(TransactionTypeAdapter.GetAll($"language_id={Language.Id}")).ToList(); TransferTypes = TransferTypeMapper.ConvertToBusinessLogicEntitiesCollection(TransferTypeAdapter.GetAll($"language_id={Language.Id}")).ToList(); Frequencies = FrequencyMapper.ConvertToBusinessLogicEntitiesCollection(FrequencyAdapter.GetAll($"language_id={Language.Id}")).ToList(); Importances = ImportanceMapper.ConvertToBusinessLogicEntitiesCollection(ImportanceAdapter.GetAll($"language_id={Language.Id}")).ToList(); Tags = TagMapper.ConvertToBusinessLogicEntitiesCollection(TagAdapter.GetAll($"language_id={Language.Id}")).ToList(); }