public static List <string> GetSubjectsNameList() { List <string> subjectsList = new List <string>(); SQLiteDataReader reader = SubjectsProvider.GetSubjects(); while (reader.Read()) { subjectsList.Add(reader["SubjectName"].ToString()); } return(subjectsList); }
public static List <ListViewItem> GetSubjectsListView() { List <ListViewItem> subjectsList = new List <ListViewItem>(); SQLiteDataReader reader = SubjectsProvider.GetSubjects(); while (reader.Read()) { string[] row = { reader["Id"].ToString(), reader["SubjectName"].ToString() }; ListViewItem item = new ListViewItem(row); subjectsList.Add(item); } return(subjectsList); }