Exemple #1
0
        /// <summary>
        /// 为列设置属性
        /// </summary>
        /// <param name="ColName">列</param>
        /// <param name="Propertys">属性</param>
        /// <returns></returns>
        public int SetColProperty(EnumDBColProperty Property, params string[] ColNames)
        {
            foreach (string ColName in ColNames)
            {
                ColValuePair Pair = GetCol(ColName);

                if (Pair == null)
                {
                    continue;
                }

                Pair.Col.SetProperty(Property);
            }

            return(1);
        }
Exemple #2
0
        /// <summary>
        /// 添加一组具有指定属性的要存取的列
        /// </summary>
        public int AddColBatch(string Table, EnumDBColProperty Property, params string[] ColumnName)
        {
            //Table = PreTreatTableName(Table);

            foreach (string Col in ColumnName)
            {
                this.AccessColList.Add(new ColValuePair(new DBCol(Col, Table, Property)));
            }

            Predicate <string> Match = delegate(string Str) { return(Str == Table); };

            if (TableList.FindIndex(Match) == -1)
            {
                TableList.Add(Table);
            }

            return(1);
        }