void LoadProductionTypes() { ProductionTypes.Clear(); foreach (var value in GeneratedEventValues) { var item = new Controls.ProductionTypeItem(); item.ParentPage = this; item.ValueName = value.ToString(); item.SettingChanged += ProductionTypeItem_SettingChanged; ProductionTypes.Add(item); } }
void LoadProductionTypes(DataTable dt) { ProductionTypes.Clear(); string query = "Address LIKE '" + prefix + "ProductionTypes/*'"; var rows = dt.Select(query); if (rows != null) { foreach (var row in rows) { var item = new Controls.ProductionTypeItem(); item.ParentPage = this; item.ValueName = DataTable_Functions.TrakHound.GetRowAttribute("name", row); item.productionType_COMBO.Text = DataTable_Functions.TrakHound.GetRowAttribute("type", row); item.SettingChanged += ProductionTypeItem_SettingChanged; ProductionTypes.Add(item); } } }