public static string getBookstoreBooksLink(IList<SectionWithSeats> linkedSections)
{
StringBuilder resultURL = new StringBuilder("http://bellevue.verbacompare.com/comparison?id=");
for (int i = 0; i < linkedSections.Count; i++)
{
SectionWithSeats sec = linkedSections[i];
// TODO: can we make the bookstore link template configurable in case it needs to change?
resultURL.AppendFormat("{0}{1}__{2}__{3}{4}__{5}", (i > 0? "%2C" : String.Empty),
getYRQValueForBookstoreURL(sec.Yrq),
sec.CourseSubject,
sec.CourseNumber,
// TODO: get CommonCourseChar from .config instead of hard-coding
(sec.IsCommonCourse ? "%26" : String.Empty),
sec.ID.ItemNumber);
}
return resultURL.ToString();
}