Example #1
0
        private static List <KLLevel> LoadListFromReader(IDataReader reader)
        {
            List <KLLevel> kLLevelList = new List <KLLevel>();

            try
            {
                while (reader.Read())
                {
                    KLLevel kLLevel = new KLLevel();
                    kLLevel.levelID = Convert.ToInt32(reader["LevelID"]);
                    kLLevel.name    = reader["Name"].ToString();
                    kLLevel.from    = Convert.ToInt32(reader["From"]);
                    kLLevel.to      = reader["To"].ToString();
                    kLLevelList.Add(kLLevel);
                }
            }
            finally
            {
                reader.Close();
            }

            return(kLLevelList);
        }
Example #2
0
 /// <summary>
 /// Compares 2 instances of KLLevel.
 /// </summary>
 public static int CompareByTo(KLLevel kLLevel1, KLLevel kLLevel2)
 {
     return(kLLevel1.To.CompareTo(kLLevel2.To));
 }
Example #3
0
 /// <summary>
 /// Compares 2 instances of KLLevel.
 /// </summary>
 public static int CompareByFrom(KLLevel kLLevel1, KLLevel kLLevel2)
 {
     return(kLLevel1.From.CompareTo(kLLevel2.From));
 }
Example #4
0
 /// <summary>
 /// Compares 2 instances of KLLevel.
 /// </summary>
 public static int CompareByName(KLLevel kLLevel1, KLLevel kLLevel2)
 {
     return(kLLevel1.Name.CompareTo(kLLevel2.Name));
 }
Example #5
0
 /// <summary>
 /// Compares 2 instances of KLLevel.
 /// </summary>
 public static int CompareByLevelID(KLLevel kLLevel1, KLLevel kLLevel2)
 {
     return(kLLevel1.LevelID.CompareTo(kLLevel2.LevelID));
 }