Пример #1
0
        public static List <ForumBeitrag> getBeitragByUser(string nickname)
        {
            var result = new List <ForumBeitrag>();
            var entry  = new SqlEntry();

            var reader = entry.getReader(query + nickname + query2);

            while (reader.Read())
            {
                var forumBeitrag = new ForumBeitrag
                {
                    description = reader["Bezeichnung"].ToString(),
                    message     = reader["Mitteilung"].ToString(),
                    changedAt   = (DateTime)reader["Änderungsdatum"]
                };
                result.Add(forumBeitrag);
            }
            return(result);
        }
Пример #2
0
        public static ProfSummary Load(string nickname)
        {
            var entry  = new SqlEntry();
            var reader = entry.getReader(queryString + nickname + "'");

            reader.Read();
            var name   = reader["AkademischerTitel"].ToString() + " " + reader["Nachname"].ToString();
            var result = new ProfSummary
            {
                Nickname  = nickname,
                ProfName  = name,
                Beiträge  = ForumBeitrag.getBeitragByUser(nickname),
                Dokumente = Dokument.getDokumentByUser(nickname),
                Module    = Modul.getModulByUser(nickname)
                            //...
            };

            return(result);
        }