private void GetDescriptionLevels(DataTable table) { foreach (DataRow row in table.Rows) { int id = (int)row[0]; object categoryId = row[3]; DescriptionLevel descriptionLevel = new DescriptionLevel(row); if (categoryId != DBNull.Value) { descriptionLevel.AddCategory(descriptionLevelCategories[(int)categoryId]); } descriptionLevels.Add(id, descriptionLevel); } }
public void AddDescriptionLevel(DescriptionLevel descriptionLevel) { levels.Add(descriptionLevel); }