private static List <PropertyItem> AddDefaultItem(List <PropertyItem> p, bool addDefault) { if (addDefault) { p.Insert(0, UsersProperties.DefaultItem()); } return(p); }
public static List <PropertyItem> Excercise(int cultureId, bool addDefault) { List <PropertyItem> r = new List <PropertyItem>(); var x = from a in Properties.Excercise where a.CultureId == cultureId select a; r = x.ToList <PropertyItem>(); UsersProperties.AddDefaultItem(r, addDefault); return(r); }
public static List <PropertyItem> FreeTimeFavorites(int cultureId, bool addDefault) { List <PropertyItem> r = new List <PropertyItem>(); var x = from a in Properties.FreeTimeFavorites where a.CultureId == cultureId select a; r = x.ToList <PropertyItem>(); UsersProperties.AddDefaultItem(r, addDefault); return(r); }