Exemple #1
0
        /// <summary>
        /// 根据信息树ID 查询物体信息
        /// </summary>
        /// <param name="itemID"></param>
        /// <returns></returns>
        public List <File3dattribute> GetModelInfo(string ObjectID)
        {
            ds = new DataSet();
            ADODBHelper m_OracleHelper = new ADODBHelper(ADODBHelper.ConfigConnectionString, true);

            ds = m_OracleHelper.OpenDS("select t.* from FILE3DATTRIBUTE t where t.OBJECTID = " + ObjectID + "");
            this.Oraclelist = new List <File3dattribute>();
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                File3dattribute boTemp = new File3dattribute();
                boTemp.Objectid = int.Parse(ds.Tables[0].Rows[i][0].ToString());
                boTemp.Ysdm     = ds.Tables[0].Rows[i][1].ToString();
                boTemp.Yslx     = ds.Tables[0].Rows[i][2].ToString();
                boTemp.Mc       = ds.Tables[0].Rows[i][3].ToString();
                boTemp.Lxr      = ds.Tables[0].Rows[i][4].ToString();
                boTemp.Gxsj     = ds.Tables[0].Rows[i][5].ToString();
                boTemp.Lxdh     = ds.Tables[0].Rows[i][6].ToString();
                boTemp.Xxdz     = ds.Tables[0].Rows[i][7].ToString();
                boTemp.Jlxh     = ds.Tables[0].Rows[i][8].ToString();

                this.Oraclelist.Add(boTemp);
            }
            m_OracleHelper.Dispose();
            return(this.Oraclelist);
        }
Exemple #2
0
        public List <File3dattribute> GetModelByName(string Name)
        {
            ds = new DataSet();
            ADODBHelper m_OracleHelper = new ADODBHelper(ADODBHelper.ConfigConnectionString, true);

            ds = m_OracleHelper.OpenDS(String.Format("select t.* from FILE3DATTRIBUTE t where t.mc like '%{0}%'", Name));

            this.Oraclelist = new List <File3dattribute>();
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                File3dattribute boTemp = new File3dattribute();
                boTemp.Objectid = int.Parse(ds.Tables[0].Rows[i][0].ToString());
                boTemp.Ysdm     = ds.Tables[0].Rows[i][1].ToString();
                boTemp.Yslx     = ds.Tables[0].Rows[i][2].ToString();
                boTemp.Mc       = ds.Tables[0].Rows[i][3].ToString();
                boTemp.Lxr      = ds.Tables[0].Rows[i][4].ToString();
                boTemp.Gxsj     = ds.Tables[0].Rows[i][5].ToString();
                boTemp.Lxdh     = ds.Tables[0].Rows[i][6].ToString();
                boTemp.Xxdz     = ds.Tables[0].Rows[i][7].ToString();
                boTemp.Jlxh     = ds.Tables[0].Rows[i][8].ToString();
                try
                {
                    boTemp.Cx = Convert.ToDouble(ds.Tables[0].Rows[i][44].ToString());
                    boTemp.Cy = Convert.ToDouble(ds.Tables[0].Rows[i][45].ToString());
                }
                catch (Exception)
                {
                    boTemp.Cx = 0;
                    boTemp.Cy = 0;
                    //  throw;
                }

                this.Oraclelist.Add(boTemp);
            }
            m_OracleHelper.Dispose();
            return(this.Oraclelist);
        }
Exemple #3
0
        public List<File3dattribute> GetModelByName(string Name)
        {
            ds = new DataSet();
            ADODBHelper m_OracleHelper = new ADODBHelper(ADODBHelper.ConfigConnectionString, true);
            ds = m_OracleHelper.OpenDS(String.Format("select t.* from FILE3DATTRIBUTE t where t.mc like '%{0}%'", Name));

            this.Oraclelist = new List<File3dattribute>();
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                File3dattribute boTemp = new File3dattribute();
                boTemp.Objectid = int.Parse(ds.Tables[0].Rows[i][0].ToString());
                boTemp.Ysdm = ds.Tables[0].Rows[i][1].ToString();
                boTemp.Yslx = ds.Tables[0].Rows[i][2].ToString();
                boTemp.Mc = ds.Tables[0].Rows[i][3].ToString();
                boTemp.Lxr = ds.Tables[0].Rows[i][4].ToString();
                boTemp.Gxsj = ds.Tables[0].Rows[i][5].ToString();
                boTemp.Lxdh = ds.Tables[0].Rows[i][6].ToString();
                boTemp.Xxdz = ds.Tables[0].Rows[i][7].ToString();
                boTemp.Jlxh = ds.Tables[0].Rows[i][8].ToString();
                try
                {
                    boTemp.Cx = Convert.ToDouble(ds.Tables[0].Rows[i][44].ToString());
                    boTemp.Cy = Convert.ToDouble(ds.Tables[0].Rows[i][45].ToString());
                }
                catch (Exception)
                {
                    boTemp.Cx = 0;
                    boTemp.Cy = 0;
                  //  throw;
                }

                this.Oraclelist.Add(boTemp);
            }
            m_OracleHelper.Dispose();
            return this.Oraclelist;
        }
Exemple #4
0
        /// <summary>
        /// ������Ϣ��ID ��ѯ������Ϣ
        /// </summary>
        /// <param name="itemID"></param>
        /// <returns></returns>
        public List<File3dattribute> GetModelInfo(string ObjectID)
        {
            ds = new DataSet();
            ADODBHelper m_OracleHelper = new ADODBHelper(ADODBHelper.ConfigConnectionString, true);
            ds = m_OracleHelper.OpenDS("select t.* from FILE3DATTRIBUTE t where t.OBJECTID = " + ObjectID + "");
            this.Oraclelist = new List<File3dattribute>();
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                File3dattribute boTemp = new File3dattribute();
                boTemp.Objectid = int.Parse(ds.Tables[0].Rows[i][0].ToString());
                boTemp.Ysdm = ds.Tables[0].Rows[i][1].ToString();
                boTemp.Yslx = ds.Tables[0].Rows[i][2].ToString();
                boTemp.Mc = ds.Tables[0].Rows[i][3].ToString();
                boTemp.Lxr = ds.Tables[0].Rows[i][4].ToString();
                boTemp.Gxsj = ds.Tables[0].Rows[i][5].ToString();
                boTemp.Lxdh = ds.Tables[0].Rows[i][6].ToString();
                boTemp.Xxdz = ds.Tables[0].Rows[i][7].ToString();
                boTemp.Jlxh = ds.Tables[0].Rows[i][8].ToString();

                this.Oraclelist.Add(boTemp);
            }
            m_OracleHelper.Dispose();
            return this.Oraclelist;
        }