/// <summary> /// Sets up the data to be displayed in the table. /// </summary> private void setupData() { int num = 0; int size = _data.size(); StateMod_Diversion dt = null; string id = null; __data = new System.Collections.IList[__COLUMNS]; for (int i = 0; i < __COLUMNS; i++) { __data[i] = new List <object>(); } __rowMap = new List <object>(); double total = 0; int rowCount = 0; StateMod_ReturnFlow rf = null; System.Collections.IList returnFlows = null; for (int i = 0; i < size; i++) { total = 0; dt = (StateMod_Diversion)_data.get(i); id = dt.getID(); num = dt.getNrtn(); returnFlows = dt.getReturnFlows(); for (int j = 0; j < num; j++) { rf = (StateMod_ReturnFlow)returnFlows[j]; __data[__COL_ID].Add(id); __data[__COL_NODE_ID].Add(rf.getCrtnid()); __data[__COL_PERCENT].Add(new double?(rf.getPcttot())); __data[__COL_DELAY_ID].Add("" + rf.getIrtndl()); total += rf.getPcttot(); __rowMap.Add(new int?(rowCount)); rowCount++; } __data[__COL_ID].Add(id); __data[__COL_NODE_ID].Add("TOTAL"); __data[__COL_PERCENT].Add(new double?(total)); __data[__COL_DELAY_ID].Add(""); rowCount++; } _rows = rowCount; }