Example #1
0
        public List <BIOSUM_VOLUME> ExecuteSelectSQL_CreateBIOSUM_VOLUMEList(string p_strSQL)
        {
            List <BIOSUM_VOLUME> oList = new List <BIOSUM_VOLUME>();
            bool bCloseConnection      = false;

            if (this._OracleADO.ConnectionDisposed ||
                this._OracleADO.m_Connection == null ||
                this._OracleADO.m_Connection.State != System.Data.ConnectionState.Open)
            {
                _OracleADO.OpenConnection(FCSOracle.FCSConnectionString);
                bCloseConnection = true;
            }

            _OracleADO.SqlQueryReader(_OracleADO.m_Connection, p_strSQL);
            if (_OracleADO.m_intError == 0 && _OracleADO.m_DataReader.HasRows)
            {
                while (_OracleADO.m_DataReader.Read())
                {
                    if (_OracleADO.m_DataReader != null)
                    {
                        BIOSUM_VOLUME oNew = new BIOSUM_VOLUME();

                        oNew.STATECD  = Convert.ToInt32(_OracleADO.m_DataReader["STATECD"]);
                        oNew.COUNTYCD = Convert.ToInt32(_OracleADO.m_DataReader["COUNTYCD"]);
                        oNew.PLOT     = Convert.ToInt32(_OracleADO.m_DataReader["PLOT"]);
                        oNew.INVYR    = Convert.ToInt32(_OracleADO.m_DataReader["INVYR"]);
                        oNew.TREE     = Convert.ToInt32(_OracleADO.m_DataReader["TREE"]);

                        if (_OracleADO.m_DataReader["VOL_LOC_GRP"] != DBNull.Value)
                        {
                            oNew.VOL_LOC_GRP = _OracleADO.m_DataReader["VOL_LOC_GRP"].ToString();
                        }

                        if (_OracleADO.m_DataReader["SPCD"] != DBNull.Value)
                        {
                            oNew.SPCD = Convert.ToInt32(_OracleADO.m_DataReader["SPCD"]);
                        }

                        if (_OracleADO.m_DataReader["DIA"] != DBNull.Value)
                        {
                            oNew.DIA = Convert.ToDouble(_OracleADO.m_DataReader["DIA"]);
                        }

                        if (_OracleADO.m_DataReader["HT"] != DBNull.Value)
                        {
                            oNew.HT = Convert.ToInt32(_OracleADO.m_DataReader["HT"]);
                        }

                        if (_OracleADO.m_DataReader["ACTUALHT"] != DBNull.Value)
                        {
                            oNew.ACTUALHT = Convert.ToInt32(_OracleADO.m_DataReader["ACTUALHT"]);
                        }

                        if (_OracleADO.m_DataReader["CR"] != DBNull.Value)
                        {
                            oNew.ACTUALHT = Convert.ToInt32(_OracleADO.m_DataReader["CR"]);
                        }

                        oNew.STATUSCD = Convert.ToInt16(_OracleADO.m_DataReader["STATUSCD"]);

                        if (_OracleADO.m_DataReader["DECAYCD"] != DBNull.Value)
                        {
                            oNew.DECAYCD = Convert.ToInt32(_OracleADO.m_DataReader["DECAYCD"]);
                        }

                        if (_OracleADO.m_DataReader["TREECLCD"] != DBNull.Value)
                        {
                            oNew.TREECLCD = Convert.ToInt32(_OracleADO.m_DataReader["TREECLCD"]);
                        }

                        if (_OracleADO.m_DataReader["ROUGHCULL"] != DBNull.Value)
                        {
                            oNew.ROUGHCULL = Convert.ToInt32(_OracleADO.m_DataReader["ROUGHCULL"]);
                        }

                        if (_OracleADO.m_DataReader["CULL"] != DBNull.Value)
                        {
                            oNew.CULL = Convert.ToInt32(_OracleADO.m_DataReader["CULL"]);
                        }

                        if (_OracleADO.m_DataReader["TOTAGE"] != DBNull.Value)
                        {
                            oNew.TOTAGE = Convert.ToDouble(_OracleADO.m_DataReader["TOTAGE"]);
                        }

                        oNew.TRE_CN = _OracleADO.m_DataReader["TRE_CN"].ToString();
                        oNew.PLT_CN = _OracleADO.m_DataReader["PLT_CN"].ToString();
                        oNew.CND_CN = _OracleADO.m_DataReader["CND_CN"].ToString();

                        if (_OracleADO.m_DataReader["VOLCFGRS_CALC"] != DBNull.Value)
                        {
                            oNew.VOLCFGRS_CALC = Convert.ToDouble(_OracleADO.m_DataReader["VOLCFGRS_CALC"]);
                        }

                        if (_OracleADO.m_DataReader["VOLCSGRS_CALC"] != DBNull.Value)
                        {
                            oNew.VOLCSGRS_CALC = Convert.ToDouble(_OracleADO.m_DataReader["VOLCSGRS_CALC"]);
                        }

                        if (_OracleADO.m_DataReader["VOLCFNET_CALC"] != DBNull.Value)
                        {
                            oNew.VOLCFNET_CALC = Convert.ToDouble(_OracleADO.m_DataReader["VOLCFNET_CALC"]);
                        }

                        if (_OracleADO.m_DataReader["DRYBIOM_CALC"] != DBNull.Value)
                        {
                            oNew.DRYBIOM_CALC = Convert.ToDouble(_OracleADO.m_DataReader["DRYBIOM_CALC"]);
                        }

                        if (_OracleADO.m_DataReader["DRYBIOT_CALC"] != DBNull.Value)
                        {
                            oNew.DRYBIOT_CALC = Convert.ToDouble(_OracleADO.m_DataReader["DRYBIOT_CALC"]);
                        }

                        if (_OracleADO.m_DataReader["VOLTSGRS_CALC"] != DBNull.Value)
                        {
                            oNew.VOLTSGRS_CALC = Convert.ToDouble(_OracleADO.m_DataReader["VOLTSGRS_CALC"]);
                        }
                        oList.Add(oNew);
                        oNew = null;
                    }
                }
                _OracleADO.m_DataReader.Close();
                _OracleADO.m_DataReader.Dispose();
                _OracleADO.m_DataReader = null;
            }
            if (bCloseConnection)
            {
                _OracleADO.CloseAndDisposeConnection(_OracleADO.m_Connection, false);
            }
            if (oList.Count == 0)
            {
                return(null);
            }
            else
            {
                return(oList);
            }
        }
