Beispiel #1
0
        private void GetCallDirection_Click(object sender, EventArgs e)
        {
            MAFDbMgr db = new MAFDbMgr();
            string   cc = "8";
            string   c  = db.GetCallDirection(cc);

            Console.WriteLine("TheCallDirectionIs: " + c);
        }
Beispiel #2
0
        public void StartProcessing()
        {
            this.CreateEventLog();
            m_dbMgr = new MAFDbMgr();
            m_rdr   = new MAFFileReader();

            // the the path where to move processed files
            m_filemovePath = ConfigurationManager.AppSettings["ProcessedFileFolder"];
            string watchFolder = System.String.Empty;

            // get the time to sleep between failed file open operations
            m_ProcessThreadIntervalInMSecs = 1000 * Convert.ToInt32(ConfigurationManager.AppSettings["ProcessThreadIntervalInSecs"]);

            try
            {
                // create the Watcher for file type in the watchfolder; config params
                watchFolder = ConfigurationManager.AppSettings["WatchFolder"];
                string            fileType  = ConfigurationManager.AppSettings["WatchFileType"];
                FileSystemWatcher WatchFile = new FileSystemWatcher(watchFolder, fileType);

                // Watch for changes in LastAccess and LastWrite times
                WatchFile.NotifyFilter = NotifyFilters.CreationTime | NotifyFilters.LastAccess | NotifyFilters.LastWrite;
                WatchFile.Created     += new FileSystemEventHandler(this.ProcessFileWatcher);

                // added this on 11/02
                WatchFile.Changed += new FileSystemEventHandler(this.ProcessFileWatcher);

                WatchFile.EnableRaisingEvents = true;
                //EventLog.WriteEntry(m_eventLogName, "Watching Folder>" + watchFolder, EventLogEntryType.Information, 2002);

                // configure the file name FIFO queue
                Queue aQ = new Queue(100);

                // synchronize the queue
                m_fileNameQ = Queue.Synchronized(aQ);

                // launch the job control processing thread monitoring the queue
                m_procThread = new Thread(new ThreadStart(ProcessJobControlFileThread));

                m_logger.WriteToLogFile("-NFORMATIONAL::MAFHandler::StartProcessing():StartingThreadToProcessMAFFIles");
                m_procThread.Start();
                m_logger.WriteToLogFile("-NFORMATIONAL::MAFHandler::StartProcessing():StartedThreadToProcessMAFFIles");
            }
            catch (Exception ex)
            {
                m_logger.WriteToLogFile("-NEXCEPTIONCAUGHT::MAFHandler::StartProcessing():ExceptionCaught:" + ex.Message + ex.StackTrace);
            }
        }// public void StartProcessing()
Beispiel #3
0
 /// <summary>
 /// ctor
 /// </summary>
 public SftpMgr()
 {
     m_dbMgr = new MAFDbMgr();
 }
Beispiel #4
0
 /// <summary>
 /// ctor
 /// </summary>
 public SftpMgr()
 {
     m_dbMgr = new MAFDbMgr();
 }