private string[,] CreateXref(EventDB eventDB, Id<ControlPoint>[] controlsToXref, Id<Course>[] coursesToXref)
{
string[,] xref = new string[controlsToXref.Length, coursesToXref.Length];
// Go through each course, and cross-reference.
for (int col = 0; col < coursesToXref.Length; ++col) {
CourseView view = CourseView.CreateViewingCourseView(eventDB, new CourseDesignator(coursesToXref[col]));
foreach (CourseView.ControlView controlView in view.ControlViews) {
int row = Array.IndexOf(controlsToXref, controlView.controlId);
if (row >= 0) {
string ordinal;
if (controlView.ordinal < 0)
ordinal = "*"; // for score courses.
else
ordinal = controlView.ordinal.ToString();
xref[row, col] = CombineString(xref[row, col], ordinal);
}
}
}
return xref;
}