示例#1
0
文件: CProperty.cs 项目: radtek/GMIS
        /// <summary>
        /// 读取指定对象的所有属性gs_property
        /// </summary>
        /// <param name="ConnectInfo"></param>
        /// <param name="InfoId"></param>
        public SortedList  GetProperties(String[] ConnectInfo, String InfoId)
        {
            DataTable  dt;
            String     sql;
            SortedList PropertyList = new SortedList();
            CProperty  tempProperty;


            try
            {
                ConnectInfo       = ConnectInfo;
                this.DataOperator = new   CDataOperator(ConnectInfo);
                this.SqlBuilder   = new  CSqlBuilder();

                sql = this.SqlBuilder.GetFilterSql("gs_property", " where InfoId='" + InfoId + "'", "");
                dt  = this.DataOperator.GetDataTable(sql);

                for (int i = 0; i <= dt.Rows.Count - 1; i++)
                {
                    tempProperty = new CProperty(ConnectInfo, dt.Rows[i]);
                    //	PropertyList.Add(tempProperty.InfoField,tempProperty);
                    PropertyList.Add(i, tempProperty);
                }

                return(PropertyList);
            }
            catch
            {
                return(null);
            }
        }
示例#2
0
        /// <summary>
        /// ��ȡָ���������������gs_property
        /// </summary>
        /// <param name="ConnectInfo"></param>
        /// <param name="InfoId"></param>
        public SortedList GetProperties(String[] ConnectInfo,String InfoId)
        {
            DataTable dt;
            String sql;
            SortedList PropertyList=new SortedList();
            CProperty tempProperty;

            try
            {

                ConnectInfo=ConnectInfo;
                this.DataOperator=new   CDataOperator(ConnectInfo);
                this.SqlBuilder =new  CSqlBuilder();

                sql=this.SqlBuilder.GetFilterSql("gs_property"," where InfoId='" + InfoId + "'","");
                dt=this.DataOperator.GetDataTable(sql);

                for(int i=0;i<=dt.Rows.Count-1;i++)
                {
                    tempProperty=new CProperty(ConnectInfo, dt.Rows[i]);
                    //	PropertyList.Add(tempProperty.InfoField,tempProperty);
                    PropertyList.Add(i,tempProperty);

                }

                return PropertyList;
            }
            catch
            {
                return null;
            }
        }
示例#3
0
        /// <summary>
        /// ����������ȡ��������
        /// </summary>
        /// <param name="Filter"></param>
        /// <returns></returns>
        private CProperty[] GetPropertyByFilter(string Filter)
        {
            DataTable dt;
            CProperty[] myPropertyArray;

            dt=this.DataOperator.GetDataTable(Filter);
            myPropertyArray=new CProperty[dt.Rows.Count];

            for(int i=0;i<dt.Rows.Count;i++)
            {
                myPropertyArray[i]=new CProperty(this.ConnectInfo,dt.Rows[i]);
            }

            return myPropertyArray;
        }