Ejemplo n.º 1
0
 public void TestFixtureSetUp()
 {
     TechnicalSettings.CheckSettings();
     TechnicalSettings.UseOnlineMode = false;
     _serverName       = TechnicalSettings.DatabaseServerName;
     _databaseName     = TechnicalSettings.DatabaseName;
     _databaseLogin    = TechnicalSettings.DatabaseLoginName;
     _databasePassword = TechnicalSettings.DatabasePassword;
 }
Ejemplo n.º 2
0
 private static void _ParseApplicationSettings(IEnumerable <string> pArgs)
 {
     foreach (String arg in pArgs)
     {
         if (arg == PARAM_ONLINE_MODE)
         {
             TechnicalSettings.UseOnlineMode = true;
         }
         if (arg == PARAM_HELP)
         {
             MessageBox.Show(HELP, @"OMFS " + TechnicalSettings.SoftwareVersion, MessageBoxButtons.OK, MessageBoxIcon.Information);
             Environment.Exit(1);
         }
         else if (arg.StartsWith(PARAM_DATE))
         {
             TimeProvider.SetToday(DateTime.Parse(arg.Substring(PARAM_DATE.Length)));
         }
         else if (arg.StartsWith(PARAM_USER))
         {
             _user = arg.Substring(PARAM_USER.Length);
         }
         else if (arg.StartsWith(PARAM_PASSWORD))
         {
             _password = arg.Substring(PARAM_PASSWORD.Length);
         }
         else if (arg.StartsWith(PARAM_DATABASE))
         {
             TechnicalSettings.CheckSettings();
             ServicesProvider.GetInstance().GetDatabaseServices().SaveDatabaseDiagramsInXml(false, TechnicalSettings.DatabaseName);
             Environment.Exit(1);
         }
         else if (arg == PARAM_USER_SETTINGS)
         {
             TechnicalSettings.CheckSettings();
             Form frm = new FrmUserSettings();
             frm.ShowDialog();
             Environment.Exit(1);
         }
         else if (arg == PARAM_SETUP)
         {
             TechnicalSettings.CheckSettings();
             Form frm = new FrmDatabaseSettings(FrmDatabaseSettingsEnum.SqlServerConnection, true, true);
             frm.ShowDialog();
             Environment.Exit(1);
         }
         else if (arg == PARAM_DUMP_OBJECTS)
         {
             TechnicalSettings.CheckSettings();
             ServicesProvider.GetInstance().GetDatabaseServices().DumpObjects(TechnicalSettings.DatabaseName);
             Environment.Exit(1);
         }
         else if (arg == "--skip-schema-check")
         {
             _skipSchemaCheck = true;
         }
     }
 }
Ejemplo n.º 3
0
        private void _CheckTechnicalSettings()
        {
            Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(UserSettings.Language);
            bWOneToSeven.ReportProgress(1, MultiLanguageStrings.GetString(Ressource.FrmSplash, "CheckTechnicalSettings.Text"));
            if (!TechnicalSettings.CheckSettings())
            {
                _LoadDatabaseSettingsForm(FrmDatabaseSettingsEnum.SqlServerConnection);
            }

            _settingsAreOk = true;
        }
Ejemplo n.º 4
0
        public void InitManager()
        {
            TechnicalSettings.CheckSettings();

            LoanProductManager           loanProductManager           = new LoanProductManager(DataUtil.TESTDB);
            AccountingTransactionManager accountingTransactionManager = new AccountingTransactionManager(DataUtil.TESTDB);
            EventManager            eventManager            = new EventManager(DataUtil.TESTDB);
            ExchangeRateManager     exchangeRateManager     = new ExchangeRateManager(DataUtil.TESTDB);
            ProvisioningRuleManager provisioningRuleManager = new ProvisioningRuleManager(DataUtil.TESTDB);
            AccountManager          accountManager          = new AccountManager(DataUtil.TESTDB);
            InstallmentTypeManager  installmentTypeManager  = new InstallmentTypeManager(DataUtil.TESTDB);
            UserManager             userManager             = new UserManager(DataUtil.TESTDB);
            EconomicActivityManager economicActivityManager = new EconomicActivityManager(DataUtil.TESTDB);
            InstallmentManager      installmentManager      = new InstallmentManager(DataUtil.TESTDB);
            FundingLineManager      fundingLineManager      = new FundingLineManager(DataUtil.TESTDB);
            ClientManager           clientManager           = new ClientManager(DataUtil.TESTDB);
            LocationsManager        locationsManager        = new LocationsManager(DataUtil.TESTDB);
            LoanManager             loanManager             = new LoanManager(DataUtil.TESTDB);
            ProjectManager          projectManager          = new ProjectManager(DataUtil.TESTDB);
            MFIManager            mfiManager            = new MFIManager(DataUtil.TESTDB);
            SavingManager         savingManager         = new SavingManager(DataUtil.TESTDB);
            SavingProductManager  savingProductManager  = new SavingProductManager(DataUtil.TESTDB);
            SavingEventManager    savingEventManager    = new SavingEventManager(DataUtil.TESTDB);
            CurrencyManager       currencyManager       = new CurrencyManager(DataUtil.TESTDB);
            AccountingRuleManager accountingRuleManager = new AccountingRuleManager(DataUtil.TESTDB);
            FundingLineServices   fundingLineServices   = new FundingLineServices(DataUtil.TESTDB);

            container = new Hashtable
            {
                { "LoanProductManager", loanProductManager },
                { "AccountingTransactionManager", accountingTransactionManager },
                { "EventManager", eventManager },
                { "ExchangeRateManager", exchangeRateManager },
                { "ProvisioningRuleManager", provisioningRuleManager },
                { "AccountManager", accountManager },
                { "InstallmentTypeManager", installmentTypeManager },
                { "UserManager", userManager },
                { "FundingLineManager", fundingLineManager },
                { "LoanManager", loanManager },
                { "ClientManager", clientManager },
                { "LocationsManager", locationsManager },
                { "ProjectManager", projectManager },
                { "EconomicActivityManager", economicActivityManager },
                { "InstallmentManager", installmentManager },
                { "MFIManager", mfiManager },
                { "SavingManager", savingManager },
                { "SavingProductManager", savingProductManager },
                { "SavingEventManager", savingEventManager },
                { "CurrencyManager", currencyManager },
                { "FundingLineServices", fundingLineServices },
                { "AccountingRuleManager", accountingRuleManager }
            };
        }