public static List <DutyListItem> GetDataSource(List <int> activityIds, List <int> dutyIds) { List <DutyListItem> items = new List <DutyListItem>(); items.AddRange(ActivityListItem.GetDataSource(activityIds)); items.AddRange(FacultyDutyListItem.GetDataSource(dutyIds)); items.Sort(); return(items); }
/// <summary> /// Get a Datasource List for use in Web Controls. /// /// DataTextField = "Text" /// DataValueField = "Id" /// /// Invalid IDs are dropped without notification. /// /// </summary> /// <param name="actids">List of WeekendActivity.id</param> /// <returns></returns> public static List <ActivityListItem> GetDataSource(List <int> actids) { List <ActivityListItem> items = new List <ActivityListItem>(); foreach (int id in actids) { ActivityListItem item = new ActivityListItem(id); if (item.Id != -1) { items.Add(item); } } return(items); }