Beispiel #1
0
        public DatatableBag(DataTable dt)
        {
            this.tableName = dt.TableName;

            foreach (DataColumn col in dt.Columns)
            {
                columnNameList.Add(new MyString(col.ColumnName));
            }
            foreach (DataRow row in dt.Rows)
            {
                fieldsList = new FieldsList();

                foreach (DataColumn col in dt.Columns)
                {
                    fieldsList.Fields.Add(new MyString(row[col.ColumnName].ToString()));
                }

                recordList.Add(fieldsList);
            }

            ////  TEMP --   Only reverse or 2x2 data
            //if (observations != 2)
            //{
            //    recordList.Reverse();
            //}
        }
Beispiel #2
0
        public DatatableBag ConvertToDatatableBag(DataTable dt)
        {
            this.tableName = dt.TableName;

            foreach (DataColumn col in dt.Columns)
            {
                columnNameList.Add(new MyString(col.ColumnName));
            }
            foreach (DataRow row in dt.Rows)
            {
                fieldsList = new FieldsList();

                foreach (DataColumn col in dt.Columns)
                {
                    fieldsList.Fields.Add(new MyString(row[col.ColumnName].ToString()));
                }

                recordList.Add(fieldsList);
            }

            return(this);
        }
Beispiel #3
0
        public DatatableBag(DataTable dt, string crosstab, List <EpiDashboard.DescriptiveStatistics> descStatsList = null, GridCells gridCells = null, int observations = 4)
        {
            _tableName    = dt.TableName;
            _gridCellData = gridCells;
            _exposure     = crosstab;

            this.descriptiveStatisticsList = descStatsList;

            foreach (DataColumn col in dt.Columns)
            {
                columnNameList.Add(new MyString(col.ColumnName));
            }
            foreach (DataRow row in dt.Rows)
            {
                fieldsList = new FieldsList();

                foreach (DataColumn col in dt.Columns)
                {
                    fieldsList.Fields.Add(new MyString(row[col.ColumnName].ToString()));
                }

                recordList.Add(fieldsList);
            }
        }