public string GetCourseName(int id) { for (int i = 0; i < course_name_list.Count; i++) { cCourseInfo ci = (cCourseInfo)course_name_list[i]; if (ci != null) { if ((int)ci.data[0] == id) { return(string.Format("{0} - {1}", (string)ci.data[1], (string)ci.data[2])); } } } return(""); }
public override object ReadData(object[] row) { // if init. course info selection if (row.Length == 3) { cCourseInfo ci = new cCourseInfo(); ci.data[0] = Convert.ToInt32(row[0]); ci.data[1] = Convert.ToString(row[1]); ci.data[2] = Convert.ToString(row[2]); course_name_list.Add(ci); return(ci); } else { return(base.ReadData(row)); } }
public override object ReadData(object[] row) { // if init. course info selection if (row.Length == 3) { cCourseInfo ci = new cCourseInfo(); ci.data[0] = Convert.ToInt32(row[0]); ci.data[1] = Convert.ToString(row[1]); ci.data[2] = Convert.ToString(row[2]); course_name_list.Add(ci); return ci; } else return base.ReadData(row); }