Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 3
0
        private void Frm2SearchByAttribute_Load(object sender, EventArgs e)
        {
            try
            {
                labelControl2.Text = "select * from FILE3DATTRIBUTE where";
                IFeatureWorkspace pFeatureWorkspace = Program.pWorkspace as IFeatureWorkspace;
                this.tFeatureClass = pFeatureWorkspace.OpenFeatureClass(ConfigurationManager.AppSettings["ModleTable"]);
                this.m_OracleHelper = new ADODBHelper(this.ConnString, true);
                m_SqlHelper = new SqlHelper();
                getFieldNames(0);
            }
            catch (Exception)
            {

            }
        }