Example #2
0
        public static void rowCopyToBIOSUM_VOLUME(System.Data.DataRow p_oRow, BIOSUM_VOLUME p_BIOSUM_VOLUME_ITEM)
        {
            p_oRow["STATECD"]  = p_BIOSUM_VOLUME_ITEM.STATECD;
            p_oRow["COUNTYCD"] = p_BIOSUM_VOLUME_ITEM.COUNTYCD;
            p_oRow["PLOT"]     = p_BIOSUM_VOLUME_ITEM.PLOT;
            p_oRow["INVYR"]    = p_BIOSUM_VOLUME_ITEM.INVYR;
            p_oRow["TREE"]     = p_BIOSUM_VOLUME_ITEM.TREE;

            if (p_BIOSUM_VOLUME_ITEM.VOL_LOC_GRP != null &&
                p_BIOSUM_VOLUME_ITEM.VOL_LOC_GRP.Trim().Length > 0)
            {
                p_oRow["VOL_LOC_GRP"] = p_BIOSUM_VOLUME_ITEM.VOL_LOC_GRP.ToString();
            }

            if (p_BIOSUM_VOLUME_ITEM.SPCD != null)
            {
                p_oRow["SPCD"] = p_BIOSUM_VOLUME_ITEM.SPCD;
            }

            if (p_BIOSUM_VOLUME_ITEM.DIA != null)
            {
                p_oRow["DIA"] = Convert.ToDecimal(p_BIOSUM_VOLUME_ITEM.DIA);
            }

            if (p_BIOSUM_VOLUME_ITEM.HT != null)
            {
                p_oRow["HT"] = p_BIOSUM_VOLUME_ITEM.HT;
            }

            if (p_BIOSUM_VOLUME_ITEM.ACTUALHT != null)
            {
                p_oRow["ACTUALHT"] = p_BIOSUM_VOLUME_ITEM.ACTUALHT;
            }

            if (p_BIOSUM_VOLUME_ITEM.CR != null)
            {
                p_oRow["CR"] = p_BIOSUM_VOLUME_ITEM.CR;
            }

            p_oRow["STATUSCD"] = p_BIOSUM_VOLUME_ITEM.STATUSCD;

            if (p_BIOSUM_VOLUME_ITEM.DECAYCD != null)
            {
                p_oRow["DECAYCD"] = p_BIOSUM_VOLUME_ITEM.DECAYCD;
            }

            if (p_BIOSUM_VOLUME_ITEM.TREECLCD != null)
            {
                p_oRow["TREECLCD"] = p_BIOSUM_VOLUME_ITEM.TREECLCD;
            }

            if (p_BIOSUM_VOLUME_ITEM.ROUGHCULL != null)
            {
                p_oRow["ROUGHCULL"] = p_BIOSUM_VOLUME_ITEM.ROUGHCULL;
            }

            if (p_BIOSUM_VOLUME_ITEM.CULL != null)
            {
                p_oRow["CULL"] = p_BIOSUM_VOLUME_ITEM.CULL;
            }

            if (p_BIOSUM_VOLUME_ITEM.TOTAGE != null)
            {
                p_oRow["TOTAGE"] = p_BIOSUM_VOLUME_ITEM.TOTAGE;
            }

            p_oRow["TRE_CN"] = p_BIOSUM_VOLUME_ITEM.TRE_CN;
            p_oRow["PLT_CN"] = p_BIOSUM_VOLUME_ITEM.PLT_CN;
            p_oRow["CND_CN"] = p_BIOSUM_VOLUME_ITEM.CND_CN;
        }