Exemple #1
0
        public ConfigRow[] getRows(System.Enum key1, int value1, System.Enum key2, int value2)
        {
            List <ConfigRow> listRow = new List <ConfigRow>();
            int count = reader.getRowCount();
            int col1  = -1;
            int col2  = -1;

            for (int index = 0; index < count; index++)
            {
                ConfigRow row = reader.getRow(index);
                if (row == null)
                {
                    continue;
                }

                if (col1 == -1)
                {
                    col1 = row.getIndex(key1);
                }

                if (col2 == -1)
                {
                    col2 = row.getIndex(key2);
                }
                if (col1 >= 0 && col2 >= 0 && row.equalsValue(key1, value1) && row.equalsValue(key2, value2))
                {
                    listRow.Add(row);
                }
            }
            return(listRow.ToArray());
        }
Exemple #2
0
        public ConfigRow getRow(System.Enum key1, int value1, System.Enum key2, int value2)
        {
            int count = reader.getRowCount();
            int col1  = -1;
            int col2  = -1;

            for (int index = 0; index < count; index++)
            {
                ConfigRow row = reader.getRow(index);
                if (row == null)
                {
                    continue;
                }

                if (col1 == -1)
                {
                    col1 = row.getIndex(key1);
                }

                if (col2 == -1)
                {
                    col2 = row.getIndex(key2);
                }
                if (col1 >= 0 && col2 >= 0 && row.equalsValue(col1, value1) && row.equalsValue(col2, value2))
                {
                    return(row);
                }
            }
            return(null);
        }
Exemple #3
0
        public ConfigRow[] getRows(ConfigRow[] srcList, System.Enum key, int value)
        {
            if (srcList == null)
            {
                return(null);
            }
            List <ConfigRow> listRow = new List <ConfigRow>();

            int col   = -1;
            int count = reader.getRowCount();

            for (int index = 0; index < count; index++)
            {
                ConfigRow row = reader.getRow(index);
                if (row == null)
                {
                    continue;
                }

                if (col == -1)
                {
                    col = row.getIndex(key);
                }

                if (col >= 0 && row.equalsValue(col, value))
                {
                    listRow.Add(row);
                }
            }
            return(listRow.ToArray());
        }
Exemple #4
0
        //根据条件值返回行
        public ConfigRow getRow(System.Enum key, int value)
        {
            int count = reader.getRowCount();
            int col   = -1;

            for (int index = 0; index < count; index++)
            {
                ConfigRow row = reader.getRow(index);
                if (row == null)
                {
                    continue;
                }

                if (col == -1)
                {
                    col = row.getIndex(key);
                }

                if (col >= 0 && row.equalsValue(col, value))
                {
                    return(row);
                }
            }
            return(null);
        }
Exemple #5
0
        public ConfigRow getRow(System.Enum key1, int value1, System.Enum key2, int value2, System.Enum key3, int value3)
        {
            int count = reader.getRowCount();

            for (int index = 0; index < count; index++)
            {
                ConfigRow row = getRow(index);
                if (row == null)
                {
                    continue;
                }
                if (row.equalsValue(key1, value1) &&
                    row.equalsValue(key2, value2) &&
                    row.equalsValue(key3, value3))
                {
                    return(row);
                }
            }
            return(null);
        }
Exemple #6
0
        public ConfigRow[] getRows(System.Enum key1, int value1, System.Enum key2, int value2, System.Enum key3, int value3)
        {
            List <ConfigRow> listRow = new List <ConfigRow>();

            int count = reader.getRowCount();

            for (int index = 0; index < count; index++)
            {
                ConfigRow row = reader.getRow(index);
                if (row == null)
                {
                    continue;
                }
                if (row.equalsValue(key1, value1) &&
                    row.equalsValue(key2, value2) &&
                    row.equalsValue(key3, value3))
                {
                    listRow.Add(row);
                }
            }
            return(listRow.ToArray());
        }