예제 #1
0
        public Delivery(string deliveryId, PROLog.LogFile logFile)
        {
            this.deliveryId = deliveryId;
            this.logFile    = logFile;

            isCompleted = false;
            state       = States.Niezdefiniowany;
        }
예제 #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);
            }
        }
예제 #3
0
        public App()
        {
            try
            {
                logFile = new PROLog.LogFile(Properties.Settings.Default.LogFilePath);
                logFile.Write("Stworzono obiekt logFile");
            }
            catch (Exception e)
            {
                throw new Exception("Krytyczny błąd!" + e.Message);
            }

            try
            {
                logEvent = new PROLog.LogEvent(Properties.Settings.Default.SourceEventName, Properties.Settings.Default.LogEventName);
                logFile.Write("Stworzono obiekt logEvent");
            }
            catch (Exception e)
            {
                logFile.Write(e.Message);
                throw new Exception("Krytyczny błąd!" + e.Message);
            }
        }