private DataTable combinedSkillList(BridgeMember member)
        {
            var dt = new DataTable();

            var firstList  = member.returnNumList();
            var secondList = member.returnSkillsList();

            DataColumn dc = new DataColumn();

            dc.ColumnName   = "Skill";
            dc.DataType     = typeof(String);
            dc.DefaultValue = "null";

            DataColumn dg = new DataColumn();

            dg.ColumnName   = "Rank";
            dg.DataType     = typeof(Int32);
            dg.DefaultValue = 0;

            dt.Columns.Add(dc);
            dt.Columns.Add(dg);

            if (firstList.Count > 0)
            {
                for (int x = 0; x < firstList.Count; x++)
                {
                    DataRow dr = dt.NewRow();
                    dr[0] = secondList[x];
                    dr[1] = firstList[x];
                    dt.Rows.Add(dr);
                }
            }
            return(dt);
        }
Beispiel #2
0
        private List <string> combinedSkillList(BridgeMember member)
        {
            String        sT         = "\t";
            String        dT         = "\t\t";
            String        tT         = "\t\t\t";
            List <string> myList     = new List <string>();
            var           firstList  = member.returnNumList();
            var           secondList = member.returnSkillsList();

            if (firstList.Count > 0)
            {
                for (int x = 0; x < firstList.Count; x++)
                {
                    string newString = firstList[x].ToString() + sT + secondList[x].ToString();
                    myList.Add(newString);
                }
            }
            return(myList);
        }