public static IEnumerable <VariableInfoTypeCategory> getCategoryElement(int variableID, VariablesDataset ds) { DataRow[] dr = ds.Tables["categories"].Select("variableID = " + variableID); foreach (VariablesDataset.CategoriesRow row in dr) { VariableInfoTypeCategory category = new VariableInfoTypeCategory(); category.dataValue = Convert.ToDecimal(row.DataValue); category.description = row.CategoryDescription; yield return(category); } }
public static IEnumerable<VariableInfoTypeCategory> getCategoryElement(int variableID, VariablesDataset ds) { DataRow[] dr = ds.Tables["categories"].Select("variableID = " + variableID); foreach (VariablesDataset.CategoriesRow row in dr) { VariableInfoTypeCategory category = new VariableInfoTypeCategory(); category.dataValue = Convert.ToDecimal(row.DataValue); category.description = row.CategoryDescription; yield return category; } }