コード例 #1
0
        public DataModule(Logger _logger)
        {
            logger = _logger;

            sql = new PROSql.SQL(Properties.Settings.Default.SQLServerName,
                                 Properties.Settings.Default.SQLDatabase,
                                 Properties.Settings.Default.SQLUsername,
                                 Properties.Settings.Default.SQLPassword,
                                 Properties.Settings.Default.SQLNT);
        }
コード例 #2
0
        public DataModule(PROLog.LogFile logFile)
        {
            this.logFile = logFile;
            try
            {
                optima = new PROOptima.Optima(Properties.Settings.Default.OptimaPath, true);
                logFile.Write("Stworzono obiekt AppOptima");

                sql = new PROSql.SQL(Properties.Settings.Default.SQLServerName,
                                     Properties.Settings.Default.SQLDatabase,
                                     Properties.Settings.Default.SQLUsername,
                                     Properties.Settings.Default.SQLPassword,
                                     Properties.Settings.Default.SQLNT);
                logFile.Write("Stworzono obiekt AppSQL");
            }
            catch (Exception e)
            {
                optima = null;
                sql    = null;
                throw new Exception(e.Message);
            }
        }