Exemplo n.º 1
0
        public void insertHistoryDB()
        {
            INDEX_DATA_Table_DAO dao = new INDEX_DATA_Table_DAO();

            dao.INDEX_CODE_ = this.Code_;
            dao.INDEX_NAME_ = this.Name_;

            try
            {
                dao.deleteIndex(DataBaseConnectManager.ConnectionFactory("myDB"));

                foreach (var item in this.TimeSeries_)
                {
                    dao.INDEX_DATE_  = QueryStr.wrapComma(item.Key);
                    dao.INDEX_VALUE_ = QueryStr.wrapComma(item.Value);

                    dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
                }
            }
            catch (SqlCeException)
            {
                OutputLogViewModel.addResult("DataBase Connection Error : DB Load");
                throw;
            }
        }
        public void insertHistoryDB()
        {

            INDEX_DATA_Table_DAO dao = new INDEX_DATA_Table_DAO();

            dao.INDEX_CODE_ = this.Code_;
            dao.INDEX_NAME_ = this.Name_;

            try
            {

                dao.deleteIndex(DataBaseConnectManager.ConnectionFactory("myDB"));
                
                foreach (var item in this.TimeSeries_)
                {
                    dao.INDEX_DATE_ = QueryStr.wrapComma(item.Key);
                    dao.INDEX_VALUE_ = QueryStr.wrapComma(item.Value);

                    dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
                }


            }
            catch (SqlCeException )
            {
                OutputLogViewModel.addResult("DataBase Connection Error : DB Load");
                throw;
            }
        }
Exemplo n.º 3
0
        public void insertDB()
        {
            INDEX_DATA_Table_DAO dao = new INDEX_DATA_Table_DAO();

            dao.INDEX_DATE_  = this.Date_;
            dao.INDEX_CODE_  = this.Name_;
            dao.INDEX_NAME_  = this.Name_;
            dao.INDEX_VALUE_ = this.Value_;

            try
            {
                dao.delete(DataBaseConnectManager.ConnectionFactory("myDB"));
                dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));
            }
            catch (SqlCeException)
            {
                OutputLogViewModel.addResult("dataBase load error : " + this.Name_);
            }
        }
        public void insertDB()
        {
            INDEX_DATA_Table_DAO dao = new INDEX_DATA_Table_DAO();

            dao.INDEX_DATE_ = this.Date_;
            dao.INDEX_CODE_ = this.Name_;
            dao.INDEX_NAME_ = this.Name_;
            dao.INDEX_VALUE_ = this.Value_;

            try
            {
                dao.delete(DataBaseConnectManager.ConnectionFactory("myDB"));
                dao.insert(DataBaseConnectManager.ConnectionFactory("myDB"));

            }
            catch (SqlCeException )
            {
                OutputLogViewModel.addResult("dataBase load error : " + this.Name_);
            }

        }