Exemplo n.º 1
0
        private void button5_Click(object sender, EventArgs e)
        {
            this.sortByColumnIndex = 9;
            this.SortItemsColumnByIndex();
            var dic = SharedData.CalculateScoreEachItem(this.currentSubAreaDataRows, this.sortByColumnIndex);

            this.ShowScoresForEachItem(dic);
        }
Exemplo n.º 2
0
        private void AddScoresInSubAreaToArea(Dictionary <string, double> dicArea, IList <DataRow> DataRows, int sortByColumnIndex)
        {
            DataRows = DataRows.OrderByDescending(x => Convert.ToDouble(x[sortByColumnIndex])).ToList();
            Dictionary <int, double> dicScores = SharedData.CalculateScoreEachItem(DataRows,
                                                                                   sortByColumnIndex);

            foreach (var kv in dicScores)
            {
                string name = DataRows[kv.Key][0].ToString();
                dicArea.Add(name, kv.Value);
            }
        }