public static void ListsInterestGroupings_FillRow(object resultObj, out SqlInt32 id, out SqlString name, out SqlString group_name, out SqlInt32 display_order, out SqlInt32 subscribers) { InterestGroupingRow row = (InterestGroupingRow)resultObj; id = row.Id; name = row.Name; group_name = row.GroupName; display_order = row.DisplayOrder; subscribers = row.Subscribers; }
public static IEnumerable ListsInterestGroupings(SqlString apikey, SqlString list_id, SqlBoolean counts) { List <InterestGroupingRow> rows = new List <InterestGroupingRow>(); MailChimpManager mc = new MailChimpManager(apikey.ToString()); List <InterestGrouping> results = mc.GetListInterestGroupings(list_id.ToString(), counts.IsTrue); foreach (InterestGrouping grouping in results) { foreach (InterestGrouping.InnerGroup innerGroup in grouping.GroupNames) { InterestGroupingRow row = new InterestGroupingRow(); row.Id = grouping.Id; row.Name = grouping.Name; row.GroupName = innerGroup.Name; row.DisplayOrder = innerGroup.DisplayOrder; row.Subscribers = innerGroup.Subscribers; rows.Add(row); } } return(rows); }