Exemplo n.º 1
0
        public static MTable getTable(WindData wd)
        {
            MTable ret = new MTable();

            ret.FillTable(getRecords(wd));

            return(ret);
        }
Exemplo n.º 2
0
        protected MTable getCrossTable(List <int> SelectRows, string SelectCols)
        {
            MTable ret = null;

            string[] ColArr = SelectCols.Trim().Split(',');
            if (SelectCols.Trim() == "*")
            {
                ColArr = this.TColumns.Keys.ToArray <string>();
            }
            ret = getTableByRC(SelectRows.ToArray <int>(), ColArr);
            return(ret);
        }
Exemplo n.º 3
0
        protected MTable getTableByRC(int[] rows, string[] selectCols)
        {
            MTable ret = new MTable();

            if (this.Table == null)
            {
                return(null);
            }
            for (int i = 0; i < rows.Length - 1; i++)
            {
                if (i >= this.Table.Rows.Count)
                {
                    throw new Exception("选出的行号越界!");
                }
                Dictionary <string, int> row = new Dictionary <string, int>();
                for (int j = 0; j < selectCols.Length - 1; j++)
                {
                    ret[i, selectCols[j]] = this.Table.Rows[i][selectCols[j]];
                }
            }
            return(null);
        }