Exemplo n.º 1
0
        /// <summary>
        /// Update the archive with the cached records for the specified type.
        /// </summary>
        /// <param name="type">Indicates type of records to archive</param>
        /// <returns>ID of the last record added to the database</returns>
        public int UpdateArchive(int type)
        {
            int recID = 0;

            if (type == ConsoleDispatcher.SEEVSE_STARTUP_TYPE)
            {
                managerCSR.UpdateDb();
                recID = managerCSR.GetLastId();
            }
            //else if (type == ConsoleDispatcher.COMMAND_SENT_TYPE) managerCTM.UpdateDb();
            else if (type == ConsoleDispatcher.TCPIP_MESSAGE_TYPE)
            {
                managerCTM.UpdateDb();
                recID = managerCTM.GetLastId();
            }
            else if (type == ConsoleDispatcher.CONNECTION_TYPE)
            {
                managerCCR.UpdateDb();
                recID = managerCCR.GetLastId();
            }
            else if (type == ConsoleDispatcher.FTP_TERMINATION_TYPE)
            {
                managerCFTR.UpdateDb();
                recID = managerCFTR.GetLastId();
            }
            else if (type == ConsoleDispatcher.JOB_STEP_TERMINATION_TYPE)
            {
                managerJSR.UpdateDb();
                recID = managerJSR.GetLastId();
            }

            return(recID);
        }
Exemplo n.º 2
0
        private DateTime LoadSessionStartup(out string version)
        {
            version = "";
            DateTime startTime = DateTime.Now;

            ManStartupRecs man = new ManStartupRecs();

            man.SetDbName(Name.Replace(' ', '_'));
            int recordID = man.GetLastId();

            ConsoleDataSet.Startup_RecordsDataTable table = man.GetIdRange(recordID, recordID);
            if (table.Rows.Count == 1)
            {
                ConsoleDataSet.Startup_RecordsRow row = (ConsoleDataSet.Startup_RecordsRow)table.Rows[0];
                version   = row.Program_Version;
                startTime = row.Start_Time;
            }
            return(startTime);
        }