Beispiel #1
0
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //생성 :
        //추가 :
        //목적 : 초기화 함수
        //설명 :
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public bool Initialize(CProcessDatabase objProcessDatabase)
        {
            bool bReturn   = false;
            var  pDocument = CDocument.GetDocument;

            do
            {
                // 상위 클래스 이어줌
                base.m_objProcessDatabase = objProcessDatabase;
                CConfig objConfig = pDocument.m_objConfig;
                // 데이터베이스 파라메터
                CConfig.CDatabaseParameter objDatabaseParameter = objConfig.GetDatabaseParameter();
                // SQLite 초기화
                m_objSQLite = new CSQLite();
                CErrorReturn objReturn = m_objSQLite.HLInitialize(string.Format(@"{0}\{1}.db3", objConfig.GetDatabaseHistoryPath(), objDatabaseParameter.strDatabaseHistory));
                if (true == objReturn.m_bError)
                {
                    break;
                }
                // SQLite Connect
                objReturn = m_objSQLite.HLConnect();
                if (true == objReturn.m_bError)
                {
                    break;
                }
                // History Align 초기화
                m_objManagerTableHistoryAlign = new CManagerTable();
                if (false == m_objManagerTableHistoryAlign.HLInitialize(
                        m_objSQLite,
                        string.Format(@"{0}\{1}.txt", objConfig.GetDatabaseTablePath(), objDatabaseParameter.strTableHistoryAlign), ""))
                {
                    break;
                }
                //              // History Inspection 초기화
                //              m_objManagerTableHistoryInspection = new CManagerTable();
                //              if( false == m_objManagerTableHistoryInspection.HLInitialize(
                //                  m_objSQLite,
                //                  string.Format( @"{0}\{1}.txt", objConfig.GetDatabaseTablePath(), objDatabaseParameter.strTableHistoryInspection ), "" ) ) break;

                // Process History Delete 초기화
                m_objProcessDatabaseHistoryDelete = new CProcessDatabaseHistoryDelete();
                if (false == m_objProcessDatabaseHistoryDelete.Initialize(m_objProcessDatabase, m_objSQLite))
                {
                    break;
                }

                bReturn = true;
            } while(false);

            return(bReturn);
        }
Beispiel #2
0
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //생성 :
        //추가 :
        //목적 : 초기화 함수
        //설명 :
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public bool Initialize(CProcessDatabase objProcessDatabase)
        {
            bool bReturn   = false;
            var  pDocument = CDocument.GetDocument;

            do
            {
                // 상위 클래스 이어줌
                base.m_objProcessDatabase = objProcessDatabase;
                CConfig objConfig = pDocument.m_objConfig;
                // 데이터베이스 파라메터
                CConfig.CDatabaseParameter objDatabaseParameter = objConfig.GetDatabaseParameter();
                // SQLite 초기화
                m_objSQLite = new CSQLite();
                CErrorReturn objReturn = m_objSQLite.HLInitialize(string.Format(@"{0}\{1}.db3", objConfig.GetCurrentPath(), objDatabaseParameter.strDatabaseInformation));
                if (true == objReturn.m_bError)
                {
                    break;
                }
                // SQLite Connect
                objReturn = m_objSQLite.HLConnect();
                if (true == objReturn.m_bError)
                {
                    break;
                }
                // Information UI Text 초기화
                m_objManagerTableInformationUIText = new CManagerTable();
                if (false == m_objManagerTableInformationUIText.HLInitialize(
                        m_objSQLite,
                        string.Format(@"{0}\{1}.txt", objConfig.GetDatabaseTablePath(), objDatabaseParameter.strTableInformationUIText),
                        string.Format(@"{0}\{1}.txt", objConfig.GetDatabaseRecordPath(), objDatabaseParameter.strRecordInformationUIText)))
                {
                    break;
                }
                // Information User Message 초기화
                m_objManagerTableInformationUserMessage = new CManagerTable();
                if (false == m_objManagerTableInformationUserMessage.HLInitialize(
                        m_objSQLite,
                        string.Format(@"{0}\{1}.txt", objConfig.GetDatabaseTablePath(), objDatabaseParameter.strTableInformationUserMessage),
                        string.Format(@"{0}\{1}.txt", objConfig.GetDatabaseRecordPath(), objDatabaseParameter.strRecordInformationUserMessage)))
                {
                    break;
                }

                bReturn = true;
            } while(false);

            return(bReturn);
        }